The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
need if conditional....
For this chat script, I need an if conditional so when there are no names to display, it says "No members in Chat".
Also, if you can figure out how to use the usergroup html markup for usernames (ex: like bold names for usergroups that have bold names in online box) that would be great. --------------------------------------------- function usersinroom( $room = "" ) { $cms = $GLOBALS['fc_config']['cms']; $list = array(); if($room) { $stmt = new Statement("SELECT userid, state, color, lang, roomid FROM {$GLOBALS['fc_config']['db']['pref']}connections WHERE userid IS NOT NULL AND roomid=?"); $rs = $stmt->process($room); } else { $stmt = new Statement("SELECT userid FROM {$GLOBALS['fc_config']['db']['pref']}connections WHERE userid IS NOT NULL"); $rs = $stmt->process(); } while($rec = $rs->next()) $list[] = array_merge($cms->getUser($rec['userid']), $rec); return $list; } ------------------- then is says: ------------------- $users = usersinroom(); $arr = array(); foreach( $users as $user ) { echo "<a href=\"member.php?userid=$user[userid]\">$user[login]</a>"; } ========================= thanks |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|