Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
8 - 4 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
   

Re: Drop down options in CBB usermenu
by shalommemphi on 2006/9/2 20:22:34

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))? "<tr><td class='head'><small><a class='newbb_link' href='" . XOOPS_URL . "/userinfo.php?uid=" . $eachposter->getVar('uid') . "' />" . $profile_png . "&nbsp;" . _PROFILE . "</a></small></td></tr> ":" ";
$userbar .= (is_object($xoopsUser))? "<tr><td class='head'><small><a class='newbb_link' href=\"javascript:openWithSelfMain('" . XOOPS_URL . "/pmlite.php?send2=1&to_userid=" . $eachposter->getVar('uid') . "', 'pmlite', 450, 380);\">" . $pm_png . "&nbsp;" . sprintf(_SENDPMTO, $uname) . "</a></small></td></tr> ":" ";
$userbar .= ($isadmin || (is_object($xoopsUser) && $eachposter->getVar('user_viewemail')))? "<tr><td class='head' ><small><a class='newbb_link' href='mailto:" . $eachposter->getVar('email') . "'>" . $email_png . "&nbsp;" . sprintf(_SENDEMAILTO, $uname) . "</a></small></td></tr> ":" ";
$userbar .= ($eachposter->getVar('url'))? "<tr><td class='head' ><small><a class='newbb_link' href='" . $eachposter->getVar('url') . "' target='_blank'>" . $home_png . "&nbsp;" . _VISITWEBSITE . "</a></small></td></tr> ":" ";
$userbar .= (is_object($xoopsUser) && $eachposter->getVar('user_icq'))? "<tr><td class='head' ><small><a class='newbb_link' href='http://www.icq.com/whitepages/search_result.php?search_type=uin&to=%25U&uin=" . $eachposter->getVar('user_icq') . "' target='_blank'/>" . $icq_png . "&nbsp;" . _MD_ICQ . "</a></small></td></tr> ":" ";
$userbar .= (is_object($xoopsUser) && $eachposter->getVar('user_aim'))? "<tr><td class='head' ><small><a class='newbb_link' href='aim:goim?screenname=" . $eachposter->getVar('user_aim') . "&message=Hi+" . $eachposter->getVar('user_aim') . "+Are+you+there?' target='_blank'>" . $aim_png . "&nbsp;" . _MD_AIM . "</a></small></td></tr> ":" ";
// $userbar .= (is_object($xoopsUser) && $eachposter->getVar('user_yim'))? "<tr><td class='head' ><small><a class='newbb_link' href='http://edit.yahoo.com/config/send_webmesg?.target=" . $eachposter->getVar('user_yim') . "&.src=pg' target='_blank'>" . $yim_png . "&nbsp;" . _MD_YIM . "</a></small></td></tr> ":" ";
// $userbar .= (is_object($xoopsUser) && $eachposter->getVar('user_msnm'))? "<tr><td class='head' ><small><a class='newbb_link' href='http://members.msn.com?mem=" . $eachposter->getVar('user_msnm') . "' target='_blank'>" . $msnm_png . "&nbsp;" . _MD_MSNM . "</a></small></td></tr> ":" ";
}else{
$userbar = '';
}
Re: Drop down options in CBB usermenu
by iHackCode on 2006/9/2 3:30:12

ok i downloaded the module..

its in newbb/class/post.php

search for $userbar in that file. its in the '(condition) ? true : false;' format.
Re: Drop down options in CBB usermenu
by shalommemphi on 2006/9/1 18:40:46

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)
Re: Drop down options in CBB usermenu
by iHackCode on 2006/9/1 17:13:17

yep its in the main.php file.

example: main.php .. defines userbar and links (here is an example from my main.php file)
le="color: #000000"><?php 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&amp;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') . "&amp;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..
le="color: #000000"><?php <{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?
Re: Drop down options in CBB usermenu
by shalommemphi on 2006/9/1 15:05:51

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?

Who's Online

234 user(s) are online (177 user(s) are browsing Support Forums)


Members: 0


Guests: 234


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits