List subforums differently

For support and discussion related to templates, themes, and imagesets in phpBB 3.2.
Post Reply
ahzmn
Registered User
Posts: 3
Joined: Wed Jul 25, 2018 12:28 pm

List subforums differently

Post by ahzmn » Wed Jul 25, 2018 12:46 pm

Hi people!

I hope that this is the right place for my question:

I would like to reorganize how the subforums are listed. They should be shown underneath each other so that only one subforum per row is shown. I found some code snippets but those where not for the version 3.2.2 and did not work. Does it make sense to edit the forumlist_body.html? If so, what do I need to change to achieve my goal?

Thank you!

User avatar
Mick
Support Team Member
Support Team Member
Posts: 21455
Joined: Fri Aug 29, 2008 9:49 am
Location: Not watching cricket

Re: List subforums differently

Post by Mick » Wed Jul 25, 2018 1:42 pm

Can you post a screen cap of what you mean and a link to a forum where you want this to happen please? It isn’t recommended to edit core code these days, we have extensions instead.
"The more connected we get the more alone we become" - Kyle Broflovski

ahzmn
Registered User
Posts: 3
Joined: Wed Jul 25, 2018 12:28 pm

Re: List subforums differently

Post by ahzmn » Wed Jul 25, 2018 2:23 pm

Thank you for the quick reply!
This is an image to show the desired style:
Subforums.png
An extension with such a functionality would be great :D
The forum is not accessible yet therefore I cannot provide a link, sorry.

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

Re: List subforums differently

Post by Brf » Wed Jul 25, 2018 2:27 pm

Moved to Style Support.
I am assuming you would just go to the "subforum" loop in forumlist_body.html and put a <br /> in there

User avatar
Mannix_
Registered User
Posts: 492
Joined: Sun Oct 25, 2015 2:56 pm
Contact:

Re: List subforums differently

Post by Mannix_ » Wed Jul 25, 2018 2:54 pm

First make a backup of the forumlist_body.html file. Then open that file find

Code: Select all

<!-- EVENT forumlist_body_subforum_link_prepend --><a href="{forumrow.subforum.U_SUBFORUM}" class="subforum<!-- IF forumrow.subforum.S_UNREAD --> unread<!-- ELSE --> read<!-- ENDIF -->" title="<!-- IF forumrow.subforum.S_UNREAD -->{L_UNREAD_POSTS}<!-- ELSE -->{L_NO_UNREAD_POSTS}<!-- ENDIF -->">
and after add

Code: Select all

<br />
just like brf suggested if you want to remove the commas find in line below

Code: Select all

{L_COMMA_SEPARATOR}
and remove it save it upload the new file and purge the cache.

IF you want to do it with css, add this at the bottom of content.css file

Code: Select all

dl.row-item dt .subforum {
    display: list-item;
}
You gonna have to remove the commas for this method in the html file mentioned above
Last edited by Mannix_ on Wed Jul 25, 2018 2:59 pm, edited 1 time in total.
-=-=-=-=-=-=-=-=-=-=-=-=-My Styles-=-=-=-=-=-=-=-=-=-=-=-=-
HexagonHexagonRebornCleanSilverProject Durango
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Want me to port a style to 3.2.x etc. contact me here or on twitter.

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

Re: List subforums differently

Post by Brf » Wed Jul 25, 2018 2:59 pm

If you add the break there, it is in the middle of the anchor. I think I would add it just before the <a

ahzmn
Registered User
Posts: 3
Joined: Wed Jul 25, 2018 12:28 pm

Re: List subforums differently

Post by ahzmn » Wed Jul 25, 2018 3:07 pm

Thanks for the quick help! It looks good. I added the

Code: Select all

<br />
after

Code: Select all

<!-- BEGIN subforum -->
Problem solved.

Post Reply

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