Hide Subjects of closed forums in forumlist_body

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

Hide Subjects of closed forums in forumlist_body

Post by voom » Fri Dec 29, 2017 9:16 pm

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: 8054
Joined: Tue Aug 11, 2009 12:45 am
Location: Brazil
Name: Marcus Vinicius
Contact:

Re: Hide Subjects of closed forums in forumlist_body

Post by _Vinny_ » Sat Dec 30, 2017 4:46 am

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 » Sat Dec 30, 2017 9:37 am

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
Christian 2.0
Former Team Member
Posts: 4449
Joined: Wed Nov 04, 2009 11:16 pm
Location: UK
Name: Christian
Contact:

Re: Hide Subjects of closed forums in forumlist_body

Post by Christian 2.0 » Fri Jan 05, 2018 11:30 am

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 » Fri Jan 05, 2018 11:34 am

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: 65310
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Hide Subjects of closed forums in forumlist_body

Post by Lumpy Burgertushie » Fri Jan 05, 2018 8:08 pm

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
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

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 » Fri Jan 05, 2018 8:16 pm

Hi Robert, both did not work...

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51430
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Hide Subjects of closed forums in forumlist_body

Post by Brf » Fri Jan 05, 2018 8:21 pm

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 » Fri Jan 05, 2018 8:25 pm

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

Locked

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

Who is online

Users browsing this forum: No registered users and 8 guests