Hide Subjects of closed forums in forumlist_body

For support and discussion related to templates, themes, and imagesets in phpBB 3.1.
Suggested Hosts
voom
Registered User
Posts: 59
Joined: Tue Mar 22, 2016 1:31 am

Hide Subjects of closed forums in forumlist_body

Post by voom »

Users who are not members of a group to see a specific forum still can see the topic of the last thread in the forumlist. The forum should be seen as existant, but not give away such insight into contents to other members. How can I achieve that?

I use phpBB 3.1, I suppose the specific theme is irrelevant. My idea is something like:

<!-- IF CAT_ID/FORUM_ID is not xyz -->
show the subject and last poster ect.
<!-- ENDIF -->

Is there a correct syntax to achieve this? It should either be a whole category or a list of forums that should be excluded by this condition.

Any help appreciated... :)
User avatar
_Vinny_
Style Customisations
Style Customisations
Posts: 10269
Joined: Tue Aug 11, 2009 12:45 am
Location: Brazil
Name: Marcus Vinicius

Re: Hide Subjects of closed forums in forumlist_body

Post by _Vinny_ »

Have you set the forum permissions correctly for this group?
voom
Registered User
Posts: 59
Joined: Tue Mar 22, 2016 1:31 am

Re: Hide Subjects of closed forums in forumlist_body

Post by voom »

I believe so, the group has standard rights, all others members may only see forum and guests may not even see forum. Guests are fine, but members, as they can see forum (but not read contents) can see the "last topic" in the forum_list views. It looks to me as this is the way it is set as default, and I find no detailed rights for that part. Or is it set differently in the standard themes?
User avatar
PlanetStyles.net
Former Team Member
Posts: 4809
Joined: Wed Nov 04, 2009 11:16 pm
Location: Way up in the sky close to the stars
Name: Christian

Re: Hide Subjects of closed forums in forumlist_body

Post by PlanetStyles.net »

In case you're sure it's not a permissions issue, you can use the following IF statement in your forumlist_body.html file:

Code: Select all

<!-- IF forumrow.FORUM_ID != 'xx' --><!-- ENDIF -->
Wrapping this around the last topic title code will prevent it from displaying. But, check permissions first as that's the most likely cause :)
voom
Registered User
Posts: 59
Joined: Tue Mar 22, 2016 1:31 am

Re: Hide Subjects of closed forums in forumlist_body

Post by voom »

Thank you! :) I cannot find any permissions that I could change any more, it may be a bug in the theme that is used though...

Edit: so this works well, but only removes the subjects from the forumlist within the forum where the resp. subforums are direct children. From within the category or in the forums overview the newest post subject from all of those closed forums can still be seen. I cannot find the template where I need to add the resp. lines.
Edit2: solved that last edit, looked at it the wrong way, needed to exclude the category like the subforums the same way the same place... ;)

What remains:
Is there a way to avoid stacking multiple lines with single forum IDs for multiple forums to exclude?
User avatar
Lumpy Burgertushie
Registered User
Posts: 69228
Joined: Mon May 02, 2005 3:11 am

Re: Hide Subjects of closed forums in forumlist_body

Post by Lumpy Burgertushie »

try this:
<!-- IF forumrow.FORUM_ID != 'xx' or 'yy' or 'bb' --><!-- ENDIF -->
or
<!-- IF forumrow.FORUM_ID != 'xx' or != 'yy' or !='bb' --><!-- ENDIF --> etc.
haven't tested but it should be one of those.


robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
voom
Registered User
Posts: 59
Joined: Tue Mar 22, 2016 1:31 am

Re: Hide Subjects of closed forums in forumlist_body

Post by voom »

Hi Robert, both did not work...
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53568
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}

Re: Hide Subjects of closed forums in forumlist_body

Post by Brf »

I am sure you mean

Code: Select all

<!-- IF forumrow.FORUM_ID != 'xx' and   forumrow.FORUM_ID != 'yy'  and   forumrow.FORUM_ID !='bb' --><!-- ENDIF -->
If you use "or" in there it will always be != to one or the other ;)
voom
Registered User
Posts: 59
Joined: Tue Mar 22, 2016 1:31 am

Re: Hide Subjects of closed forums in forumlist_body

Post by voom »

So true @Brf :) But if I need to add "forumrow.FORUM_ID !=" every time it does not save much except it is a little more elegant and I don't need multiple ENDIFs

Return to “[3.1.x] Styles Support & Discussion”