MyBB Community Forums
[How To?] Two Things - Printable Version

+- MyBB Community Forums (
+-- Forum: 1.8 Support (
+--- Forum: General Support (
+--- Thread: [How To?] Two Things (/thread-226079.html)

Two Things - Smh - 2020-01-16


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

RE: Two Things - .m. - 2020-01-17

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}

RE: Two Things - Omar G. - 2020-01-17

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.