Online users for administrators or global moderators

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Ideas Centre
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
Grimmjow
Registered User
Posts: 25
Joined: Mon May 26, 2008 8:35 am

Online users for administrators or global moderators

Post by Grimmjow »

Hi, I'd like to make show the "who is online" box only for admins and/or moderators. I wonder if there a way to hack a style in order to do so. I looked for the predefined constants but I didn't find anything specific. I'm not sure but pheraphs some time ago I used U_MCP to accomplish a filter like that, but not sure.

Code: Select all

'SITENAME'
'SITE_DESCRIPTION'
'PAGE_TITLE'
'SCRIPT_NAME'
'LAST_VISIT_DATE'
'LAST_VISIT_YOU'
'CURRENT_TIME'
'TOTAL_USERS_ONLINE'
'LOGGED_IN_USER_LIST'
'RECORD_USERS'
'PRIVATE_MESSAGE_INFO'
'PRIVATE_MESSAGE_INFO_UNREAD'

'S_USER_NEW_PRIVMSG'
'S_USER_UNREAD_PRIVMSG'

'SID'
'_SID'
'SESSION_ID'
'ROOT_PATH'

'L_LOGIN_LOGOUT'
'L_INDEX'
'L_ONLINE_EXPLAIN'

'U_PRIVATEMSGS'
'U_RETURN_INBOX'
'U_POPUP_PM'
'UA_POPUP_PM'
'U_MEMBERLIST'
'U_VIEWONLINE'
'U_LOGIN_LOGOUT'
'U_INDEX'
'U_SEARCH'
'U_REGISTER'
'U_PROFILE'
'U_MODCP'
'U_FAQ'
'U_SEARCH_SELF'
'U_SEARCH_NEW'
'U_SEARCH_UNANSWERED'
'U_SEARCH_ACTIVE_TOPICS'
'U_DELETE_COOKIES'
'U_TEAM'
'U_RESTORE_PERMISSIONS'

'S_USER_LOGGED_IN'
'S_AUTOLOGIN_ENABLED'
'S_BOARD_DISABLED'
'S_REGISTERED_USER'
'S_IS_BOT'
'S_USER_PM_POPUP'
'S_USER_LANG'
'S_USER_BROWSER'
'S_USERNAME'
'S_CONTENT_DIRECTION'
'S_CONTENT_FLOW_BEGIN'
'S_CONTENT_FLOW_END'
'S_CONTENT_ENCODING'
'S_TIMEZONE'
'S_DISPLAY_ONLINE_LIST'
'S_DISPLAY_SEARCH'
'S_DISPLAY_PM'
'S_DISPLAY_MEMBERLIST'
'S_NEW_PM'
'S_REGISTER_ENABLED'

'T_THEME_PATH'
'T_TEMPLATE_PATH'
'T_SUPER_TEMPLATE_PATH'
'T_IMAGESET_PATH'
'T_IMAGESET_LANG_PATH'
'T_IMAGES_PATH'
'T_SMILIES_PATH'
'T_AVATAR_PATH'
'T_AVATAR_GALLERY_PATH'
'T_ICONS_PATH'
'T_RANKS_PATH'
'T_UPLOAD_PATH'
'T_STYLESHEET_LINK'
'T_STYLESHEET_NAME'

'SITE_LOGO_IMG'

'A_COOKIE_SETTINGS'
Last edited by Pit$Bull on Mon Aug 17, 2009 8:40 pm, edited 1 time in total.
Reason: Topic icon changed
CSS colorizer, a script to automatically change colors inside a cascading style sheet.
User avatar
Mick
Support Team Member
Support Team Member
Posts: 22846
Joined: Fri Aug 29, 2008 9:49 am
Location: Watching cricket probably.

Re: Online users for administrators or global moderators

Post by Mick »

Make a backup copy of index_body.html first!!

Open index_body.html and find:

Code: Select all

<!-- IF S_DISPLAY_ONLINE_LIST -->
    <!-- IF U_VIEWONLINE --><h3><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a></h3><!-- ELSE --><h3>{L_WHO_IS_ONLINE}</h3><!-- ENDIF -->
    <p>{TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br />{RECORD_USERS}<br /> <br />{LOGGED_IN_USER_LIST}
    <!-- IF LEGEND --><br /><em>{L_LEGEND}: {LEGEND}</em><!-- ENDIF --></p>
<!-- ENDIF --> 
Replace with:

Code: Select all

<!-- IF U_ACP or U_MCP -->
<!-- IF S_DISPLAY_ONLINE_LIST -->
    <!-- IF U_VIEWONLINE --><h3><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a></h3><!-- ELSE --><h3>{L_WHO_IS_ONLINE}</h3><!-- ENDIF -->
    <p>{TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br />{RECORD_USERS}<br /> <br />{LOGGED_IN_USER_LIST}
    <!-- IF LEGEND --><br /><em>{L_LEGEND}: {LEGEND}</em><!-- ENDIF --></p>
<!-- ENDIF --> 
<!-- ENDIF --> 
Refresh templates etc. etc.
"The more connected we get the more alone we become" - Kyle Broflovski©
Grimmjow
Registered User
Posts: 25
Joined: Mon May 26, 2008 8:35 am

Re: Online users for administrators or global moderators

Post by Grimmjow »

Thank you very much it worked like a charm.
CSS colorizer, a script to automatically change colors inside a cascading style sheet.
Locked

Return to “[3.0.x] Support Forum”