3.1.x SnippetsSubforum Coloumns

Snippets
Previous topicNext topic
User avatar

Topic Author
Ketchup
Users
Users
Status: Offline
User theme: Dark
Posts: 20
Joined: Jan 16th, '16, 08:13
    Windows 7 Chrome

Subforum Coloumns

Post by Ketchup »

Seeing someone asked for a mod to do this on phpBB i figured i would just spit out a quick template edit that requires no mod, not sure why people don't try and do things like this with phpBB lol.

This is for 3.1.9 and prosilver, you may or will have to adapt it to your custom styles.

Original Post: https://www.phpbb.com/community/viewtop ... #p14499906
Demo: https://gyazo.com/567dc79e42ccd1b0aa985019906a47d4

forumlist_body.html
Find:

Code: Select all

						<!-- IF .forumrow.subforum and forumrow.S_LIST_SUBFORUMS -->
							<!-- EVENT forumlist_body_subforums_before -->
							<br /><strong>{forumrow.L_SUBFORUM_STR}{L_COLON}</strong>
							<!-- BEGIN subforum -->
								<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 -->">{forumrow.subforum.SUBFORUM_NAME}</a><!-- IF not forumrow.subforum.S_LAST_ROW -->{L_COMMA_SEPARATOR}<!-- ENDIF -->
							<!-- END subforum -->
							<!-- EVENT forumlist_body_subforums_after -->
						<!-- ENDIF -->
Replace With:

Code: Select all

						<!-- IF .forumrow.subforum and forumrow.S_LIST_SUBFORUMS -->
							<!-- EVENT forumlist_body_subforums_before -->
							<br /><ul class="subforumcolo">
							<!-- BEGIN subforum -->
							<li><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 -->">{forumrow.subforum.SUBFORUM_NAME}</a><!-- IF not forumrow.subforum.S_LAST_ROW --></li><!-- ENDIF -->
							<!-- END subforum -->
							</ul>
							<!-- EVENT forumlist_body_subforums_after -->
						<!-- ENDIF -->
common.css
Add:

Code: Select all

.subforumcolo {list-style: none; margin: 0; padding: 0;}
.subforumcolo li {width: 50%; float: left;}
You can adjust the width to change how many coloumns you wish to have.
User avatar

maco8024
Users
Users
Status: Offline
User theme: Dark
Posts: 8
Joined: Oct 27th, '14, 09:47
    Windows 10 Chrome

Re: Subforum Coloumns

Post by maco8024 »

User avatar

Topic Author
Ketchup
Users
Users
Status: Offline
User theme: Dark
Posts: 20
Joined: Jan 16th, '16, 08:13
    Windows 10 Chrome

Re: Subforum Coloumns

Post by Ketchup »

Seeing someone asked for a mod to do this on phpBB i figured i would just spit out a quick template edit that requires no mod.

A Majority of people that use phpBB believe they need a mod and(or) addon to do everything for them, even when it comes to very simple and basic template/css edits.
User avatar

martin
Admin
Admin
Status: Offline
User theme: Dark
Posts: 5060
Joined: Apr 6th, '14, 14:12
    Windows 10 Chrome

Re: Subforum Coloumns

Post by martin »

There is a MOD for this it was used on 3.0 :thumbup: back inthe day every one used it if i remember right it also showed a number of how many users was in a forum.
Previous topicNext topic