| We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| Hide stats to guests or members; Either/or | |
|---|---|
| Tweet Topic Started: Jun 21 2010, 09:12 AM (1,367 Views) | |
| VMSimon | Jun 21 2010, 09:12 AM Post #1 |
|
#clowns {float:left;} #jokers {float:right;} #me, #you {position:static;text-align:center;margin:auto;}
![]() ![]() ![]() ![]() ![]()
|
Well, I'm not 100% sure I personally would use this, but there are uses on certain types of forums. -- To hide them to guests, add this to the Above the Copyright" box in board template.
Alternatively, to hide them to Members.
Edited by VMSimon, Jun 21 2010, 10:30 AM.
|
![]() |
|
| Viral | Jun 21 2010, 01:56 PM Post #2 |
![]()
Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Something you might want to do, to be reallly cautious, is, instead of checking the text == "[Log In]", check the URL. There is always the chance that a member could be called [Log In], or in a later update, the text may be changed to Log In, without the brackets, etc. It's better if the code works 100% of the time, rather than 99.9%. Check the URL of the login link and see if it has anything specific, that is notthere if you are logged in. You can't check to see if it contains /login/, as the logout link also has that text in the URL (when you're logged in). Maybe check to see if the URL has /logout, if it does; it's a member, if it doesn't; it's a guest. |
![]() |
|
| TheGrizzlyButcher | Jun 21 2010, 03:34 PM Post #3 |
|
Member
![]() ![]() ![]()
|
I'm sure I'm just missing something, but both codes look exactly the same. What differentiates the two codes? |
![]() |
|
| Reid | Jun 21 2010, 03:50 PM Post #4 |
![]()
È una trappola!
![]()
|
Line two, == vs !=. One hides stats from members, the other hides stats from guests. |
![]() |
|
| VMSimon | Jun 22 2010, 05:57 AM Post #5 |
|
#clowns {float:left;} #jokers {float:right;} #me, #you {position:static;text-align:center;margin:auto;}
![]() ![]() ![]() ![]() ![]()
|
Like this?
|
![]() |
|
| Chule | Jun 22 2010, 02:01 PM Post #6 |
![]()
Member
![]() ![]() ![]()
|
good code, works fine on my board. |
![]() |
|
| rightside | Jun 26 2010, 11:44 AM Post #7 |
![]()
Member
![]() ![]() ![]()
|
thaknks mate, the one for guest works perfect on my forum ![]() haven't tested the one for members. |
![]() |
|
| Real112288 | Jan 29 2012, 07:35 PM Post #8 |
|
Member
![]() ![]() ![]()
|
The second code hides the stats from Admins as well |
![]() |
|
| tobeme | Aug 5 2012, 07:44 PM Post #9 |
|
Member
![]() ![]() ![]() ![]()
|
Is it possible to have these codes work on the portal as well? I'm currently using the 'hide statistics from guest'. Although guests can't see the statistics on the index page but they can still see the statistics on the portal page. |
![]() |
|
| Cory | Aug 5 2012, 08:25 PM Post #10 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Try that to hide the portal stats as well. |
![]() |
|
| tobeme | Aug 6 2012, 07:13 PM Post #11 |
|
Member
![]() ![]() ![]() ![]()
|
Brilliant! Thanks Cory. |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · ZetaBoards Codes & Modifications · Next Topic » |
| Track Topic · E-mail Topic |
2:54 PM Jul 11
|



![]](http://b1.ifrm.com/0/1/0/p601690/pipright.png)









2:54 PM Jul 11