Subforums in columns

Looking for an Extension? Have an Extension request? Post your request here for help. (Note: This forum is community supported; while there is an Extensions Development Team, said team does not dedicate itself to handling requests in this forum)
Get Involved
WISHEXEC
Registered User
Posts: 87
Joined: Fri Dec 04, 2015 12:39 pm

Subforums in columns

Post by WISHEXEC » Fri Aug 12, 2016 4:45 pm

I need an extension that can allow to show the subforums in columns

I know it's one already in [DEV] but author dosen't answer and the extension has few problems like
- wrong "," display
- some responsive modification
Last edited by Brf on Fri Aug 12, 2016 4:51 pm, edited 1 time in total.
Reason: Removed solicitation

User avatar
EpicFawker
Registered User
Posts: 30
Joined: Wed Jan 13, 2016 3:13 am

Re: Subforums in columns

Post by EpicFawker » Sun Aug 14, 2016 4:58 am

This is a pretty rough template edit but it works:

This is for 3.1.9 and for prosilver :)

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;}
No mod needed.

WISHEXEC
Registered User
Posts: 87
Joined: Fri Dec 04, 2015 12:39 pm

Re: Subforums in columns

Post by WISHEXEC » Sun Aug 14, 2016 8:44 am

it's very good but ..

that circle is a new thing how can i delete it ?
(">" it's the subforums icons , is it possible to show only the subforum icon ? )

and seems that it changed only in one columns ?
(or is maybe becouse i have sidebar and space is not so big ?)

https://postimg.org/image/a9j7j6lvj/

is it possbile to make 2 columns in normal design (pc, tablete)

and only 1 column in responsive design for phones ?

User avatar
EpicFawker
Registered User
Posts: 30
Joined: Wed Jan 13, 2016 3:13 am

Re: Subforums in columns

Post by EpicFawker » Sun Aug 14, 2016 11:11 pm

WISHEXEC wrote:it's very good but ..

that circle is a new thing how can i delete it ?
(">" it's the subforums icons , is it possible to show only the subforum icon ? )

and seems that it changed only in one columns ?
(or is maybe becouse i have sidebar and space is not so big ?)

https://postimg.org/image/a9j7j6lvj/

is it possbile to make 2 columns in normal design (pc, tablete)

and only 1 column in responsive design for phones ?
You need to adjust the width to make it more or less.

Code: Select all

.subforumcolo li {width: 50%; float: left;}
The 50% is what you need to alter.

User avatar
Elias
Registered User
Posts: 4625
Joined: Sat Feb 25, 2006 4:31 pm
Location: In the Water!
Name: Elias

Re: Subforums in columns

Post by Elias » Mon Aug 15, 2016 3:53 am

Just a heads up:
Without an extension, you'll always have to redo these edits after every phpBB update you do.

Thanks
"Mystery creates wonder, and wonder is the basis of man's desire to understand." - Neil Armstrong
|Installing Extensions|Writing Extensions|Extension Validation Policy|

WISHEXEC
Registered User
Posts: 87
Joined: Fri Dec 04, 2015 12:39 pm

Re: Subforums in columns

Post by WISHEXEC » Sun Jan 15, 2017 10:27 am

I know that , but without an oficial released extension this is the only way .. (as i said , the extension in dev has problems)

I used this on 3.1.9

I updated to 3.2

Is still the code valid for 3.2 ? (I don't want to breack something)

User avatar
battye
Extension Customisations
Extension Customisations
Posts: 10940
Joined: Wed Feb 11, 2004 11:02 am
Location: Australia
Contact:

Re: Subforums in columns

Post by battye » Wed Apr 24, 2019 2:17 pm

You could use this, which is in the CDB: https://www.phpbb.com/customise/db/exte ... rumimages/
Customisations Team Member

https://github.com/battye/php-array-parser - Give it a Star! :D

webants
Registered User
Posts: 75
Joined: Sat Jan 07, 2006 8:42 pm

Re: Subforums in columns

Post by webants » Fri Nov 08, 2019 1:55 pm

Any way to get this working for 3.2.8? i would like at least 2 columns because i have so many forums within the categories:

klassiekerplein.nl

User avatar
Gumboots
Registered User
Posts: 172
Joined: Fri Oct 11, 2019 1:59 am

Re: Subforums in columns

Post by Gumboots » Fri Nov 08, 2019 2:32 pm

Yeah it's a piece of cake. I've just done it. Basically, all you have to do is set the subforum links to display: inline-block; in your CSS, and then decide what width you want them. I went to two columns at 47% each.

You'll also need a small markup hack, because the template has hard-coded commas after the subforum names, and they'll look like crap with the column arrangement. It's literally just a matter of deleting one comma from the template:

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 -->">
									<i class="icon <!-- IF forumrow.subforum.IS_LINK -->fa-external-link<!-- ELSE -->fa-file-o<!-- ENDIF --> fa-fw <!-- IF forumrow.subforum.S_UNREAD --> icon-red<!-- ELSE --> icon-blue<!-- ENDIF --> icon-md" aria-hidden="true"></i>{forumrow.subforum.SUBFORUM_NAME}</a><!-- IF not forumrow.subforum.S_LAST_ROW -->{L_COMMA_SEPARATOR}<!-- ENDIF --><!-- EVENT forumlist_body_subforum_link_append -->
See that last IF with the comma inside it? You just delete that, so it becomes:

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 -->">
									<i class="icon <!-- IF forumrow.subforum.IS_LINK -->fa-external-link<!-- ELSE -->fa-file-o<!-- ENDIF --> fa-fw <!-- IF forumrow.subforum.S_UNREAD --> icon-red<!-- ELSE --> icon-blue<!-- ENDIF --> icon-md" aria-hidden="true"></i>{forumrow.subforum.SUBFORUM_NAME}</a><!-- EVENT forumlist_body_subforum_link_append -->
Easy. ;)

ETA: Oh yeah, the actual CSS I'm using is this:

Code: Select all

.list-inner>.subforum {
	display: inline-block;
	width: 47%;
	padding: 4px 0 0;
	vertical-align: top;
}
If you wanted three columns, set it to 30%. If you want more than three columns make sure you only view it on wide screens, because it'll be a mess on anything under 1024.

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

Re: Subforums in columns

Post by Mannix_ » Fri Nov 08, 2019 2:51 pm

webants wrote:
Fri Nov 08, 2019 1:55 pm
Any way to get this working for 3.2.8? i would like at least 2 columns because i have so many forums within the categories:

klassiekerplein.nl
Use the extension linked by battye in a post above yours don't mind that it says it's for 3.2.4.
-=-=-=-=-=-=-=-=-=-=-=-=-My Styles-=-=-=-=-=-=-=-=-=-=-=-=-
HexagonHexagonRebornCleanSilverProject Durango
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Want me to port a style to 3.2.x etc. contact me here or on twitter.

webants
Registered User
Posts: 75
Joined: Sat Jan 07, 2006 8:42 pm

Re: Subforums in columns

Post by webants » Fri Nov 08, 2019 3:19 pm

that ext above is for image alone right? not to make forums display as columns?

webants
Registered User
Posts: 75
Joined: Sat Jan 07, 2006 8:42 pm

Re: Subforums in columns

Post by webants » Fri Nov 08, 2019 3:27 pm

hej gumboots what css did you add that?

and it does not work on my forum?

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

Re: Subforums in columns

Post by Mannix_ » Fri Nov 08, 2019 3:29 pm

webants wrote:
Fri Nov 08, 2019 3:19 pm
that ext above is for image alone right? not to make forums display as columns?
yeah sorry I miss read what was it try this viewtopic.php?p=13713326#p13713326
-=-=-=-=-=-=-=-=-=-=-=-=-My Styles-=-=-=-=-=-=-=-=-=-=-=-=-
HexagonHexagonRebornCleanSilverProject Durango
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Want me to port a style to 3.2.x etc. contact me here or on twitter.

webants
Registered User
Posts: 75
Joined: Sat Jan 07, 2006 8:42 pm

Re: Subforums in columns

Post by webants » Fri Nov 08, 2019 3:33 pm

that one is not for 3.2.8 and it does not work with the php file needed to be eddited :twisted:

User avatar
Gumboots
Registered User
Posts: 172
Joined: Fri Oct 11, 2019 1:59 am

Re: Subforums in columns

Post by Gumboots » Fri Nov 08, 2019 3:40 pm

webants wrote:
Fri Nov 08, 2019 3:27 pm
hej gumboots what css did you add that?
Which file? I'm running it in a custom file, but for Prosilver it should be fine if you just tack it on the end of responsive.css.
and it does not work on my forum?
Sounds exciting. Got a link?

Post Reply

Return to “Extension Requests”