[split] hide "who is online" and statistics from unregistered users

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
User avatar
mrgtb
Registered User
Posts: 563
Joined: Wed Oct 03, 2007 10:51 am

Re: hide "who is online" and statistics from unregistered users

Post by mrgtb » Thu Aug 31, 2017 10:19 pm

You can edit the template and add <!-- IF S_REGISTERED_USER -->TEMPLATE CODE TO HIDE FROM GUESTS<!-- ENDIF -->

GoesOn
Registered User
Posts: 413
Joined: Sun Mar 05, 2017 7:31 pm

Re: hide "who is online" and statistics from unregistered users

Post by GoesOn » Thu Aug 31, 2017 10:31 pm

mrgtb wrote:
Thu Aug 31, 2017 10:19 pm
You can edit the template and add <!-- IF S_REGISTERED_USER -->TEMPLATE CODE TO HIDE FROM GUESTS<!-- ENDIF -->
Which file? :oops:
English is not my native language :!:

User avatar
P_I
Registered User
Posts: 942
Joined: Tue Mar 01, 2011 8:35 pm
Location: Calgary
Contact:

Re: hide "who is online" and statistics from unregistered users

Post by P_I » Thu Aug 31, 2017 10:49 pm

GoesOn wrote:
Thu Aug 31, 2017 8:44 pm
It's for older php 3.1 i have 3.2.0
I think you've got a reason to update to 3.2.1 then, Invisible users for guests after updating to 3.2.1
Normal people… believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet. – Scott Adams

GoesOn
Registered User
Posts: 413
Joined: Sun Mar 05, 2017 7:31 pm

Re: hide "who is online" and statistics from unregistered users

Post by GoesOn » Thu Aug 31, 2017 10:53 pm

P_I wrote:
Thu Aug 31, 2017 10:49 pm
GoesOn wrote:
Thu Aug 31, 2017 8:44 pm
It's for older php 3.1 i have 3.2.0
I think you've got a reason to update to 3.2.1 then, Invisible users for guests after updating to 3.2.1
I updated it but then I realized that I would start all the work from the beginning, I'm using profiles at the moment and I had no desire to start over from scratch again so I restored it to the version I have now. So to update to new version is something I'm not going to do actually until something smoother comes.
Then I'm pretty sure it will go without updating
English is not my native language :!:

User avatar
mrgtb
Registered User
Posts: 563
Joined: Wed Oct 03, 2007 10:51 am

Re: hide "who is online" and statistics from unregistered users

Post by mrgtb » Fri Sep 01, 2017 7:56 am

GoesOn wrote:
Thu Aug 31, 2017 10:31 pm
mrgtb wrote:
Thu Aug 31, 2017 10:19 pm
You can edit the template and add <!-- IF S_REGISTERED_USER -->TEMPLATE CODE TO HIDE FROM GUESTS<!-- ENDIF -->
Which file? :oops:
Index_body.html is the template to edit.

I do it with two sections on my forum. This will hide STATS for how many users are online from guest but still show online users list to them. But if you login as invisible mode, then guests have no way of knowing you're online because they don't see online 'users stats' (hidden users online, etc)
<!-- IF S_DISPLAY_ONLINE_LIST -->
<div class="stat-block 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>
<!-- EVENT index_body_block_online_prepend -->
<!-- IF S_REGISTERED_USER -->{TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br /><!-- ENDIF -->{RECORD_USERS}<br />
<br />{LOGGED_IN_USER_LIST}
<!-- IF LEGEND --><br /><em>{L_LEGEND}{L_COLON} {LEGEND}</em><!-- ENDIF -->
<!-- EVENT index_body_block_online_append -->
</p>
</div>
<!-- ENDIF -->
And for stats at very bottom. This will hide how many members the forum has and last users that joined from guests. It only display number of threads and posts.
<!-- IF NEWEST_USER -->
<div class="stat-block statistics">
<h3>{L_STATISTICS}</h3>
<p>
<!-- EVENT index_body_block_stats_prepend -->
{TOTAL_POSTS} &bull; {TOTAL_TOPICS}<!-- IF S_REGISTERED_USER --> &bull; {TOTAL_USERS} &bull; {NEWEST_USER}<!-- ENDIF -->
<!-- EVENT index_body_block_stats_append -->
</p>
</div>
<!-- ENDIF -->
You shoud also change permissions so guests cannot view online list page, and members list page as well
Last edited by mrgtb on Fri Sep 01, 2017 8:28 am, edited 1 time in total.

User avatar
mrgtb
Registered User
Posts: 563
Joined: Wed Oct 03, 2007 10:51 am

Re: hide "who is online" and statistics from unregistered users

Post by mrgtb » Fri Sep 01, 2017 8:24 am

If you also wanted to hide Online Users list in the block as well, then you do something like this.
<!-- IF S_DISPLAY_ONLINE_LIST -->
<div class="stat-block 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>
<!-- EVENT index_body_block_online_prepend -->
<!-- IF S_REGISTERED_USER -->{TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br /><!-- ENDIF -->{RECORD_USERS}<br />
<!-- IF S_REGISTERED_USER --><br />{LOGGED_IN_USER_LIST}<!-- ENDIF -->
<!-- IF LEGEND --><br /><em>{L_LEGEND}{L_COLON} {LEGEND}</em><!-- ENDIF -->
<!-- EVENT index_body_block_online_append -->
</p>
</div>
<!-- ENDIF -->

User avatar
KevC
Support Team Member
Support Team Member
Posts: 69422
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: hide "who is online" and statistics from unregistered users

Post by KevC » Fri Sep 01, 2017 8:27 am

Image
-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"

GoesOn
Registered User
Posts: 413
Joined: Sun Mar 05, 2017 7:31 pm

Re: hide "who is online" and statistics from unregistered users

Post by GoesOn » Fri Sep 01, 2017 6:12 pm

KevC wrote:
Fri Sep 01, 2017 8:27 am
Image
Hi, I hard done just as you show in the picture but I just want to make sure we're talking about the same thing. So I want registred users not to be visible to guests. Then when I made the change you show, you could still see members but one thing that was changed, and that was, you could not access their profile and see.
English is not my native language :!:

GoesOn
Registered User
Posts: 413
Joined: Sun Mar 05, 2017 7:31 pm

Re: hide "who is online" and statistics from unregistered users

Post by GoesOn » Fri Sep 01, 2017 6:15 pm

mrgtb wrote:
Fri Sep 01, 2017 7:56 am
GoesOn wrote:
Thu Aug 31, 2017 10:31 pm
mrgtb wrote:
Thu Aug 31, 2017 10:19 pm
You can edit the template and add <!-- IF S_REGISTERED_USER -->TEMPLATE CODE TO HIDE FROM GUESTS<!-- ENDIF -->
Which file? :oops:
Index_body.html is the template to edit.

I do it with two sections on my forum. This will hide STATS for how many users are online from guest but still show online users list to them. But if you login as invisible mode, then guests have no way of knowing you're online because they don't see online 'users stats' (hidden users online, etc)
<!-- IF S_DISPLAY_ONLINE_LIST -->
<div class="stat-block 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>
<!-- EVENT index_body_block_online_prepend -->
<!-- IF S_REGISTERED_USER -->{TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br /><!-- ENDIF -->{RECORD_USERS}<br />
<br />{LOGGED_IN_USER_LIST}
<!-- IF LEGEND --><br /><em>{L_LEGEND}{L_COLON} {LEGEND}</em><!-- ENDIF -->
<!-- EVENT index_body_block_online_append -->
</p>
</div>
<!-- ENDIF -->
And for stats at very bottom. This will hide how many members the forum has and last users that joined from guests. It only display number of threads and posts.
<!-- IF NEWEST_USER -->
<div class="stat-block statistics">
<h3>{L_STATISTICS}</h3>
<p>
<!-- EVENT index_body_block_stats_prepend -->
{TOTAL_POSTS} &bull; {TOTAL_TOPICS}<!-- IF S_REGISTERED_USER --> &bull; {TOTAL_USERS} &bull; {NEWEST_USER}<!-- ENDIF -->
<!-- EVENT index_body_block_stats_append -->
</p>
</div>
<!-- ENDIF -->
You shoud also change permissions so guests cannot view online list page, and members list page as well
Just, I do not want guests to be who online for it is completely uninteresting for my part. Will try this, thanks for the tip.
English is not my native language :!:

Post Reply

Return to “[3.2.x] Support Forum”