PDA

View Full Version : Case Statement with UserID


mattdonders
06-17-2009, 04:17 PM
Hello,

I cannot find a plugin that will allow us to change the color of different users without placing them in their own separate, secondary usergroup. So my idea was to place this code in the postbit and just edit accordingly. It will basically just change the span around the username based on their UserID. Your help with this would be greatly appreciated:

<?php
switch ($bbuserinfo['userid']) {
case 0:
<span style="color: #ffeab1;">;
case 1:
<span style="color: #ffeab1;">;
case 2:
<span style="color: #ffeab1;">;
default:
<span>;
}
?>

Gio~Logist
06-17-2009, 04:46 PM
Create a plugin in postbit_display_start, and utilize the variable you create in the postbit template. Or if you'd like to just ditch the php, you can always use template conditionals in the postbit template.

https://vborg.vbsupport.ru/showthread.php?t=216367