HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Some 'little' questions...

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#28731 (In Topic #6594)
Avatar

Fan in action

Hi again,

i've collected some questions for you :D

  • How can I show the 'flagrant text' on the top of page? (I tried much with the top.tpl but nothing worked)
  • Is there a way to choose automatically the iotd? (If i have some in queue)
  • Is there a way to have german letters like in the shoutbox? In chat the letters works, but not in shoutbox
  • how can i show the points (the 'total points' from ocf, not the 'left points') and mybe the group and next group in personal stats (I know where in the tpl to put the code, but i dont know the code, or the code dont work in this tpl)
  • what are the 2 links (the 'source url') in the whisper choice page? i need them, bacause i want to add a direkt link to whisper a special person (inline), and maybe add a link like 'pn' in the line where the buttons like delete, edit and so on are.
  • there is a email notify if someone invite me to a chat, is there a way to notify inpage? (on the top for example)
  • why i cant add a panel on the cms page? (because the members need the cms zone to edit their gallery and i have a global panel for all sites) And how can i disable the help there?

I hope my english was not the worst ;) and you have understood me.
Thanks anyway


Last edit: by Me2006
Back to the top
 
Posted
Rating:
#28739
Avatar

How can I show the 'flagrant text' on the top of page? (I tried much with the top.tpl but nothing worked)

In BOTTOM change:

Code

      {+START,IF_NON_EMPTY,{FLAGRANT}}
         <div class="global_flagrant">
            {FLAGRANT}
         </div>
      {+END}
to:

Code

      {+START,SHIFT_ENCODE,FLAGRANT}
      {+START,IF_NON_EMPTY,{FLAGRANT}}
         <div class="global_flagrant">
            {FLAGRANT}
         </div>
      {+END}
      {+END}
In TOP, include this somewhere:

Code

{$SHIFT_DECODE,FLAGRANT}

That'll tell ocPortal to move it.


Not out of the box, although a task could be scheduled by someone who knows a little PHP code.

You can, however, randomise the IOTD from those that have been used previously. To do that, use:

Code

[block="random"]main_iotd[/block]
It'll pick one per day if you have block cacheing on. If you don't, it'll be random each time you view.


That character works in the shoutbox for me on both IE and Firefox.


You can't currently put the points in. However if you put the following into sources/symbols.php…

Code

         case 'TOTAL_POINTS':
            require_code('points');
            $value=total_points(array_key_exists(0,$param)?intval($param[0]):get_member());
            break;

         case 'POINTS_USED':
            require_code('points');
            $value=points_used(array_key_exists(0,$param)?intval($param[0]):get_member());
            break;

         case 'AVAILABLE_POINTS':
            require_code('points');
            $value=available_points(array_key_exists(0,$param)?intval($param[0]):get_member());
            break;

         case 'GROUP_ID':
            if (array_key_exists(0,$param))
            {
               $groups=$GLOBALS['FORUM_DRIVER']->get_members_groups(array_key_exists(1,$param)?intval($param[1]):get_member());
               $value=array_key_exists($groups[intval($param[0])],$groups)?strval($groups[intval($param[0])]):'';
            }
            break;

         case 'GROUP_NAME':
            if (array_key_exists(0,$param))
            {
               $groups=$GLOBALS['FORUM_DRIVER']->get_members_groups(array_key_exists(1,$param)?intval($param[1]):get_member());
               if (array_key_exists($groups[intval($param[0])],$groups))
               {
                  $all_usergroups=$GLOBALS['FORUM_DRIVER']->get_usergroup_list();
                  $value=$all_usergroups[$groups[intval($param[0])]];
               }
            }
            break;

(put it somewhere within the first big set of similar lines)

You can then put…

Code

{$TOTAL_POINTS}
into the template. (or also the other two I defined – I thought I might as well make all 3 possible in one go). And for the groups…

Code

<a href="{$PAGE_LINK,{_SEARCH:groups:view:{$GROUP_ID,0}}}">{$GROUP_NAME,0}</a>
{+START,IF_NON_EMPTY,{$GROUP_ID,1}}
<a href="{$PAGE_LINK,{_SEARCH:groups:view:{$GROUP_ID,1}}}">{$GROUP_NAME,1}</a>
{+END}


The new PT link is something like…
{$PAGE_LINK,_SEARCH:topics:new_pt:intended_solely_for={POSTER_ID}}
and the inline-PP link is something like…
{$PAGE_LINK,_SEARCH:topics:new_post:{TOPIC_ID}:quote={POST_ID}:intended_solely_for={POSTER_ID}}

That assumes TOPIC_ID,POST_ID,and POSTER_ID are all defined in the template you're doing this in.

Assuming you're using the OCF_TOPIC_POST template…

POSTER_ID and TOPIC_ID aren't. Add these lines at around line 321 of forum/pages/modules/topicview.php:

Code

                  'POSTER_ID'=>strval($_post['poster']),
                  'TOPIC_ID'=>strval($id),

POST_ID is actually just called ID.

Hope that made some sense.


there is a email notify if someone invite me to a chat, is there a way to notify inpage?

Not as things are.


why i cant add a panel on the cms page?

I don't think there's anything stopping you just adding the 'cms:panel_left' Comcode page (or setting up a page redirection from that page name to ':panel_left'). If there is, let me know.


how can i disable the help there?

If you want it disabled there but not in the Admin Zone then you'd need to edit the GLOBAL manually using some Tempcode directives. If you want it disabled completely, there's a new hidden value to do it. I can't remember off-the-top-of-my-head, but I mentioned how to do it in one of my more recent posts in the staff chat forum (when I announced the new feature for 3.1).


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#28922
Avatar

Fan in action

Have big thanks!!!

Flagrant text
works


IOTD
works


Character Problem
…hmmm i think its no big problem…dont know why the shoutbox dont show this characters…


Points

Code

{$TOTAL_POINTS}
works fine, but i couldnt understand how to show the group in the BLOCK_SIDE_PERSONAL_STATS.TPL
If I add

Code

<a href="{$PAGE_LINK,{_SEARCH:groups:view:{$GROUP_ID,0}}}">{$GROUP_NAME,0}</a>
{+START,IF_NON_EMPTY,{$GROUP_ID,1}}
<a href="{$PAGE_LINK,{_SEARCH:groups:view:{$GROUP_ID,1}}}">{$GROUP_NAME,1}</a>
{+END}
into the BLOCK_SIDE_PERSONAL_STATS.TPL i get an error:

Code

A parameter, _SEARCH:groups:view:{$GROUP_ID, is referenced in the template, BLOCK_SIDE_PERSONAL_STATS, but not passed
A parameter, _SEARCH:groups:view:{$GROUP_ID, is referenced in the template, BLOCK_SIDE_PERSONAL_STATS, but not passed

If i add $GROUP_NAME or $GROUP_ID, it shows nothing.


PT & PP
works


Notify
Really pity


Panel for cms
I tried:

Code

MYSITE/cms/index.php?page=cms_galleries:panel_left
But this dont work
ocP want to add a new page…


Help
OK I'll try this
Back to the top
 
Posted
Rating:
#28936
Avatar

Me2006 said

Points

Code

{$TOTAL_POINTS}
works fine, but i couldnt understand how to show the group in the BLOCK_SIDE_PERSONAL_STATS.TPL
If I add

Code

<a href="{$PAGE_LINK,{_SEARCH:groups:view:{$GROUP_ID,0}}}">{$GROUP_NAME,0}</a>
{+START,IF_NON_EMPTY,{$GROUP_ID,1}}
<a href="{$PAGE_LINK,{_SEARCH:groups:view:{$GROUP_ID,1}}}">{$GROUP_NAME,1}</a>
{+END}
into the BLOCK_SIDE_PERSONAL_STATS.TPL i get an error:

Code

A parameter, _SEARCH:groups:view:{$GROUP_ID, is referenced in the template, BLOCK_SIDE_PERSONAL_STATS, but not passed
A parameter, _SEARCH:groups:view:{$GROUP_ID, is referenced in the template, BLOCK_SIDE_PERSONAL_STATS, but not passed

If i add $GROUP_NAME or $GROUP_ID, it shows nothing.

You need to remove the braces:

Code

<a href="{$PAGE_LINK,_SEARCH:groups:view:{$GROUP_ID,0}}">{$GROUP_NAME,0}</a>
{+START,IF_NON_EMPTY,{$GROUP_ID,1}}
<a href="{$PAGE_LINK,_SEARCH:groups:view:{$GROUP_ID,1}}">{$GROUP_NAME,1}</a>
{+END}

Panel for cms
I tried:

Code

MYSITE/cms/index.php?page=cms_galleries:panel_left
But this dont work
ocP want to add a new page…

Go to MYSITE/cms/index.php?page=panel_left. When Chris said "cms:panel_left", he was using a special format we've got for page links: the first part is the zone, and the second is the page. If you're putting this into an URL, the zone goes as the folder, and does not go into the ?page= part of the URL. :)

Back to the top
 
Posted
Rating:
#28961
Avatar

into the BLOCK_SIDE_PERSONAL_STATS.TPL i get an error:

My fault – Philip has corrected what I said in the post above.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: