MyBB Community Forums

Full Version: A little CMS plugin (still sorta in beta)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey everyone,

This is what I've been working on today. I guess its in a state that I can throw it out there so people can play with it and give me some feedback but there are still one or two things missing to call it finished. It'll also probably contain some nasty bugs seeing I haven't really tested it yet.

I'm also not to happy about how I solved a few things, especially the way the javascript is embedded into this thing, but hey I'm new to myBB so I don't know how to do things the right way yet, I'm also no javascript expert Big Grin

So what is it? Its a simple little menu based CMS system based on what I was using for the old version of my site. Basically you take a category and each subforum in the category becomes a menu on the header. Each sub subforum and each topic in the subforum becomes a menu line that the user can click on. The link it brings you to can be configured. Right now its configured by default to two pages I have yet to write but you could simply direct them to the myBB forum and thread views and it would be fully functional.

The idea for the two files I still have to write are to create simple read only portal type thingies.

Optional, if you have a topic with a single post simply containing a link, that link will be used. The detection whether the post only contains a link is pretty weak though.

The order in which menus are displayed is alfabetical but it will strip any text before a semicolon so you can use that to control the order, dirty but it works.
Also it will try to find an icon gif file by the same name as the subforum/topic to display (spaces are underscored), if it doesn't exist it defaults to the two icons I've included in the zip file.
I ripped the icons off of some site, no idea if there is any copyright on them, I don't think so but since I can't remember where I got them from I can't be sure.

Anyways, play around with it and let me know what you think Smile
thanks bastiaan .
Be aware that it's /inc/plugins not /inc/plugin Toungue

Typically, if you want to add Javascript functions, include a separate .js file, and modify the headerinclude template.

Good luck!
Roy, your welcome, let me know if you find it usefull Smile

Zinga, thanks for that. I'll make sure both changes are included in the next release ! Smile
gonna check it out,, looks nice one Smile
thanks man
Wondering if anyone could make a suggestion here, working on next version for this and building in security stuff to only show subforums that have viewable rights.

What I was expecting was to be able to add a category that doesn't have any rights for anyone but admin so it only appears for an admin, but give the subforums in it view rights and then have my plugin use that. But it seems that once you disable view rights on the category, that drills down to any subforum regardless of what you set in for those subforums.

Did I set it up wrong or is this just the way it works?
Ok, figured out my security issue wasn't with myBB asfar as how it worked went, but because I started using get_unviewable_forums in a certain way within my plugin when building the menu system, it messed something up.

So thats disabled for now, not to happy about that. Will fix that some day when I learn more about whats going on..

Anyways I'll upload version 1.1 on the first post in a minute. Loads has changed, menu building is enhanced, creates a number of new templates, and I've created my view thread and view forum scripts. Very basic and simple, probably can be done 10x better but I'm new to this Smile