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)
-   -   Add a image to Categories (https://vborg.vbsupport.ru/showthread.php?t=120741)

Allan 07-08-2006 09:00 PM

Add a image to Categories
 
What this does:
Add a image to categories (only Index) :rolleyes:

  • In your "forumhome_forumbit_level1_nopost" template, find
PHP Code:

<td class="tcat" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>"

  • Replace to:
PHP Code:

<td class="tcat" style="background-image:url(images/gradients/your-image.gif)" border="0" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>"

I have only add this code "style="background-image:url(images/gradients/your-image.gif)" border="0"" ^^ (custom this for you !)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:banana: , it's little mod :p

~~~~~~~~~~~~~~~~~~~~~~~~~
If your install this hack, Click Install Please ;)


PennylessZ28 07-13-2006 08:52 PM

I did something simlair using CSS2

Racenut 07-20-2006 09:07 PM

I tried this but i get the image repeating the whole width of the cat header, including over the text. Any ideas?

thenetbox 07-21-2006 10:14 AM

Quote:

Originally Posted by Racenut
I tried this but i get the image repeating the whole width of the cat header, including over the text. Any ideas?

Hello,

I'm not 100% sure because I haven't tried it but this should work.

instead of

<td class="tcat" style="background-image:url(images/gradients/your-image.gif)" border="0" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>">

try

<td class="tcat" style="background-image:url(images/gradients/your-image.gif); background-repeat:no-repeat" border="0" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>">

Racenut 07-21-2006 03:53 PM

Quote:

Originally Posted by thenetbox
Hello,

I'm not 100% sure because I haven't tried it but this should work.

instead of

<td class="tcat" style="background-image:url(images/gradients/your-image.gif)" border="0" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>">

try

<td class="tcat" style="background-image:url(images/gradients/your-image.gif); background-repeat:no-repeat" border="0" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>">

That fixed the repeating part, but the image is still sitting right on top of the catagory text. Anyway to define it further?

TygerTyger 07-22-2006 06:37 PM

Try this:

background:transparent url(blah) center no-repeat;

You can't accurately place it after a variable length of text without inserting it as a proper image, not a background.

Derekclarke 07-24-2006 08:45 AM

is it possible to have a different image in each catagory.

Allan 07-24-2006 09:23 AM

Quote:

Originally Posted by Derekclarke
is it possible to have a different image in each catagory.

yes, use this conditions:
PHP Code:

<if condition="in_array($forum[forumid], array(x))">
code
</if>
<else />
<if 
condition="in_array($forum[forumid], array(x))">
your code
</if>
<else />
etc ... 

No tested ....:p
[/COLOR][/COLOR]

Terminatoronly 07-24-2006 10:44 AM

thanks alot allan

Derekclarke 07-29-2006 10:29 AM

Thanks Allan,

I am not very good with code yet, is this what i am meant to do? :confused:


Code:

<if condition="in_array($forum[1], array(x))">
<td class="tcat" style="background-image:url(images/gradients/forum1.gif)" border="0" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>">
</if>
<else />
<if condition="in_array($forum[2], array(x))">
<td class="tcat" style="background-image:url(images/gradients/forum2.gif)" border="0" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>">
</if>
<else />



All times are GMT. The time now is 12:47 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.03066 seconds
  • Memory Usage 1,747KB
  • 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
  • (1)bbcode_code_printable
  • (3)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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