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.


Removing the mousover popup over a users name in topic view

On my site, I prefer certain items just show up by the user name beside each post, I don't care for the popup.  Thus I decided to remove them.  It's really quite easy to just modify the templates so they don't show.   

Modify OCF_POSTER_MEMBER.tpl, it should look like this:

Code

<a href="{PROFILE_URL*}" onblur="this.onmouseout(event);" onfocus="this.onmouseover(event);" class="fancy_user_link">{+START,IF_PASSED,HIGHLIGHT_NAME}{+START,IF,{HIGHLIGHT_NAME}}<em>{+END}{+END}{POSTER_USERNAME*}{+START,IF_PASSED,HIGHLIGHT_NAME}{+START,IF,{HIGHLIGHT_NAME}}</em>{+END}{+END}</a>

Next is OCF_POSTER_GUEST.tpl, the modified form is:

Code

{+START,IF,{$EQ,{POSTER_USERNAME},{!SYSTEM}}}
   <em>{$SITE_NAME*}</em>
{+END}
{+START,IF,{$NEQ,{POSTER_USERNAME},{!SYSTEM}}}
   {+START,IF_EMPTY,{LOOKUP_IP_URL}}
   <a class="ocf_guest_poster non_link" href="#" onclick="return false;" onblur="this.onmouseout(event);" onfocus="this.onmouseover(event);" >{POSTER_USERNAME*}</a>
   {+END}
   {+START,IF_NON_EMPTY,{LOOKUP_IP_URL}}
   <a class="ocf_guest_poster" href="{LOOKUP_IP_URL*}" onblur="this.onmouseout(event);" onfocus="this.onmouseover(event);" >{POSTER_USERNAME*}</a>
   {+END}
{+END}

That alone will get rid of the popup.     However, if you'd like to modify the code so that it no longer does the unneeded work of making the popup, since you no longer display it, we start with forum/pages/modules/topicview.php.

Find the following snip of code, and as below, remove the part that sends $posterdetails to the do_template function, as below:

Code (php)

                        if (!is_guest($_postdetails['poster']))
                                {
                                        $poster=do_template('OCF_POSTER_MEMBER',array('_GUID'=>'dbbed1850b6c01a6c9601d85c6aee43f','ONLINE'=>member_is_online($_postdetails['poster']),'ID'=>strval($_postdetails['poster']),'PROFILE_URL'=>$GLOBALS['FORUM_DRIVER']->member_profile_url($_postdetails['poster'],false,true),'POSTER_USERNAME'=>$_postdetails['poster_username'],'HIGHLIGHT_NAME'=>array_key_exists('poster_highlighted_name',$_postdetails)?strval($_postdetails['poster_highlighted_name']):NULL));
                                } else
                                {
                                        $ip_link=((array_key_exists('ip_address',$_postdetails)) && (has_actual_page_access(get_member(),'admin_lookup')))?build_url(array('page'=>'admin_lookup','param'=>$_postdetails['ip_address']),get_module_zone('admin_lookup')):new ocp_tempcode();
                                        $poster=do_template('OCF_POSTER_GUEST',array('_GUID'=>'36a8e550222cdac5165ef8f722be3def','LOOKUP_IP_URL'=>$ip_link,'POSTER_USERNAME'=>$_postdetails['poster_username']));
                                }
 

Then back up above that code, search for the text below…

Code (php)

   // Poster details
            if (!$is_spacer_post)
 

Remove the whole section for the if - else statement.

Note: If you have done the mod to show CPF's under the users avatar, do not remove the whole if - else statement, just remove the code inside the if and the else, as the show CPF's modification uses this logic loop.  
 
Down below that in the do_template function, you can remove:

Code (php)

'POSTER_DETAILS'=>$poster_details,
 

Actually, you can remove it anyway as OCF_POST_TOPIC.tpl doesn't use it. This must have been a 'left over' from when it was handled differently.

There are no pages beneath this page

There are no posts yet

CEDI change-log Post