[For 1.8] OUGC Sub-forums in Columns
#1
Bug 
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
Reply
#2
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..
Reply
#3
i dont think this workks for 1.83? All i get is "and four more"?
Reply
#4
(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
We can't help everyone, but everyone can help someone - Ronald Reagan
Did you know? Your question has already been answered. But you haven't searched it yet.
Don’t  Forget to “Mark as Solved” after the fix
Reply
#5
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?
Reply
#6
how i import pacthes please help ?
Reply
#7
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,
Reply
#8
it is best way to show in column in MYBB1.8
Reply
#9
This user has been denied support. This user has been denied support.
Kindly please update this one on how to import the xml patch Sad
Reply
#10
How i import patch ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)