MyBB.de Forum

Normale Version: Subforum Bulb [UNMAINTAINED]
Du siehst gerade eine vereinfachte Darstellung unserer Inhalte. Normale Ansicht mit richtiger Formatierung.
Eine neue Erweiterung wurde veröffentlicht: Subforum Bulb [UNMAINTAINED]

Zitat:unmaintained project

I'm sorry to say that this project is no longer maintained by me, because I'm no longer using any subforums in my own forum, therefore I have no more need for this plugin myself.

Since this is Open Source, if you feel like you want to continue this project in my stead, feel free to do so.




This plugin is version 0.6, public BETA (updated 2009-01-09), GPL, for MyBB 1.4.3 & 1.4.4, by Andreas Klauer <Andreas.Klauer@metamorpher.de>

The main goal of this plugin is to implement a more consistent lightbulb behaviour than the current MyBB lightbulb logic. The MyBB logic sometimes marks a parent forum as unread even though there are no new posts. The plugin originated from this bug report: http://community.mybboard.net/thread-40284.html

Optionally, this plugin replaces the read/unread/locked forum indicators (lightbulbs) with indicators that also include the subforum status. Hence the name of the plugin, "Subforum Bulb" (lame excuse for stupid plugin name, I'm sorry). See the attached screenshot to get an idea of what I'm talking about.

It can also sort subforums to show newest unread subforums first, followed by read and locked ones, so new and unread subforums do not get grouped with "and X more subforums" that easily.

For it to work, you have to upload the plugin and the new icon graphics (generated with ImageMagick). Since the plugin replaces a MyBB core function, which can't be done with a hook, you also have to make a change to one line of index.php and forumdisplay.php. So in order to use this plugin you must both be able to upload as well as follow instructions to edit two files.

Since this is a public beta release it may still be buggy. If you are interested in the plugin, please try it, and report any problems. Thank you.

English support thread: http://community.mybboard.net/thread-40381.html
German support thread: http://forum.mybboard.de/thread-11578.html



INSTALLATION INSTRUCTIONS

This plugin is intended for MyBB 1403 only.
For other versions, see if the changes below apply and
update the "compatibility" entry in subforum_bulb_info().

For the plugin to work, you have to change some of the MyBB code.
Without the changes listed below, the plugin simply won't do anything.

Do not forget to undo the changes when uninstalling the plugin.

FILE MODIFICATIONS

In index.php, find this line:

$forum_list = build_forumbits();

Replace it with:

$forum_list = (function_exists("subforum_bulb_build_forumbits")
? subforum_bulb_build_forumbits()
: build_forumbits());

In forumdisplay.php, find this line:

$child_forums = build_forumbits($fid, 2);

Replace it with:

$child_forums = (function_exists("subforum_bulb_build_forumbits")
? subforum_bulb_build_forumbits($fid, 2)
: build_forumbits($fid, 2));

SETTINGS

The behaviour of this plugin can be customized via settings.

This plugin will automatically create a settings group 'Subforum Bulb'
for you when you activate it. It will NOT, however, remove the group
when you deactivate / deinstall the plugin. This way you can keep your
settings, should you choose to activate the plugin again at a later time.

Available settings:

Classic Bulbs: (Default: YES)

When set to YES, Subforum Bulb will stick to the original icons.
In this mode all the plugin does is prevent a parent forum to be
marked as unread when there are actually no new posts (MyBB bugfix).

When set to NO, it will make use of new combined icons that show
the status of the parent forum and the dominant subforum.

Mini Subforum Sorting: (Default: NO)

When set to NO, do nothing.

When set to YES, it will change the order of the subforums in the
mini subforum list (subforum 1, subforum 2, and 3 more) so that it
will show more important subforums first (unread > read > locked).

If you want to uninstall the plugin for good, you can remove the
group 'Subforum Bulb' in the Admin CP 'Configuration'.

CUSTOM ICONS

You will also need to upload new icons to your images folder.
This plugin ships with a set of icons for the standard theme.

The icons distributed with this plugin were generated using ImageMagick
in a Linux shell. This is the command used to generate the icons. If you
have custom icons you may generate the missing ones with something
along these lines:

for a in on off offlock
do
for b in on off offlock
do
# reduce original icon to half the size:
convert "$b".gif -resize "11x11" tmp.gif
# add the half sized icon in the lower right corner:
composite -geometry +11+11 tmp.gif "$a".gif sub"$b"_"$a".gif
# same for mini
convert mini"$b".gif -resize "8x8" tmp.gif
composite -geometry +8+8 tmp.gif mini"$a".gif minisub"$b"_"$a".gif
done
done

After that, upload the gifs to your images folder.