TinyPortal

General => Chit chat => Topic started by: culpeper on May 22, 2005, 07:17:22 PM

Title: Online Users: Simplicity Theme
Post by: culpeper on May 22, 2005, 07:17:22 PM
Is there a way to hide the OnlineUsers member names on the index page.ÃÆ'ââ,¬Å¡Ãƒâ€šÃ,  I would like to hide the members names for all member groups, except admin and moderators, viewing the board.ÃÆ'ââ,¬Å¡Ãƒâ€šÃ,  Everything else under OnlineUsers is okay.

Also, disabling the Latest Member option under ForumStats is not working.ÃÆ'ââ,¬Å¡Ãƒâ€šÃ, 
Title: Re: Online Users: Simplicity Theme
Post by: Bjørn on May 22, 2005, 07:44:44 PM
uhm....if its only for administrators its easy, but moderators is a bit different. Basically they don't have any group or permission - that is , outside the forum they moderate. So you really need to put them in a "mod" group or something.

To provide the code needed I can help, but i would need a group id, if you are allowing other membergroups than admins to view the users online.

About the latest member option..I don't think it can be hidden..but it can be removed from the template of course.
Title: Re: Online Users: Simplicity Theme
Post by: culpeper on May 22, 2005, 11:50:11 PM
Okay, no problem.  This easiest thing to do will be to just hide the member names to anyone except the adminstrator.  If you can help that would be great! 

Also, I don't think the Latest Member is an issue with Simplicity but an issue with smf.  It wasn't working using the default smf theme before I installed Simplicity.  Just removing that line under ForumStats should suffice if you can point me in the right direction.

Thank you

Title: Re: Online Users: Simplicity Theme
Post by: Bjørn on May 23, 2005, 09:39:38 AM
to show usernames admin-only:
- Find this code in BoardIndex.template.php of Simplicity:
        // Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link.
        if (!empty($context['users_online'])){
                echo '
                               ', implode(', ', $context['list_users_online']);


- replace with this:
        // Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link.
        if (!empty($context['users_online']) && $context['user']['is_admin']){
                echo '
                               ', implode(', ', $context['list_users_online']);


For leaving out the latest member in ForumStats:
-  remove this code from index.template.php:
', $txt[656], ': <b> <a href="', $scripturl, '?action=profile;u=', $modSettings['latestMember'], '">', $modSettings['latestRealName'], '</a></b><br />
Title: Re: Online Users: Simplicity Theme
Post by: culpeper on May 23, 2005, 02:12:37 PM
Thanks, I make the changes tonight after work. :)
Title: Re: Online Users: Simplicity Theme
Post by: culpeper on May 23, 2005, 11:34:28 PM
Okay!  That works good.  Thanks for the help! :D
Title: Re: Online Users: Simplicity Theme
Post by: Bjørn on May 23, 2005, 11:39:18 PM
Good to hear. :)