MyBB Community Forums

Full Version: Making a single forum display like an articles section
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I need a bit of help with my newly launched community http://www.lawstudentscommunity.com

I need to make a single forum (that is the "articles and book reviews" forum display differently - not like a forum, but showing a list of articles / with comments (and having a sidebar with best rated articles).

So how do I enable a new template and how do I populate this template with the forum's content (and respecting the permissions rules etc.) ?

Help greatly appreciated.
Create the template set the way you want the article area to look then create a duplication theme but assign the new template set to it. you can then assign the new theme to the particular forum(s) and it will display like you want.

however, it does require export your current theme/template, modify the names, import them back (simples way to duplicate) and then modify the applicable templates.
(2010-06-24, 04:48 PM)pavemen Wrote: [ -> ]Create the template set the way you want the article area to look then create a duplication theme but assign the new template set to it. you can then assign the new theme to the particular forum(s) and it will display like you want.

however, it does require export your current theme/template, modify the names, import them back (simples way to duplicate) and then modify the applicable templates.

Thanks, pavemen. I am guessing that this would not involve any PHP code.

The reason I ask is because I want change not only to the formatting of the display but also the order in which articles are displayed. Instead of the normal forum setup, I want it to display the summary of the latest 3 articles in the 1st page and a list of best rated articles in the sidebar. Also with a link to all articles at the bottom.

I guess I should write a separate PHP file with the logic of this code?
the more i understand about what you want, it will require some PHP code, either as a plugin or standalone pages. i would recommend standalone fro what I am hearing

build the theme and template the way you want and then create a plugin to generate the data you want in the order you want and use the forumdisplay_start hook to create the actual data to dump into the template variables you create. this is the plugin option and may or may not be easier to do, likely not easier.

go outside MyBB and build your own page(s) and just integrate the MyBB functionality into it. It can be in the MyBB root folder or outside it. See my post in this thread:

http://community.mybb.com/thread-72204.html

just copy/rename forumdisplay.php and start modifying that to meet your needs and utilize custom templates you create for it. Then you don't need to worry about duplicating themes and such as well. Just add your new templates to the template set you are using and go from there.
(2010-06-24, 05:07 PM)pavemen Wrote: [ -> ]the more i understand about what you want, it will require some PHP code, either as a plugin or standalone pages. i would recommend standalone fro what I am hearing

build the theme and template the way you want and then create a plugin to generate the data you want in the order you want and use the forumdisplay_start hook to create the actual data to dump into the template variables you create. this is the plugin option and may or may not be easier to do, likely not easier.

go outside MyBB and build your own page(s) and just integrate the MyBB functionality into it. It can be in the MyBB root folder or outside it. See my post in this thread:

http://community.mybb.com/thread-72204.html

just copy/rename forumdisplay.php and start modifying that to meet your needs and utilize custom templates you create for it. Then you don't need to worry about duplicating themes and such as well. Just add your new templates to the template set you are using and go from there.

Thanks. I'll see about creating a custom page. I don't want to duplicate the content of the forum though, but I see that this can probably be done with a custom page.
It does appear to be a daunting task to edit the MyBB PHP code as it involves a lot of hooks and plugins which I am not sure how it works. I will initially do the template mechanism you suggested initially. Hopefully that will be sufficient for my needs.
doing the template thing will not change the contents of what the mybb pages generate. it will only change how that content is displayed to the user. so the custom page plugin may work but i have not messed with it much when it comes to adding queries and such.

for a true custom page not based on the custom page plugin, its not hard to edit a copy of an existing page to suit your needs. you do not need to add hooks and such as those for for letting plugins manipulate the page/data, which you will not need for your purposes.

i'd copy the index.php page from the mybb root folder, rename it and replace the eixsting code between run_hooks(index_start) and run_hooks(index_end) with your code. then onc eyou have built the templates you want to use, change the templatelist var to use those template names you made. then the page will be integrated into mybb with user, sessions, themes, languages, permissions, etc. but use your code 'in the middle'
Hi, Take a look at the articles link now and see how it is. I did the template edit approach and was reasonably satisfied with the results.

It's not much of an edit, but I managed to make it look more like an articles section and less like a forum.

The real issue is the thread display where I want to separate the first post from the other posts, but it appears not possible in MyBB templating so I've left it like default. Smile
looks good. glad it worked out for you.