Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Automated Simple Catagory Icons Details »»
Automated Simple Catagory Icons
Version: 1.01, by MThornback MThornback is offline
Developer Last Online: Feb 2012 Show Printable Version Email this Page

Category: Forum Home Enhancements - Version: 3.6.7 Rating:
Released: 05-07-2007 Last Update: 07-04-2007 Installs: 17
Uses Plugins Template Edits
 
No support by the author.

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;
}
In forumhome_forumbit_level1_post find:

Code:
<img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" />
Replace with:
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]" />
Replace with:

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

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 05-08-2007, 07:38 PM
MThornback MThornback is offline
 
Join Date: Apr 2005
Location: Canada
Posts: 388
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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)
Reply With Quote
  #13  
Old 05-15-2007, 03:40 PM
BadgerDog BadgerDog is offline
 
Join Date: Oct 2006
Location: Toronto
Posts: 1,789
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed.... (well, to be absolutely correct, just installing it)...

Thanks... nice mode and a good add-on to vBulletin... :up:

Regards,
Badger
Reply With Quote
  #14  
Old 05-15-2007, 04:49 PM
BadgerDog BadgerDog is offline
 
Join Date: Oct 2006
Location: Toronto
Posts: 1,789
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #15  
Old 05-16-2007, 05:27 AM
MThornback MThornback is offline
 
Join Date: Apr 2005
Location: Canada
Posts: 388
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do you direct one of your styles to a custom folder? That would be the only reason it would be affected
Reply With Quote
  #16  
Old 05-16-2007, 05:47 AM
MThornback MThornback is offline
 
Join Date: Apr 2005
Location: Canada
Posts: 388
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Terminatoronly View Post
its nice but when u use this u will lose the ajax technology of the mark forum read via pressing on the icon of the category
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
Reply With Quote
  #17  
Old 05-16-2007, 09:58 AM
BadgerDog BadgerDog is offline
 
Join Date: Oct 2006
Location: Toronto
Posts: 1,789
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MThornback View Post
Do you direct one of your styles to a custom folder? That would be the only reason it would be affected

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
Reply With Quote
  #18  
Old 05-16-2007, 12:00 PM
MThornback MThornback is offline
 
Join Date: Apr 2005
Location: Canada
Posts: 388
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #19  
Old 05-18-2007, 04:45 PM
BadgerDog BadgerDog is offline
 
Join Date: Oct 2006
Location: Toronto
Posts: 1,789
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #20  
Old 05-18-2007, 05:36 PM
MThornback MThornback is offline
 
Join Date: Apr 2005
Location: Canada
Posts: 388
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.

Reply With Quote
  #21  
Old 05-18-2007, 05:40 PM
BadgerDog BadgerDog is offline
 
Join Date: Oct 2006
Location: Toronto
Posts: 1,789
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MThornback View Post
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.

Understood... :up:

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
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:36 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05716 seconds
  • Memory Usage 2,319KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete