Automated Simple Catagory Icons
This modification is in the archives.
This is an automated version of these hacks:
Spoiler (click to open)
To automate this somewhat....
make a new plugin on the forumbit_display hook. Code:
$showCustom[$forum['forumid']] = false; if (is_file("path/to/forum/images/statusicon/forum".$forum['forumid']."_new.gif")) { $showCustom[$forum['forumid']] = true; } Code:
<td> <if condition="$vboptions[customimg_enabled] == 1"> <if condition="$forum[customimg] == ''"> <if condition="$showCustom[$forum[forumid]] == true"> <img src="$stylevar[imgdir_statusicon]/forum$forum[forumid]_$forum[statusicon].gif" alt="" border="0" /> <else /> <img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" /> </if> <else /> <img src="$forum[customimg]" alt="" border="0" id="forum_statusicon_$forum[forumid]" /> </if> <else /> <if condition="$showCustom[$forum[forumid]] == true"> <img src="$stylevar[imgdir_statusicon]/forum$forum[forumid]_$forum[statusicon].gif" alt="" border="0" /> <else /> <img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" /> </if> </if> </td> If it works (it does for me) it should replace for forums that have an image in the right folder, otherwise display the default. The best of both worlds ![]() Enjoy! Close
http://www.vbulletin.org/forum/showt...=127426&page=2 by Starbug & Adrian., all credit goes to them for the original concept. Thanks to Brad Flynn for his help also. Also: Thank you to BadgerDog for noticing I missed an ID off one of the find instructions ![]() What it does: Allows you to use a set of custom icons on a per forum basis. No settings needed, the plugin will look for a set of images that meet the conditions I outline in the instructions and display them if they exist. The default VB icons if they don't. NOTE: You will need your forum icons to be named like this: forumx_old.gif forumx_old_lock.gif etc... where x is the forum id number for the new images to work. If you don't, only the defaults will appear. Please Remember to make all 4 icons "new" "old" "new_lock" & "old_lock" an error has been reported that if all 4 don't exist, guests and unregistered may not see the default icons. Instructions: Use either the installer or the plugin to make a new plugin. OR create it yourself on the on the forumbit_display hook. With this code: Code:
$showCustom[$forum['forumid']] = false; if (is_file("path/to/forum/images/statusicon/forum".$forum['forumid']."_new.gif")) { $showCustom[$forum['forumid']] = true; } Code:
<img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" /> Code:
<if condition="$vboptions[customimg_enabled] == 1"> <if condition="$forum[customimg] == ''"> <if condition="$showCustom[$forum[forumid]] == true"> <img src="$stylevar[imgdir_statusicon]/forum$forum[forumid]_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]"/> <else /> <img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" /> </if> <else /> <img src="$forum[customimg]" alt="" border="0" id="forum_statusicon_$forum[forumid]" id="forum_statusicon_$forum[forumid]"/> </if> <else /> <if condition="$showCustom[$forum[forumid]] == true"> <img src="$stylevar[imgdir_statusicon]/forum$forum[forumid]_$forum[statusicon].gif" alt="" border="0" /> <else /> <img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" /> </if> </if> In forumhome_forumbit_level2_post find: Code:
<img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" /> Code:
<if condition="$vboptions[customimg_enabled] == 1"> <if condition="$forum[customimg] == ''"> <if condition="$showCustom[$forum[forumid]] == true"> <img src="$stylevar[imgdir_statusicon]/forum$forum[forumid]_$forum[statusicon].gif" alt="" border="0" /> <else /> <img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" id="forum_statusicon_$forum[forumid]"/> </if> <else /> <img src="$forum[customimg]" alt="" border="0" id="forum_statusicon_$forum[forumid]" /> </if> <else /> <if condition="$showCustom[$forum[forumid]] == true"> <img src="$stylevar[imgdir_statusicon]/forum$forum[forumid]_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]"/> <else /> <img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" /> </if> </if> Download
This modification is archived, downloads are still allowed. |
Similar Mods
Forum Home Enhancements Catagory Icons | vBulletin 3.6 Add-ons |