vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Forum Home Enhancements - Catagory Icons (https://vborg.vbsupport.ru/showthread.php?t=127426)

Adrian. 09-23-2006 10:00 PM

Catagory Icons
 
Catagory Icons
Tested on 3.6.1
By Adrian at Development chat.com

Current Version: 1.0.1
1.0.1 Status: Working Fine.

Hey,

I noticed a few people around the 'net wanted a modification like this, It wasn't too hard so i thought i would give it ago.

You can specify a image path/url to use for your catagory icon, if none is specified, the forum will use vBulletins default image.
See bottom of post for screenshots

Installation
Import product-catagoryicons.xml (It should make the needed Mysql tables too)
Go to Options > Catagory Icons to enable the mod'.

Template Edits
Open Forum Home Templates > forumhome_forumbit_level1_post
Find:
HTML Code:

<img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" />
or

HTML Code:

<img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0"

id="forum_statusicon_$forum[forumid]" />

Replace with:
HTML Code:

<if condition="$vboptions[customimg_enabled] == 1">
        <if condition="$forum[customimg] == ''">
                <img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0"

id="forum_statusicon_$forum[forumid]" />


<else />
                <img src="$forum[customimg]" alt="" border="0" id="forum_statusicon_$forum[forumid]" />
</if>

<else />
        <img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0"

id="forum_statusicon_$forum[forumid]" />

</if>

Save.
Open up Forum Home Templates > forumhome_forumbit_level2_post
Find:
HTML Code:

<img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" />
or

HTML Code:

<img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0"

id="forum_statusicon_$forum[forumid]" />

Replace with:
HTML Code:

<if condition="$vboptions[customimg_enabled] == 1">
        <if condition="$forum[customimg] == ''">
                <img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0"

id="forum_statusicon_$forum[forumid]" />


<else />
                <img src="$forum[customimg]" alt="" border="0" id="forum_statusicon_$forum[forumid]" />
</if>

<else />
        <img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0"

id="forum_statusicon_$forum[forumid]" />

</if>

Done. :)

That should be it.

To set catagory icons, just edit a forum, the image field is at the bottom.
If you have any problems, just ask.

If you use it, please click install. :)

Thanks.

Adrian

forumbeat 09-24-2006 12:06 PM

Nice hack, will install soon! :)

ChavMagnet 09-24-2006 12:11 PM

Ok Great hack buy im having a few problems first one is this you say in forumhome_forumbit_level2_post replace this

Code:

<img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" />
But my template is like this

Code:

<img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0"

id="forum_statusicon_$forum[forumid]" />

I replaced that with your code and this is what happened to my icons Thanks Alot.

bashy 09-24-2006 01:13 PM

Hi

I was about to install and i see i have the same code as ChavMagnet

Code:

<img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" /></td>
Could you please advise as to the best way to tdo this please as i do not know what functionality the extra bit of code i have does and i do not want to break something like normal lol

Adrian. 09-24-2006 01:21 PM

If you have...

HTML Code:

<img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0"

id="forum_statusicon_$forum[forumid]" />

Replace it with my code, it should work fine...

Just make sure, you are not replacing <td> </td> <tr> </tr>

EDIT: Also, make sure you have the mod' enabled.

Adrian

bashy 09-24-2006 01:38 PM

Hi m8, Ok done that and seemed ot go ok,
Can you take a look at the image please, i take it the forum manager aint meant to look like that?

Also i have added an image, yet it dont show the image, it just removes the original

Adrian. 09-24-2006 02:15 PM

Sorry about it having no description on the field.

I was in a hurry to finish this mod' up for someone before i had to go out.

If you import the .xml attached (Updated), it should add the description.

Adrian

bashy 09-24-2006 02:25 PM

Ny ideas on the image not showing, the url in the box is
/images/catergory/grabit.gif
i take it thats right

EDIT, Sorted, it needs forums/ 1st

Snake 09-24-2006 03:47 PM

Thanks for making this! :)

bashy 09-24-2006 04:13 PM

Just a wee question, is this possible to work with the sub forum icons please?
If too much then no worries!!


All times are GMT. The time now is 11:03 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.01464 seconds
  • Memory Usage 1,749KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (7)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete