Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons

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

I'd make a lock.gif to have the complete set regardless....but yes its needed
Reply With Quote
  #23  
Old 07-05-2007, 08:25 PM
MThornback MThornback is offline
 
Join Date: Apr 2005
Location: Canada
Posts: 388
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This now works with VBs JS to mark a forum read
Reply With Quote
  #24  
Old 07-05-2007, 09:26 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
This now works with VBs JS to mark a forum read
Thanks for the update ... :up:

We've used your mod since it came out....

It's been a while, so for clarity, what do we need to do to upgrade? Is there a need to uninstall the previous version first, or can we just go ahead and import the XML?

Regards,
Badger
Reply With Quote
  #25  
Old 07-06-2007, 01:03 AM
MThornback MThornback is offline
 
Join Date: Apr 2005
Location: Canada
Posts: 388
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

all thats changed is the template portion of the mod, so if you redo the edit you'll be set
Reply With Quote
  #26  
Old 07-06-2007, 10:04 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
all thats changed is the template portion of the mod, so if you redo the edit you'll be set
Updated ... :up:

Thanks ...

Nice mod... really enhances use of our forums. People look for the icon graphic to find forums as opposed to reading text.

Regards,
Badger
Reply With Quote
  #27  
Old 08-14-2007, 09:52 AM
Chester87 Chester87 is offline
 
Join Date: Apr 2006
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I cant get it to work.

I did all the template edits and install the thingy in forumbit_diplay hook. Even got the status icons in several maps just to see where it is directing to.

Do i need to change this line?
is_file("path/to/forum/images/statusicon/forum".

To an directory where the *.gif's are located?

Changed te gif's to the name of the forum.

forum419_old_lock.gif
forum419_new_lock.gif
forum419_old.gif
forum419_new.gif

But it aint working. What am i doing wrong?
Reply With Quote
  #28  
Old 08-22-2007, 12:41 AM
MThornback MThornback is offline
 
Join Date: Apr 2005
Location: Canada
Posts: 388
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

path/to/forum needs to be changed, yes
Reply With Quote
  #29  
Old 05-27-2009, 05:01 PM
CLF's Avatar
CLF CLF is offline
 
Join Date: Jun 2007
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just wanted to thank you for this mod. Looks great on my forum and I went with png icons.

INSTALLED!

Thank you! :up:
Reply With Quote
Reply

Thread Tools

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 09:14 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04556 seconds
  • Memory Usage 2,288KB
  • 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
  • (2)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
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)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_postinfo_query
  • fetch_postinfo
  • 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