MyBB Community Forums

Full Version: OUGC Sub-forums in Columns
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
The following will convert this:
[Image: pLeYAaC.png]

Into this:
[Image: OEG5uVN.png]

Template Edits
  • forumbit_subforums
    Find:
    {$lang->subforums}
    Add After:
    <br class="clear" />
  • forumbit_depth3
    Replace:
    <li class="subforum_columns_{$forum['disporder']}">{$statusicon}<a href="{$forum_url}" title="{$forum_viewers_text_plain}">{$forum['name']}</a></li>
    (Basically wrapping with an LI tag and removing the comma.)

Core Edits
./inc/functions_forumlist.php
  • Find:
    	foreach($fcache[$pid] as $parent)
    	{
    Replace:
    	static $subforums_count = null;
    	foreach($fcache[$pid] as $parent)
    	{
    		$subforums_count = null;
  • Find:
    					eval("\$forum_list .= \"".$templates->get("forumbit_depth3", 1, 0)."\";");
    Replace:
    					eval("\$column_list .= \"".$templates->get("forumbit_depth3", 1, 0)."\";");
    
    					isset($subforums_count) or $subforums_count = subforums_count($fcache[$pid]);
    
    					$column_count = (int)$donecount+1;
    					$build_subcolumns = false;
    
    					if($column_count % 3 == 0 || $column_count % 3 == $subforums_count && $subforums_count < 3)
    					{
    						if($column_count % 3 == 0)
    						{
    							$subforums_count -= 3;
    						}
    						else
    						{
    							$subforums_count -= $subforums_count;
    						}
    
    						$build_subcolumns = true;
    					}
    
    					if($build_subcolumns)
    					{
    						$forum_list .= "<ul style=\"list-style: none; margin: 0; float:left;\">{$column_list}</ul>";
    						$column_list = '';
    					}

Patches import XML file:
https://community.mybb.com/thread-167098...pid1370381
To change the number of items per row just change the _3_ for any number (four finds) within the last replacement.

I think this is the most reliable method available for show sub-forums in lists.

Would be better to avoid hard-coded HTML but well..
i dont think this workks for 1.83? All i get is "and four more"?
(2015-02-18, 03:37 AM)expat Wrote: [ -> ]i dont think this workks for 1.83? All i get is "and four more"?

you mean, even after changing "ACP >> Configuration >> Forum Home Options >> Subforums to show on Index listing" to a higher value
Failed to import patches. The file contained errors.


ok, whats happening now?

How can i do a per forum basis for each of the row value?
how i import pacthes please help ?
Hello,

I am French, and I apologize in advance, not fully master the English language. (translation with google)

My test forum is version 1.8.4 I applied the changes to this, but it does not work at all. The sub forums remain on a single column.

The patches (xml) does not work either : Failed to import patches. The file contained errors.

The SubForInCols.php plugins do not work either.

Would you please, a solution for this to work?

Thank you a lot.
Sincerely,
it is best way to show in column in MYBB1.8
Kindly please update this one on how to import the xml patch Sad
How i import patch ?
Pages: 1 2