Page 1 of 6

[ABD] Subforum Display Options 0.1.0

Posted: Tue Jun 16, 2009 1:47 pm
by Galaxy21
Modification Name: Subforum Display Options
Author: Galaxy 21

Modification Description:: This mod allows you to choose how subforums are shown on your board. You can choose from default layout (all in a row), 2 cloumn layout or have each subforum shown on a new line (ACP Options).
Modification Version: 0.1.0

Screenshots:
prosilver
Image
Image
Image

SubSilver2
Image
Image
Image

Modification Download: http://www.galaxy21.net/phpbbmods/subfo ... _0.1.0.zip

Note: This mod should work with most prosilver based styles and with subsilver2 based styles, but I can only support prosilver and subsilver2. And of course it produces W3C compliant code. ;)

Re: [BETA] Subforum Display Options 0.0.1

Posted: Tue Jun 16, 2009 1:55 pm
by autinhyeu
Very nice MOD ;)
Thanks!!!

Re: [DEV] Subforum Display Options 0.0.1

Posted: Tue Jun 16, 2009 3:30 pm
by autinhyeu
I had install this MOD, but it don't work :(
My board: http://www.autinhyeu.com/forum/
I had purge the cache, refresh template & theme :)
And 1 issue again: i try change

Code: Select all

Display of subforums:
from Default to 2 columns side by side but it's not changed
Best regards!!!

Re: [DEV] Subforum Display Options 0.0.1

Posted: Tue Jun 16, 2009 3:38 pm
by Galaxy21
Very "colorful" board :)

First of all: After you've installed the mod, if everything went ok, you shouldn't see any change. Because the default setting keeps everything as it is.

Then, this is mainly a template mod with ACP option. Since you have a different template, the problem may lies there.
Is this a prosilver based style you use? The CSS for your style needs the 2 classes "column1" and "column2" for the 2 column layout to work. You should check your CSS files accordingly. Compare it with the original prosilver CSS.

Also, just to test function, test the "Each in new row" option.

Re: [DEV] Subforum Display Options 0.0.1

Posted: Tue Jun 16, 2009 3:46 pm
by autinhyeu
My styles designed base on Subsilver2 :)
I had try change value from "Default" to "Each in new row", but it don't changed :(. It's mean: options always stick at Default value...

Edit: i have go to phpMyadmin to change value config to "Each in new row", it's work with this option :|

Re: [DEV] Subforum Display Options 0.0.1

Posted: Tue Jun 16, 2009 3:51 pm
by Galaxy21
For the subsilver2 style there are different instructions included. Check the contrib directory included in the package.
Also, 2 column layout only works for prosilver. That means, subsilver2 has only 2 options: default and new line.
autinhyeu wrote:I had try change value from "Default" to "Each in new row", but it don't changed :(. It's mean: options always stick at Default value...
You changed it in ACP and it keeps sticking at "default"?
Did you run the SQL?

Re: [DEV] Subforum Display Options 0.0.1

Posted: Tue Jun 16, 2009 3:59 pm
by autinhyeu
Galaxy21 wrote:For the subsilver2 style there are different instructions included. Check the contrib directory included in the package.
Also, 2 column layout only works for prosilver. That means, subsilver2 has only 2 options: default and new line.
Okie ;)
I will try work with styles based on Subsilver2...
Galaxy21 wrote:You changed it in ACP and it keeps sticking at "default"?
Yes, that right!!! :(
Galaxy21 wrote:Did you run the SQL?
Sure :oops:

Re: [DEV] Subforum Display Options 0.0.1

Posted: Tue Jun 16, 2009 4:19 pm
by Galaxy21
autinhyeu wrote:
Galaxy21 wrote:Did you run the SQL?
Sure :oops:
Does this mean, you forgot that? ;)

Re: [DEV] Subforum Display Options 0.0.1

Posted: Tue Jun 16, 2009 4:41 pm
by autinhyeu
No :)
I found a problem in install file... this step:

Find:

Code: Select all

		<input type=\"text\" name=\"config[$key]\" id=\"$key\" value=\"$value\" maxlength=\"30\" />";
	}
Add after:

Code: Select all

	/**
	* Subforum Display Options
	*/
	function subforum_display_options($value, $key = '')
	{
		$radio_ary = array(SUBFORUM_DISPLAY_DEFAULT => 'DEFAULT', SUBFORUM_DISPLAY_CLOUMN => 'COLUMN', SUBFORUM_DISPLAY_NEWROW => 'NEWROW');

		return h_radio('config[subalbum_display]', $radio_ary, $value, $key);
	}
In the code add after, must be:
return h_radio('config[subforum_display]', $radio_ary, $value, $key);
instead:
return h_radio('config[subalbum_display]', $radio_ary, $value, $key);
Best regards!!!

Re: [DEV] Subforum Display Options 0.0.1

Posted: Tue Jun 16, 2009 4:51 pm
by Galaxy21
Ooops... you are right. There is a problem there. :)
I fixed that on my test board but forgot to change it in the install file... :oops:

Re: [DEV] Subforum Display Options 0.0.1

Posted: Tue Jun 16, 2009 4:58 pm
by autinhyeu
Please try to this MOD work perfect with styles subsilver2 based...
Thanks!!!

Re: [DEV] Subforum Display Options 0.0.2

Posted: Tue Jun 16, 2009 5:05 pm
by Galaxy21
I've fixed the little bug and updated the installer package.

Thanks for finding it, autinhyeu.

Re: [BETA] Subforum Display Options 0.1.0

Posted: Thu Jun 18, 2009 9:41 pm
by Galaxy21
Updated 0.1.0 now with full subSilver2 support.

If you wich to update from 0.0.2 do as follows:

OPEN
styles/subsilver2/template/forumlist_body.html

FIND:

Code: Select all

					<p class="forumdesc"><strong>{forumrow.L_SUBFORUM_STR}</strong> 
					<!-- IF forumrow.S_SUBFORUM_DISPLAY === '2' --><br />
						<!-- BEGIN subforum -->
							<a href="{forumrow.subforum.U_SUBFORUM}" class="subforum <!-- IF forumrow.subforum.S_UNREAD is odd -->unread<!-- ELSE -->read<!-- ENDIF -->">{forumrow.subforum.SUBFORUM_NAME}</a><br />
						<!-- END subforum --></p>
					<!-- ELSE -->
						{forumrow.SUBFORUMS}</p>
					<!-- ENDIF -->
REPLACE WITH:

Code: Select all

					<p class="forumdesc"><strong>{forumrow.L_SUBFORUM_STR}</strong> 
					<!-- IF forumrow.S_SUBFORUM_DISPLAY === '1' --></p>
						<table width="100%" cellpadding="0" cellspacing="0">
						<!-- BEGIN subforum -->
							<!-- IF forumrow.subforum.S_ROW_COUNT is odd --><td width="50%"><!-- ELSE --><tr valign="top"><td width="50%"><!-- ENDIF --><a href="{forumrow.subforum.U_SUBFORUM}" class="subforum <!-- IF forumrow.subforum.S_UNREAD is odd -->unread<!-- ELSE -->read<!-- ENDIF -->">{forumrow.subforum.SUBFORUM_NAME}</a><!-- IF forumrow.subforum.S_ROW_COUNT is odd --></td></tr><!-- ELSE --></td><!-- ENDIF -->
						<!-- END subforum -->
						<!-- IF forumrow.subforum.S_ROW_COUNT is even --><td>&nbsp;</td></tr><!-- ENDIF -->
						</table>
					<!-- ELSEIF forumrow.S_SUBFORUM_DISPLAY === '2' --><br />
						<!-- BEGIN subforum -->
							&bull;&nbsp;<a href="{forumrow.subforum.U_SUBFORUM}" class="subforum <!-- IF forumrow.subforum.S_UNREAD is odd -->unread<!-- ELSE -->read<!-- ENDIF -->">{forumrow.subforum.SUBFORUM_NAME}</a><br />
						<!-- END subforum --></p>
					<!-- ELSE -->
						{forumrow.SUBFORUMS}</p>
					<!-- ENDIF -->

Re: [BETA] Subforum Display Options 0.1.0

Posted: Fri Jun 19, 2009 8:59 am
by autinhyeu
Thanks for update ;)
Working great for me ^^

Re: [BETA] Subforum Display Options 0.1.0

Posted: Sat Jul 04, 2009 5:17 am
by Ahri89
Nice mod!! Thanks :D