List Subforms Vertically ?

For support and discussion related to templates, themes, and imagesets in phpBB 3.0.
Scam Warning
Locked
Virendar
Registered User
Posts: 41
Joined: Fri Apr 14, 2006 9:14 pm

List Subforms Vertically ?

Post by Virendar »

Hello there. I have a forum, screenshot here : http://i36.tinypic.com/ncio41.jpg

See the subforums ? Example "Bleach, Naruto, Onepiece"

They are all listed horizontally in a line. I would like them to be listed vertically, with an indent. And I want the Subforums to have 1 line space in between them and the forum description.

I used photoshop to illustrate what i want : http://i33.tinypic.com/2zxv3g8.jpg

How can this be achieved ? My style is called : 1thank_green
Virendar
Registered User
Posts: 41
Joined: Fri Apr 14, 2006 9:14 pm

Re: List Subforms Vertically ?

Post by Virendar »

Any ideas ?
User avatar
TheIlluminative
Former Team Member
Posts: 2451
Joined: Thu Jun 26, 2003 11:34 pm
Location: Egypt
Name: Mahmoud
Contact:

Re: List Subforms Vertically ?

Post by TheIlluminative »

You could try this:
Open file: styles/1thank_green/template/forumlist_body.html, find:

Code: Select all

					<!-- IF forumrow.SUBFORUMS and forumrow.S_LIST_SUBFORUMS --><br /><strong>{forumrow.L_SUBFORUM_STR}</strong> {forumrow.SUBFORUMS}<!-- ENDIF -->
replace with:

Code: Select all

					<!-- IF forumrow.SUBFORUMS and forumrow.S_LIST_SUBFORUMS --><br /><br /><strong>{forumrow.L_SUBFORUM_STR}</strong> {forumrow.SUBFORUMS}<!-- ENDIF -->
Open file: includes/functions_display.php, find:

Code: Select all

		$s_subforums_list = (string) implode(', ', $s_subforums_list);
replace with:

Code: Select all

		$s_subforums_list = (string) implode(',<br />', $s_subforums_list);
Refresh templates through ACP after edition.
Virendar
Registered User
Posts: 41
Joined: Fri Apr 14, 2006 9:14 pm

Re: List Subforms Vertically ?

Post by Virendar »

thanks !
Last edited by Virendar on Thu Nov 12, 2009 9:51 am, edited 1 time in total.
User avatar
TheIlluminative
Former Team Member
Posts: 2451
Joined: Thu Jun 26, 2003 11:34 pm
Location: Egypt
Name: Mahmoud
Contact:

Re: List Subforms Vertically ?

Post by TheIlluminative »

How is that?! You must have it, or how the subforums are displayed?!
Search for the code itself, forget about the spaces in the beginning:

Code: Select all

$s_subforums_list = (string) implode(', ', $s_subforums_list);
replace with:

Code: Select all

$s_subforums_list = (string) implode(',<br />', $s_subforums_list);
Virendar
Registered User
Posts: 41
Joined: Fri Apr 14, 2006 9:14 pm

Re: List Subforms Vertically ?

Post by Virendar »

edited my last post** yes it worked.
User avatar
TheIlluminative
Former Team Member
Posts: 2451
Joined: Thu Jun 26, 2003 11:34 pm
Location: Egypt
Name: Mahmoud
Contact:

Re: List Subforms Vertically ?

Post by TheIlluminative »

You might try something like:

Code: Select all

$s_subforums_list = (string) implode(',<br /><span style="padding-left: 71px;"></span>', $s_subforums_list);
Although I'm not sure this is right, PHP-wise .. but it worked for me.
You can change '71' to get exactly the subforums under each other. I tested on original prosilver.
User avatar
mygamebirds
Registered User
Posts: 70
Joined: Thu Apr 29, 2010 7:15 am

Re: List Subforms Vertically ?

Post by mygamebirds »

Excellent mod and it looks great too! How do you remove the "," at the end of each subforum?
User avatar
mygamebirds
Registered User
Posts: 70
Joined: Thu Apr 29, 2010 7:15 am

Re: List Subforms Vertically ?

Post by mygamebirds »

TheIlluminative wrote:You might try something like:

Code: Select all

$s_subforums_list = (string) implode(',<br /><span style="padding-left: 71px;"></span>', $s_subforums_list);
Although I'm not sure this is right, PHP-wise .. but it worked for me.
You can change '71' to get exactly the subforums under each other. I tested on original prosilver.
Is there a way to list the number of posts in each sub-category? Now, it just shows sub-category in a vertical listing, but would be nice to show the amount of posts in each sub.

Thanks.
Locked

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