MyBB Community Forums

Full Version: How to arrange sub-forums on the forum home into 2 columns
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
Is it possible to arrange sub-forums on the forum home into 2 columns

And also adding icons next to subforum names
well hey !!

umm
for the icon go to

Admin CP > Templated > Edit > Expand > Forum Bit template > forumbit_depth3

There Add this

<img src="./images/collapse_collapsed.gif" width="9" height="9" border="0"> 

or

<img src="./images/collapse_collapsed.gif"> 

after $comma

(Sure u can put the photo u want).

And that will add it before the name of the sub-forum.

regarding the sec thing i didn't get it acutally

regards

That's fine. But if yo can make a MOD to arranges sub-forums on the forum home into 2 columns that will be great.

Also when a new message on subforum will the picture change or will it stay same?

You can also check my site.

www.amatorbalikci.net/forum

Thank you very much
Quote: Also when a new message on subforum will the picture change or will it stay same?

Actually the general icon is the one which changes!! it's by default in mybb.

Quote: on the forum home into 2 columns

do u mean u wanna have a borderless tables which the subforums are in , so they are far away from each others and they will look like columns ?

actually i dont think you can specify for them to appear in different table cells.


regards
Here is the example from another Bboard software (see the picture)

[Image: subforum.JPG]

and this is the MOD the use for it. If it is possible to fit for the Mybb it will be very very great


What it does
This hack arranges sub-forums on the forum home into 2 columns, makeing large lists of sub-forums more presentable. You can see the before/after in the screenshots attached

Note:
1. You need to enable sub-forum display on the forum home from your vB admin panel
2. This hack is for the forum home page, not forum display.

To enable sub-forums on the forum home page
1. Go to your forum Admin panel
2. Click n Options
3. Select "Forum Listings Display Options" from the drop down list
4. In "Depth of Sub-Forums" replace 0 with 1

Installation
To install, edit the file includes/functions_forumlist.php

1. Find

 foreach($vbulletin->iforumcache["$parentid"] AS $forumid) 


Place this code above it:

 $output .= "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\" ><tr valign=\"top\"> ";
      $cols = 0; 


2. Find

 if (!empty($output))
            {
                $subforum = $splitter["$canpost"] . $subforum;
            }
            if ($depth < $vbulletin->options['subforumdepth'])
            {
                $output .= construct_subforum_bit($forumid, $cancontainthreads, $subforum, $depthmark . '--', $depth + 1);
            }
        }
    }

    return $output;

} 


Replace with

 //sub-forum hack
            if ($depth < $vbulletin->options['subforumdepth'])
                        {
                                $cols++;
                                if ($cols==3)
                                        {
                                        $cols = 1;
                                        $output .=  "</tr><tr>";
                                        }

                        $output .= '<td width="50%">' . construct_subforum_bit($forumid, $cancontainthreads, $subforum, $depthmark . '--', $depth + 1) . "</td>";
                        }
        }
    }

        if ($cols ==1) $output.="<td>&nbsp;</td></tr></table>";
    else $output.="</tr></table>";

        return $output;

}
//end hack 


Template modification (optional)
As this hack will list the sub-forums in a table, the font used is not effected by the <div> tag for subforums, which will cause the default font to be used instead of smallfont.

To use smallfont for sub-forum names, edit the "forumhome_subforumbit_post"

Change (this is the whole template)

 <img class="inlineimg" src="$stylevar[imgdir_statusicon]/subforum_$forum[statusicon].gif" alt="" /> <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>
  

To:

 <img class="inlineimg" src="$stylevar[imgdir_statusicon]/subforum_$forum[statusicon].gif" alt="" /> <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><span class="smallfont">$forum[title]</span></a>

Regards,
well i reached until the sec part!! but over there i think this needs more time, or someone who understand more this php code Confused

regards
Time is yours. It will be a big favour for me also for all. Just waiting your good news.

Thanx for your interest
umm look what i'm thinking of!!

converting a vbulettin into PhpBB > then into MyBB

while you have that mod installed.

i'm not sure if that will convert also the mod!! but it should

so get a free host with vbulettin add that mod , then convert it to phpbb, make sure that the mod is still working, then convert to mybb.

when u convert to mybb, replace forumdisplay which is on ur server with the converted one.

and hope that will work.

regards
I don't think that it will converting the mod.
you know there should be a tool to convert specific files not all the site !!

chaw
Pages: 1 2 3 4