List Subforms Vertically ?

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

List Subforms Vertically ?

Post by Virendar » Wed Nov 11, 2009 5:15 am

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 » Wed Nov 11, 2009 11:16 pm

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 » Wed Nov 11, 2009 11:36 pm

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 » Thu Nov 12, 2009 9:46 am

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 » Thu Nov 12, 2009 9:49 am

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 » Thu Nov 12, 2009 9:52 am

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 » Thu Nov 12, 2009 10:07 am

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 » Sun May 02, 2010 10:13 pm

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 » Thu May 06, 2010 12:55 am

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”