MyBB Community Forums

Full Version: Two Things
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Okay so I'm wondering how I would go on about changing the Time Spent Online to text for multiple users. I found this by effone and it seems to work, but I don't know how to extend it for 5+ users. If someone can help, I would appreciate it.

I have template conditionals installed, that's how I got it to work. I just don't know how to extend the code for 5 or more users.

<td class="trow2"><strong>{$lang->timeonline}</strong></td>
<td class="trow2">
<if $memprofile['uid'] == 1 then>
Your text here
you can use in_array function
eg. <if in_array($memprofile['uid'], array(a,b,c,d,e)) then> {note: a,b,c,d,e are user IDs}
I suppose you could add one custom user profile field for administrators to set a value on users, then check upon that field so you have a user friendly front-end on/off feature for it.

If you wanna go the complex way.