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

May 8th 2007
Because of the similarities between this mod and another, I've removed the template edit that I originally released rather than cause a problem!
May 8th 2007...later in the day?
I had another look at my code vs. the similar code, and with the exception of variable names, the organization of the logic of the template edits is tottaly different...I'm going to re-add the template code and leave it to wisdom of the staff if i'm in error.
I added Plugin Code & Template Instructions to the first post and txt file
May 16th 2007
Added missing ID tag to one of the find instructions, updated txt file also
June 12 2007
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.
July 5 2007
Now supports standard mark forum read double click!
Reply With Quote
  #3  
Old 05-08-2007, 05:50 AM
dbirosel dbirosel is offline
 
Join Date: Feb 2007
Location: San Diego
Posts: 587
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Doesn't this do the same as this?

https://vborg.vbsupport.ru/showthread.php?t=127426
Reply With Quote
  #4  
Old 05-08-2007, 11:36 AM
MThornback MThornback is offline
 
Join Date: Apr 2005
Location: Canada
Posts: 388
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow...the template edit is far too close for me to keep using it...thanks for pointing that out...

The plugin still separates the two releases, so i'm going to release it on its own.
Reply With Quote
  #5  
Old 05-08-2007, 01:39 PM
projectego's Avatar
projectego projectego is offline
 
Join Date: Feb 2006
Location: UK
Posts: 724
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Looks pretty good to me! Thanks a bunch, MThornback!
Reply With Quote
  #6  
Old 05-08-2007, 02:04 PM
iogames's Avatar
iogames iogames is offline
 
Join Date: Jan 2007
Location: Las Vegas, NV.
Posts: 1,433
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Then... isn't ready yet?
Reply With Quote
  #7  
Old 05-08-2007, 03:14 PM
Terminatoronly's Avatar
Terminatoronly Terminatoronly is offline
 
Join Date: Mar 2006
Posts: 313
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Seems so, to be honest, it wasn't something I considered cause I never use it. Thanks for pointing it out
Reply With Quote
  #9  
Old 05-08-2007, 03:54 PM
MThornback MThornback is offline
 
Join Date: Apr 2005
Location: Canada
Posts: 388
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by iogames View Post
Then... isn't ready yet?
Nope, its ready to roll...
Reply With Quote
  #10  
Old 05-08-2007, 05:09 PM
Veer Veer is offline
 
Join Date: Feb 2006
Posts: 733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi, MThornback Nice job, Well done
Can you please make it more easy to install? i mean just a product to upload and some templates to edit.

I've installed Adrian's product, should i need to uninstall Adrian's product and template edits? before installing this hack.

Thanks.
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 07:13 PM.


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.04787 seconds
  • Memory Usage 2,306KB
  • Queries Executed 23 (?)
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
  • (1)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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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