View Full Version : Simple Category Icons
StarBuG
02-07-2007, 10:00 PM
Ok folks.
For all of you who want Category Icons including the "new post", "no new post", "forum closed" capabilities, here is a quick and simple solution provided by Andreas (https://vborg.vbsupport.ru/member.php?u=47102)
What this hack does: Instead of the standard forum icons like
https://vborg.vbsupport.ru/external/2011/08/21.gif or https://vborg.vbsupport.ru/external/2011/07/4.gif, ... you can now have separat status icons for every forum you have. It is that simple ;)
Templates forumhome_forumbit_level_...
search:
<img src="$stylevar/forum_$forum[statusicon].gif" alt="" border="0" />
Replace with
<img src="$stylevar[imgdir_statusicon]/forum$forum[forumid]_$forum[statusicon].gif" alt="" border="0" />
then create/name your images like this:
forumID_new.gif, forumID_old.gif,...
Example: forum1_new.gif
If you want to have different icons for subforums on forumhome as well:
http://img409.imageshack.us/img409/3273/subforumbh0.gif
In [I]forumhome_subforumbit_nopost and forumhome_subforumbit_post
search for:
<img class="inlineimg" src="$stylevar[imgdir_statusicon]/subforum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" />and replace it with:
<img class="inlineimg" src="$stylevar[imgdir_statusicon]/subforum$forum[forumid]_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" />Name your images like:
subforumID_old.gif
subforumID_new.gif
Example: subforum22_old.gif
I don't use this hack so I have no screenshots, but If anyone is trying this, it would be cool if you could provide some screenshots.
Remember to click installed ;)
Greetings
StarBuG
sandsand
02-08-2007, 07:53 PM
Very simple. :)
A quick suggestion would be an optional other code to use an array of forums that get different icons. I just set this up that way and can post my code & screenshots when I'm done making icons if you'd like.
StarBuG
02-09-2007, 07:54 AM
Of course
Feel free to post it here ;)
farukcan
02-10-2007, 02:53 PM
very good.... install
Coleccromos
02-12-2007, 10:09 PM
This one can make for the sub forums?
StarBuG
02-13-2007, 06:36 AM
Yes
Simply replace the above code in all 4 forumhome_forumbit_level_
templates and you are good.
Coleccromos
02-13-2007, 08:57 PM
https://vborg.vbsupport.ru/
Thank you for the help but me refer to the sub forums pointed out in red in the image.
Is it possible to make this?
993ti
02-13-2007, 09:52 PM
Would like this but i have lots of forums.
Is there a way so that forums that don't use different icons use the default onces without adding/renaming lots of the same icons?
BigJimTheLug
02-14-2007, 02:32 AM
Thanks, I've been looking for this.
StarBuG
02-14-2007, 06:58 AM
@Coleccromos:
In forumhome_subforumbit_nopost and forumhome_subforumbit_post
search for:
<img class="inlineimg" src="$stylevar[imgdir_statusicon]/subforum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" />
and replace it with:
<img class="inlineimg" src="$stylevar[imgdir_statusicon]/subforum$forum[forumid]_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" />
Name your images like
subforumID_old.gif
subforumID_new.gif
@993ti:
Sorry there is not. This is a simple solution for having different forum icons, not a full blown hack ;)
StarBuG
Sofia
02-14-2007, 03:54 PM
Thanks for this modification...Install
Playa82
02-16-2007, 08:54 AM
http://img409.imageshack.us/img409/3273/subforumbh0.gif
Thank you for the help but me refer to the sub forums pointed out in red in the image.
Is it possible to make this?
Try this, it's easier:
https://vborg.vbsupport.ru/showthread.php?t=138545
StarBuG
02-16-2007, 07:09 PM
Your "version" does not replaces the standard images vBulletin uses, which is the whole point of this hack. If you put a link into the forum description text it also displays the image in the forum description above the threads on forumdisplay which can break the design or look not that good depending on the size of the images.
If you put the link into the forum title field (which has a character limit and could make image links impossible) it shows up in the breadcroumb and other places as well.
Example: http://crackmuzik-gfx-elite.de/forumdisplay.php?f=116
Also your suggestion does not have different status images (no new posts/new posts).
It is possible to add images into forum descriptions/titles, yes.
But if it is easier depends on the point of view I think and the number of forums ;)
And it defenetly has nothing to do with what my code does :p
StarBuG
Clayton
02-20-2007, 04:59 PM
I must be losing the plot because for the life of me I can't find this
<img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" />
in those templates
ps.. i have edited these templates previously to change the alt1 and alt2 due to changing last column and thread and post columns around
StarBuG
02-20-2007, 05:27 PM
Search for
forum_$forum[statusicon].gif
Clayton
02-20-2007, 05:30 PM
nope not found
I don't know what is going on here because those icons are showing
edit: i even checked for this in other forums and i couldn't find it .. would using a different postbit legacy make a difference?
hippiesimz
03-02-2007, 02:46 AM
if i use this plugin, is it gonna be similar to this one.. because i want my forum to be like this, but i really dont know which addon i have to do...
http://aycu14.webshots.com/image/9693/2001825609680817701_rs.jpg (http://allyoucanupload.webshots.com/v/2001825609680817701)
thanks..
StarBuG
03-02-2007, 03:40 AM
@Clayton: send me your postbit template and I will have a look
@hippiesimz: No
This plugin would replace the blue ball from your screenshot with a picture.
I can release a hack for how to get the picture on the right/left site of the description like on my forum www.elternfragen.net.
But I don't know when I find the time.
Maybe today, maybe this weekend, maybe next week.
Check my profile for a new hack now and then ;)
6piston
03-07-2007, 08:14 AM
thanks for the great stuff starbug
here's something for all
Here's the link:
http://www.zerotohundred.com/newforums
here's the screenshot anyway:
http://www.zerotohundred.com/forumspage.jpg
StarBuG
03-07-2007, 11:02 AM
@Tom
And you are not using the potential of this hack.
Why not have a second icon for forums which are read. You could use a grey version of each icon to show the visitor that there is no new post in a specific forum ;)
StarBuG
6piston
03-08-2007, 05:51 AM
hi starbug,
well i could batch convert the _old icons to grey.
i just dunno if i should. having some grey-er icons and all... don't wanna spoil the look you know..
hmm, i could try adding a star or some sort to the _new icons instead
but grey icons would make a significant difference to the look
i am also going to do the sub cat too :)
thanks again for your hack! :)
Tom
vuiveclub_net
03-13-2007, 05:25 AM
A sample site for this code: http://giaitri.homeip.net/vb/
MThornback
03-13-2007, 01:53 PM
To automate this somewhat....
make a new plugin on the forumbit_display hook.
$showCustom[$forum['forumid']] = false;
if (is_file("path/to/forum/images/statusicon/forum".$forum['forumid']."_new.gif")) {
$showCustom[$forum['forumid']] = true;
}
In the template edits, replace the authors code with this (its still the authors code...which is why i'm not releasing it as my own...its just moved around and with a few conditionals):
<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!
Staxed
03-13-2007, 02:48 PM
please upload a text file :D
MThornback
03-13-2007, 03:08 PM
I'm gonna leave that to the author...its his code, I just tweaked it :D
consolegaming
03-18-2007, 09:00 PM
Hi, MThornback your suggested code didn't seem to work it just showed the default icons and nothing else. Any idea what could have caused this? I was using png's (i.e. changing all the extensions in the extract of code to png except for the final one for the default icon) but to test it I tried it all with gifs and it still did same.
Also is the closing t tag meant to be there? tried it with and without and didn't see much of any difference but wanted to double check that too.
Would certainly be useul to be able to state a default img.
MThornback
03-25-2007, 01:47 AM
Your absolutely right, the code I added didn't include the plugins' variable.....i'm sorry about that! As long as you change the extension to png in the plugin and in the template edits, it should work fine now :)
If you replace what I gave you the first time with whats there now it should work.
Sorry about that again!
StarBuG
03-25-2007, 11:32 AM
@hippiesimz
I just released the hack you were looking for.
You can find it here:
Forum Images next to the Description for every Forum (https://vborg.vbsupport.ru/showthread.php?t=143098)
Best regards
StarBuG
bryandailey
03-28-2007, 11:55 PM
Hey there, great hack. Quick question. Since I have taken all of my category icons and changed them to custom icons (and its going to be a very active board and wont have closed forums or inactive ones), is there a way to remove the symbol key at the bottom of the hompage? (see the attached image)
StarBuG
03-29-2007, 03:44 AM
in template FORUMHOME remove
<tr>
<td><img src="$stylevar[imgdir_statusicon]/forum_old_lock.gif" alt="$vbphrase[a_closed_forum]" border="0" /></td>
<td class="smallfont"> $vbphrase[forum_is_closed_for_posting]</td>
</tr>
pscyhosis
04-01-2007, 11:48 AM
Hi starbug
My template
<td><img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" /></td>
I couldnt find the same code as yours.
I tried to replace the forum_$forum[statusicon].gif to forum$forum[forumid]_$forum[statusicon].gif. But no icon was showed.
Please help.
BadgerDog
05-13-2007, 05:23 PM
A clarification please...
If I install this mod and edit the templates, will I have to have all of the images ready to go at the same time?
In other words, can I get the code ready (installed), then start creating the individual forum category images (post, no post etc), installng them one forum at a time for testing?
Thanks
Regards,
Badger
aloha
05-18-2007, 06:59 PM
sorry about this, but how do I even get my subforums to show up like that in the first place before I install this hack? :D
snoopy5
05-25-2007, 02:31 PM
Does any of you guys know, how to DISABLE these forum icons on the main page completely?
So no icons for new messages, closed forum etc. on the index.php page....
Thanks in advance
MThornback
05-25-2007, 02:50 PM
You just remove the information from the template completely....NOT the entire template....just the information for the icons.
snoopy5
05-25-2007, 03:11 PM
You just remove the information from the template completely....NOT the entire template....just the information for the icons.
Do you know by accident in which template? I did delete in Forumhome.tmpl :
------
<img src="$stylevar[imgdir_statusicon]/forum_old.gif" alt="$vbphrase[contains_no_new_posts]" border="0" />
------------
and updated styles, threads and forums in maintenence option, refreshes browser, but no changes are visible..
After that I deleted alos in Forums display:
------
img src="$stylevar[imgdir_statusicon]/forum_old.gif" alt="$vbphrase[contains_no_new_posts]" border="0" />
--------
again maintenence update, again no success...
Thanks
consolegaming
07-25-2007, 06:14 PM
Hello,
Been a while since I last posted in thsi thread but after finishing off a few other projects for the site I'm on I finally got back to sorting out the issue I was having as it still wasn't working with the last code MThornback had suggested to me. After some perseverance I found out it was because of the url that I had been using in the plugin code that MThornback had suggested. I had use the full url i.e. http://www.google.co.uk whereas it requires a relative url ./images/etc Just thought I'd mention that for those that come across the same issue.
Also after some more experimentation I'd like to post a slightly revised version of MThornback's suggested plugin to show you're default icons.
It's certainly not much different but it will check each forum status icon exists rather than just the new version of each. This was pretty crucial for us because we did't want custom versions of the locked icons mainly because we were lazy but it's certainly helped us anyway.
"make a new plugin on the forumbit_display hook."
$showCustom[$forum['forumid']] = false;
if (is_file("./images/skin_name_here/statusicon/forum".$forum['forumid']."_$forum[statusicon].gif")) {
$showCustom[$forum['forumid']] = true;
}
and then follow the instructions as detailed in Thornback's post: https://vborg.vbsupport.ru/showpost.php?p=1202535&postcount=23
So in summary this is just a slight update on MThornback's suggested code for the plugin for default status icons in conjunction with the custom status icon plugin. And remember to check if you're using a relative url or not if you find the default icons not working. A clear sign of it not working properly is all the icons becoming default as the function checking if the image exists will always return false if it isn't the correct url.
menacam
07-27-2007, 09:37 PM
thnx mean
Defkalion
07-28-2007, 02:57 PM
This hack worked like a charm, very useful.
Many thanks to the author. :)
I using vB 3.6.7 and I can't for the life of me find the following code in forumhome_forumbit_level1_nopost:
<img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" />
I found this in the following in forumhome_forumbit_level1_post, but it still isn't the same:
<img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" />
Any idea's on how I could get this working.
This is my current level1_nopost template:
<!-- separate catergories -->
<if condition="$forum[forumid] != 1">
</table>
<br />
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
</if>
<!-- / separate catergories -->
<tbody>
<tr>
<td class="tcat" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumbit_$forumid')"><img id="collapseimg_forumbit_$forumid" src="$stylevar[imgdir_button]/collapse_tcat{$collapseimg_forumid}.gif" alt="" border="0" /></a>
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>
<if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
<if condition="$show['subforums']"><div class="smallfont"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
</td>
</tr>
<!-- separate catergories -->
<tr align="center">
<td class="thead"> </td>
<td class="thead" width="80%" align="$stylevar[left]">$vbphrase[forum]</td>
<td class="thead" width="20%">$vbphrase[last_post]</td>
<!-- replaced by custom thread / post count
<td class="thead" width="5%">$vbphrase[threads]</td>
<td class="thead" width="5%">$vbphrase[posts]</td>
-->
<if condition="$vboptions['showmoderatorcolumn']">
<td class="thead" width="0%">$vbphrase[moderator]</td>
</if>
</tr>
<!-- / separate catergories -->
</tbody>
<if condition="$childforumbits">
<tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
$childforumbits
</tbody>
</if>
OnyxChase
10-21-2007, 04:37 AM
Remember to keep the id in the IMG tag if you want your javascript to work.
<img src="images/forum/$forum[forumid]_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" />
Ejecutor Hanzo
12-02-2007, 01:18 PM
so pretty mod, too simple, thx :)
*Marked Installed*
Vinyljunky
01-08-2008, 12:01 PM
Hello,
Can this be used for custom forum_link.gif images per forum?
Thanks
VinylJunky
anyone getting this to work for 3.6.8? i cant seem to find those lines in my forumbit templates...
StarBuG
03-10-2008, 07:33 AM
Just search for forum_$forum[statusicon].gif
This will not change in any new version I think
sflmkv
03-30-2008, 11:35 PM
no success on 3.6.8 :(
chaser.nl
04-14-2008, 12:35 AM
verry nice and simple, i am going to use this.
/me clicks install
*edit
installed on version 3.6.9, no problem with installation here.
soundbarrierpro
04-14-2008, 12:36 PM
What if you have a sports site with a different icon for every NHL team in their own subforum? Can this be done?
soundbarrierpro
04-23-2008, 07:56 PM
Bumpity bump bump. Anybody?
This is not in any level forumhome_forumbit_level_...
3.6.7 - 3.6.8 - 3.6.9 or 3.6.10
<img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" />
is anybody able to help here?
Skierpetros
05-30-2008, 12:12 PM
Can you make it to work on 3.7.1 please its great mod!
StarBuG
05-31-2008, 05:46 AM
What if you have a sports site with a different icon for every NHL team in their own subforum? Can this be done?
make the changes in: forumhome_forumbit_level_1_post
Can you make it to work on 3.7.1 please its great mod!
It should work with 3.7.1
if not search for: subforum_$forum[statusicon].gif
and replace it with: subforum$forum[forumid]_$forum[statusicon].gif
Skierpetros
05-31-2008, 08:41 AM
<img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" />
This is not in any level forumhome_forumbit_level_...
how can i mode it?
g0dfather1984
03-11-2009, 07:05 PM
To change this in 3.8:
In the template: forumhome_forumbit_level_...
Search for:
<img src="$stylevar[imgdir_statusicon]/$forum[imageprefix]forum_$forum[statusicon].gif
And replace w/:
<img src="$stylevar[imgdir_statusicon]/$forum[imageprefix]forum$forum[forumid]_$forum[statusicon].gif
TruVB
03-19-2009, 03:25 AM
To change this in 3.8:
In the template: forumhome_forumbit_level_...
Search for:
<img src="$stylevar[imgdir_statusicon]/$forum[imageprefix]forum_$forum[statusicon].gif
And replace w/:
<img src="$stylevar[imgdir_statusicon]/$forum[imageprefix]forum$forum[forumid]_$forum[statusicon].gif
when i name my images, forumID would be f12_new.gif?
ShawneyJ
06-28-2009, 11:58 PM
when i name my images, forumID would be f12_new.gif?
nope it would be forum12_new.gif and forum12_old.gif
Stanthrax
09-11-2010, 04:29 PM
This is a nice little mod. Thanks StarBuG.
For those who are using vBadvanced CMPS on VB 3.8 and would like this on their Recent Threads block. Edit the template: adv_portal_recthreads_exp near the bottom. You will be replacing the last <if condition so make sure the closing </tr> is after that.
Search for:
<if condition="$mod_options['portal_threads_showforum']">
<td class="$class_ftitle"><span class="smallfont"><a href="$vboptions[bburl]/forumdisplay.php?$session[sessionurl]f=$thread[forumid]">$thread[forumtitle]</a></span></td>
</if>
And replace with:
<if condition="$mod_options['portal_threads_showforum']">
<td align="center" class="$class_ftitle"><span class="smallfont">
<a href="$vboptions[bburl]/forumdisplay.php?$session[sessionurl]f=$thread[forumid]"><img src="$stylevar[imgdir_statusicon]/forum$thread[forumid]_new.gif" alt="$thread[forumtitle]" border="0" width="36" height="36" /></a><br>
<a href="$vboptions[bburl]/forumdisplay.php?$session[sessionurl]f=$thread[forumid]">$thread[forumtitle]</a></span></td>
</if>
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.