MThornback
05-07-2007, 10:00 PM
This is an automated version of these hacks:
https://vborg.vbsupport.ru/showthread.php?p=1202535#post1202535
https://vborg.vbsupport.ru/showthread.php?t=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:
$showCustom[$forum['forumid']] = false;
if (is_file("path/to/forum/images/statusicon/forum".$forum['forumid']."_new.gif")) {
$showCustom[$forum['forumid']] = true;
}
In forumhome_forumbit_level1_post find:
<img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" />
Replace with:
<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:
<img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" />
Replace with:
<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>
https://vborg.vbsupport.ru/showthread.php?p=1202535#post1202535
https://vborg.vbsupport.ru/showthread.php?t=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:
$showCustom[$forum['forumid']] = false;
if (is_file("path/to/forum/images/statusicon/forum".$forum['forumid']."_new.gif")) {
$showCustom[$forum['forumid']] = true;
}
In forumhome_forumbit_level1_post find:
<img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" />
Replace with:
<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:
<img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" />
Replace with:
<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>