PDA

View Full Version : Add a image to Categories


Allan
09 Jul 2006, 13:02
What this does:
Add a image to categories (only Index) :rolleyes:


In your "forumhome_forumbit_level1_nopost" template, find
<td class="tcat" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>">

Replace to:
<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 (http://www.vbulletin.org/forum/vborg_miscactions.php?do=installhack&threadid=120741) Please ;)

Before
http://img60.imageshack.us/img60/6505/exemple11rd.gif

After
http://img128.imageshack.us/img128/346/exemple31wf.gif

PennylessZ28
13 Jul 2006, 22:52
I did something simlair using CSS2

Racenut
20 Jul 2006, 23:07
I tried this but i get the image repeating the whole width of the cat header, including over the text. Any ideas?

thenetbox
21 Jul 2006, 12:14
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
21 Jul 2006, 17:53
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
22 Jul 2006, 20:37
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
24 Jul 2006, 10:45
is it possible to have a different image in each catagory.

Allan
24 Jul 2006, 11:23
is it possible to have a different image in each catagory.
yes, use this conditions:

<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
24 Jul 2006, 12:44
thanks alot allan

Derekclarke
29 Jul 2006, 12:29
Thanks Allan,

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


<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 />

Snake
30 Aug 2006, 17:53
Thanks for the hack! I'll install it right away...

Andromeda2875
22 Sep 2006, 23:47
It does not work for me. I do not have that template to edit.

Warlord
23 Sep 2006, 19:56
Are you running vBulletin version 3.6?

Hornstar
25 Sep 2006, 10:49
I did something simlair using CSS2

What did you do?

Clayton
25 Oct 2006, 19:19
I did something simlair using CSS2


What did you do?

I concur

;)

compact123
02 Jun 2007, 11:35
nice mod