1
shalommemphi
Drop down options in CBB usermenu

How can I remove some of the choices in the userbar option in the forums. I have the uservar ON but do not want all the optios such as YIM, MSN to be clickable. Any help on where or how to edit this would be very helpful!
Helping each other with Knowledge

2
shalommemphi
Re: Drop down options in CBB usermenu

Does anyone have some direction in regards to the Userbar drop down options?????
Helping each other with Knowledge

3
iHackCode
Re: Drop down options in CBB usermenu

i think its in the newbb/language/english/main.php file or the
newbb/class/user.php file, but probably the main.php file i mentioned earlier.. it also had this comment in there.
Quote:
// If you have customized userbar, define here.


*english or some other language
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

4
shalommemphi
Re: Drop down options in CBB usermenu

I'll look in those two and search for that comment. I will let you know..fingers crosses.

The english/main.php file only lets me define the word on how it will read in the drop down userbar.

I didn't see the other file.

I just need to know where the script that controls the actual DROPDOWN USERBAR is at.
Helping each other with Knowledge

5
shalommemphi
Re: Drop down options in CBB usermenu

Maybe a different approach may help to find the answer.

When you select ENABLE USERBAR in the forums just like in this XOOPS site.

Where is the DROPDOWN USERBAR defined if I wish to edit it to NOT include a persons YIM or MSN item in the drop down list?
Helping each other with Knowledge

6
iHackCode
Re: Drop down options in CBB usermenu

yep its in the main.php file.

example: main.php .. defines userbar and links (here is an example from my main.php file)
function &getUserbar()
    {
        global 
$xoopsModuleConfig$xoopsUser$isadmin;
        if (empty(
$xoopsModuleConfig['userbar_enabled'])) return null;
        
$user =& $this->user;
        
$userbar = array();
        
$userbar[] = array("link"=>XOOPS_URL "/userinfo.php?uid=" $user->getVar("uid"), "name" =>_PROFILE);
        if (
is_object($xoopsUser))
        
$userbar[]= array("link"=>"javascript:void openWithSelfMain('" XOOPS_URL "/pmlite.php?send2=1&to_userid=" $user->getVar("uid") . "', 'pmlite', 450, 380);""name"=>_MD_PM);
        if(
$user->getVar('user_viewemail') || $isadmin)
        
$userbar[]= array("link"=>"javascript:void window.open('mailto:" $user->getVar('email') . "', 'new');""name"=>_MD_EMAIL);
        if(
$user->getVar('url'))
        
$userbar[]= array("link"=>"javascript:void window.open('" $user->getVar('url') . "', 'new');""name"=>_MD_WWW);
        if(
$user->getVar('user_icq'))
        
$userbar[]= array("link"=>"javascript:void window.open('http://wwp.icq.com/scripts/search.dll?to=" $user->getVar('user_icq')."', 'new');""name" => _MD_ICQ);
        if(
$user->getVar('user_aim'))
        
$userbar[]= array("link"=>"javascript:void window.open('aim:goim?screenname=" $user->getVar('user_aim') . "&message=Hi+" $user->getVar('user_aim') . "+Are+you+there?" "', 'new');""name"=>_MD_AIM);
        if(
$user->getVar('user_yim'))
        
$userbar[]= array("link"=>"javascript:void window.open('http://edit.yahoo.com/config/send_webmesg?.target=" $user->getVar('user_yim') . "&.src=pg" "', 'new');""name"=> _MD_YIM);
        
//added
        
if($user->getVar('user_xfire'))
        
$userbar[]= array("link"=>"javascript:void window.open('http://www.xfire.com/profile/" $user->getVar('user_xfire') . "', 'new');""name"=> _MD_XFIRE);
        
//end
        
if($user->getVar('user_msnm'))
        
$userbar[]= array("link"=>"javascript:void window.open('http://members.msn.com?mem=" $user->getVar('user_msnm') . "', 'new');""name" => _MD_MSNM);
        return 
$userbar;
    }
}


the code that displays the userbar is.
newbb_thread.html..
<{foreach item=bar from=$topic_post.poster.userbar}>
                <{if 
$bar}>
                <
option value="<{$bar.link}>"><{$bar.name}>option>
                <{/if}>
                <{/foreach}>


so this is how it works.. the links for the userbar is defined in main.php and newbb_thread.html displays the array.

is that it?
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

7
shalommemphi
Re: Drop down options in CBB usermenu

I looked under language/main.php but it only defines items, I am under modules/newbb however it may be I am suing the older newbb2.0 not CBB so maybe the files are different.

However, the code you showed me is exactly what I am trying to locate.....where oh where is it hiding!!

(p.s. Thanks for taking anytime out to try to help me on this)
Helping each other with Knowledge

8
iHackCode
Re: Drop down options in CBB usermenu

ok i downloaded the module..

its in newbb/class/post.php

search for $userbar in that file. its in the '(condition) ? true : false;' format.
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

9
shalommemphi
Re: Drop down options in CBB usermenu

Excellent...I do believe you found it!! Thank You so much. I hope others using the newbb2.0 wanting some control over the userbar dropdown choices will be happy to know where the file is.

Now to email my members that the ability to PM and See profile directly from the forums is back!!

Anyone interested in limiting what choices in the userbar when enabled will be shown can edit the post.php file.

I simply added the // to comment out those items such as YIM and MSMN as shown in the example of the code below, that I didn't wnat to be a clickable item in the forums users dropdown list. I find this the easiest way to modify it and if I ever want to add those items back I can just go back and remove the //.
------------------------------------------------------


if ($xoopsModuleConfig['userbar_enabled']) {
$uname = $eachposter->getVar('uname');
$name = $eachposter->getVar('name');
$uname = (empty($xoopsModuleConfig['show_realname'])||empty($name))?$uname:$name;
$profile_png = newbb_displayImage($forumImage['personal'], _PROFILE);
$pm_png = newbb_displayImage($forumImage['pm'], sprintf(_SENDPMTO, $uname));
$icq_png = newbb_displayImage($forumImage['icq'], _MD_ICQ);
$email_png = newbb_displayImage($forumImage['email'], sprintf(_SENDEMAILTO, $uname));
$aim_png = newbb_displayImage($forumImage['aim'], _MD_AIM);
$home_png = newbb_displayImage($forumImage['home'], _VISITWEBSITE);
// $yim_png = newbb_displayImage($forumImage['yahoo'], _MD_YIM);
// $msnm_png = newbb_displayImage($forumImage['msnm'], _MD_MSNM);

$userbar = (is_object($xoopsUser))? "" . $profile_png . " " . _PROFILE . " ":" ";
$userbar .= (is_object($xoopsUser))? "getVar('uid') . "', 'pmlite', 450, 380);\">" . $pm_png . " " . sprintf(_SENDPMTO, $uname) . " ":" ";
$userbar .= ($isadmin || (is_object($xoopsUser) && $eachposter->getVar('user_viewemail')))? "" . $email_png . " " . sprintf(_SENDEMAILTO, $uname) . " ":" ";
$userbar .= ($eachposter->getVar('url'))? "" . $home_png . " " . _VISITWEBSITE . " ":" ";
$userbar .= (is_object($xoopsUser) && $eachposter->getVar('user_icq'))? "" . $icq_png . " " . _MD_ICQ . " ":" ";
$userbar .= (is_object($xoopsUser) && $eachposter->getVar('user_aim'))? "getVar('user_aim') . "+Are+you+there?' target='_blank'>" . $aim_png . " " . _MD_AIM . " ":" ";
// $userbar .= (is_object($xoopsUser) && $eachposter->getVar('user_yim'))? "" . $yim_png . " " . _MD_YIM . " ":" ";
// $userbar .= (is_object($xoopsUser) && $eachposter->getVar('user_msnm'))? "" . $msnm_png . " " . _MD_MSNM . " ":" ";
}else{
$userbar = '';
}
Helping each other with Knowledge

Login

Who's Online

444 user(s) are online (325 user(s) are browsing Support Forums)


Members: 0


Guests: 444


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits