MyBB Community Forums

Full Version: User Forum Display Ordering
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This a forum ordering mod...

The front end is a plugin, but the admin cp can't be written as a plugin because there is no hook where the forums are being built in the forum manager.

Usage...

Most times members only visit certain Categories and or Forums that interest them. This mod allows each user to (hide categories or forums, move categories and forums [up or down]), It doesn't use any more queries and is completely controlled by the administrator. The administrator configures what categories and forums can be moved or hidden.

The permission is user group based or if a user group is not allowed access, then a user in that group can still be given access to the control, using the single user over-ride option.


Purpose...

Allow your members easier access to exactly what interests them and also saves a lot of bandwidth by not having to load Categories and or Forums that a member never visits or reads.

Here is demo...

http://forum.ya-right.com/index.php

Once you register, you will see the little screen icon on the forum home under each Category heading, just click on it to access the Forum Ordering Control. I'll leave the demo up for a few days.

I'll post a link to download the mod a little later today, after I write a how to edit the forums.php script in the admincp.
And what about this hook ?
			$plugins->run_hooks("build_forumbits_forum");
LeX- Wrote:And what about this hook ?
			$plugins->run_hooks("build_forumbits_forum");

That's in the function build_forumbits ./inc/functions_forumlist.php which isn't included in the admincp forums.php. I do use that in frontend. The forums.php script uses the function getforums, which has no hooks, even all the hooks that are found in that script under if($mybb->input['action'] == "???"), all run at the start of the if() block so it limits where one could exactly use the hook to do stuff. It would be nice to have hooks at the start and end of major functions() and if() blocks, as adding code or dynamic output usually happens more at the end of a process as opposed to the beginning of a process. I think I will just write another page that does the (hide, move) Categories and or Forums options and just use the $plugins->run_hooks("admin_index_navigation_end"); to add a link to that page. I didn't want to do that because if the disporder is changed in the forum manager there is no way for the mod to know it, that's why I hacked the forums.php function getforums adding my code block to build the dynamic select boxes.

					if ( isset ( $display['id'][$forum['fid']] ) )
					{
						$box = yes_no_select ( $display['move'][$forum['fid']], $display['hide'][$forum['fid']], $forum['fid'] );

						echo ' ' . $box[0];
						echo ' ' . $box[1];
					}

The update process is not a problem, I can use a hook, but there is no way to add dynamic select boxes to the forum manager without hacking the code!
Nice mod there, will use this on my forums!
I must say, this looks really impressive!