The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Automated Simple Catagory Icons Details »» | |||||||||||||||||||||||||
This is an automated version of these hacks:
https://vborg.vbsupport.ru/showthrea...35#post1202535 https://vborg.vbsupport.ru/showthrea...=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> Show Your Support
|
Comments |
#12
|
|||
|
|||
I don't see a huge difference between installing a product or a plugin...it makes no difference to the function of the mod? Its just the difference between what link you click on and scrolling
If your using mine and his in conjunction...you need to edit his plugin on the forumbit_display hook to the instructions specs and do the template edits...otherwise you can uninstall his and install my plugin (no real loss of function on the front end...and probably recommended for the inexperienced updater rather than editing the plugin) |
#13
|
|||
|
|||
Installed.... (well, to be absolutely correct, just installing it)...
Thanks... nice mode and a good add-on to vBulletin... :up: Regards, Badger |
#14
|
|||
|
|||
Update... works fine... :up:
.... but, to get it to work on my server, I had to duplicate and put the exact same GIF files in two different places? /forum/images/statusicon/ and /forum/images/import/statusicon/ Is there a reason for this, or have I missed something? Nice code and if I add the third "locked" icon that matches, it creates a really nice custom approach. Thanks Regards, Badger |
#15
|
|||
|
|||
Do you direct one of your styles to a custom folder? That would be the only reason it would be affected
|
#16
|
|||
|
|||
If anyone is able to tell me what file deals with this...i'll take a look at it and see if I can come up with something
|
#17
|
|||
|
|||
Quote:
I use a custom style, so I bet that's it. :up: Therefore, for clarity, I shouild make sure that I put all of the GIF files in both areas because of this? Thanks Regards, Badger |
#18
|
|||
|
|||
by default vb pulls the status icons from images/statusicon/*.gif, each style which defines a separate path, would needs separate gifs. Just bear in mind there is more in that folder than your category images that needs to be copied over for each custom path (things that vb needs, not this hack)
So yes |
#19
|
|||
|
|||
Ok, not sure if this is a design thing or a bug....
If I elect only to use one GIF icon for a forum, (ie: forum30_new.gif) and not use the reciprocal "forum30_old.gif", instead letting vBulletin use its default, then I get a RED X problem. Did I misunderstand the default situation? If there isn't a forumX_(old, new). gif, then I thought the code would let it slide so the system would use the default? It appears to be looking for _old, only because I installed an _new file? Thanks Regards, Badger |
#20
|
|||
|
|||
The way its setup it dosen't support splitting the difference between both ways. If one exists the other is expected to exist as well.
|
#21
|
|||
|
|||
Quote:
Thanks... I assume that you don't need a "lock" gif version in order to have the default lock icon display, or does it also have to be present if the any of the other two are there, in order to avoid the RED X? Regards, Badger |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|