vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   Simple Category Icons (https://vborg.vbsupport.ru/showthread.php?t=138783)

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.

Code:

$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):

Code:

<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

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

Code:

<tr>
                        <td><img src="$stylevar[imgdir_statusicon]/forum_old_lock.gif" alt="$vbphrase[a_closed_forum]" border="0" /></td>
                        <td class="smallfont">&nbsp; $vbphrase[forum_is_closed_for_posting]</td>
                </tr>



All times are GMT. The time now is 06:21 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.01182 seconds
  • Memory Usage 1,744KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (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