Hide Blocks From Guests
-
Topic author - Active Member
- Posts: 10
- Joined: 30. March 2009 19:17
- phpBB.com User: AylaAsperger
- Location: Netherlands
Hide Blocks From Guests
I was wondering if it is possible in any way to hide certain blocks from guests. I know the blocks containing news and announcement only have content when the user is logged in and has the permission to see the messages, but I would like to see something similar (i.e. hide the block or at least the content of it) for other blocks like Most Posters, New Members, Team, etc. I hope anyone can help me out!
Re: Hide Blocks From Guests
You can make a switch around the block like this:
Code: Select all
<!-- IF S_USER_LOGGED_IN -->
<!-- INCLUDE portal/block/xyz.html -->
<!-- ENDIF -->
kein Support per PN / Messenger
no Support via PM / Messenger
no Support via PM / Messenger
-
Topic author - Active Member
- Posts: 10
- Joined: 30. March 2009 19:17
- phpBB.com User: AylaAsperger
- Location: Netherlands
Re: Hide Blocks From Guests
Thank you very much, that ought to do it! Could you please also tell me in which file this has to be done?
-
- Dev
- Posts: 2504
- Joined: 17. July 2008 21:08
- phpBB.de User: marc1706
- phpBB.com User: Marc
- Location: Clausthal-Zellerfeld / München
- Contact:
Re: Hide Blocks From Guests
You will have to do this in the HTML files portal_left.html, portal_center.html and portal_right.html, depending on where the blocks are being shown.
-
Topic author - Active Member
- Posts: 10
- Joined: 30. March 2009 19:17
- phpBB.com User: AylaAsperger
- Location: Netherlands
Re: Hide Blocks From Guests
Thank you very much! As the blocks were in an IF clause already I updated the existing IF clause with "and S_USER_LOGGED_IN" instead of adding an extra IF clause. And it worked perfectly!