MyBB Hacks

Full Version: Secondary description for each forum
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi.

We already knew that forums in MyBB has a description ($forum['desc']).

I did a little modification in the functions_forumlist.php, to make a secondary description for each forum, for example.

I have a forum A - id 1 - main description A1 and secondary desc is A2

A2 will be defined inside global.lang.php, with the forum id like

PHP Code:
$l['forum_desc_1'] = "ABC";



In the functions_forumlist.php I want something this:

PHP Code:
$minidesc = $lang->forum_desc_$fid;


Then I can put {$minidesc} everywhere in the forumbit template...

I know about Xthread, but every forum has one template is quite silly... You know

Please give me some suggestions. Thanks in advanced.

I seriously don't know why you'd do this, but the syntax is

PHP Code:
$minidesc = $lang->{"forum_desc_$fid"};

Thanks, works now.

Still need to set

PHP Code:
$fid = $forum['fid'];

Reference URL's