Welcome, Guest. Please Login or Register.
May 10, 2025, 02:08:43 PM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Catagory Icons « previous next »
Pages: [1] 2 Reply Ignore Print
Author Topic: Catagory Icons  (Read 2242 times)
FH
Noobie
*
Posts: 15


I'm a llama!

Catagory Icons
« on: November 18, 2002, 09:18:56 PM »
Reply with quote

Hello All,

Does anyone know if there is a mod that would allow me to put icons to the right of the cat titles and underneath the thread titles like pictured below?

For example:




Thanks!
FH
« Last Edit: January 30, 2003, 06:04:43 AM by FH » Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:Catagory Icons
« Reply #1 on: November 19, 2002, 12:07:18 AM »
Reply with quote

u'll need to edit boardindex.php to do that
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
FH
Noobie
*
Posts: 15


I'm a llama!

Re:Catagory Icons
« Reply #2 on: November 20, 2002, 01:23:55 AM »
Reply with quote

Cool thanks!

Do you know where in particular?

FH
Logged
Jack.R.Abbit
Mod Team
YaBB God
*****
Posts: 553


RACE FOR SPENT!

Re:Catagory Icons
« Reply #3 on: November 20, 2002, 01:32:30 AM »
Reply with quote

In boardindex.php search for something like this:
<td colspan="5" class="catbg" height="18"><a name="$row_board[ID_CAT]"><b>$row_board[catName]</b></a></td>This is where each of the Category headings get printed out.  Since this happens inside a loop for each Category, if you want a different image for each Cat., you'll need to figure out how to do that.

Good luck.

-Jack
Logged

<--------  Mods by Jack  -------->
Package Server: http://www.modsbydesign.com/mods.by.jack/yabbse/ (now serving)


|----------------------------------------------|
|                                              |
|          DON'T PM ME FOR SUPPORT!             |
|                                              |
|----------------------------------------------|
chris
Guest
Re:Catagory Icons
« Reply #4 on: November 20, 2002, 12:12:26 PM »
Reply with quote

UNTESTED!!!

hmmm the easiest way should be something like this:

search for:

 <tr>
    <td colspan="5" class="catbg" height="18"><a name="$row_board[ID_CAT]"><b>$row_board[catName]</b></a></td>
  </tr>

replace with:


  <tr>
    <td colspan="4" class="catbg" height="18">
     <a name="$row_board[ID_CAT]"><b>$row_board[catName]</b></a>
    </td>
    <td align='center'>
     <img src='$imagesdir/$row_board[ID_CAT].gif' alt=''>
    </td>
  </tr>

Now all you have to do is to put some GIF-Files in your YaBBImages-directory called:

[CATEGORY-ID].gif (so for cat-id 1 this would be 1.gif, for cat-id 2 = 2.gif)

UNTESTED!!!
Logged
FH
Noobie
*
Posts: 15


I'm a llama!

Re:Catagory Icons
« Reply #5 on: November 20, 2002, 06:39:56 PM »
Reply with quote

Great!

Now lets say that the pictures are links to sponsors. How would I make each image link to the the corresponding url?

Thanks for your help!
Logged
chris
Guest
Re:Catagory Icons
« Reply #6 on: November 20, 2002, 06:45:48 PM »
Reply with quote

Quote from: FH on November 20, 2002, 06:39:56 PMGreat!

Now lets say that the pictures are links to sponsors. How would I make each image link to the the corresponding url?

Thanks for your help!

again.... an EASY solution....

add this somewhere in the beginning of the function (somewhere after the "global $...." lines....)

$sponsor[(CATEGORY ID)] = 'http://www.somewhere.tld';
$sponsor[(OTHER CATEGORY ID)] = 'http://www.somewhere.tld';
$sponsor[(AND ANOTHER CATEGORY ID)] = 'http://www.somewhere.tld';

now, change

<img src='$imagesdir/$row_board[ID_CAT].gif' alt=''>

to:

<a href='$sponsors[ID_CAT]'><img src='$imagesdir/$row_board[ID_CAT].gif' alt='' border='0'></a>

done ;D
Logged
FH
Noobie
*
Posts: 15


I'm a llama!

Re:Catagory Icons
« Reply #7 on: December 02, 2002, 05:33:42 AM »
Reply with quote

Thats doesnt work fully!

Everything is working but the links! heres what i got!

$sponsor[11]= 'http://www.combustionwebhosting.com/cgi-bin/affiliates/clickthru.cgi?id=FordHarley&campaign=Forum';

blah blah blah

  <tr>
   <td colspan="4" height="18" class="catbg">
    <a name="$row_board[ID_CAT]"><b>$row_board[catName]</b></a>
   </td>
   <td align='center' class="catbg"><a href="$sponsors[ID_CAT]" target="_blank"><img src='$imagesdir/$row_board[ID_CAT].gif' alt='' border='0'></a>
   </td>
  </tr>


all the links go to http://www.fordharley.com/forum/
« Last Edit: December 02, 2002, 05:34:42 AM by FH » Logged
FH
Noobie
*
Posts: 15


I'm a llama!

Re:Catagory Icons
« Reply #8 on: December 04, 2002, 03:20:42 AM »
Reply with quote

C'mon someone please help

I know that there is something worg with the above mod.

Can anyone find it?

thanks
Logged
FH
Noobie
*
Posts: 15


I'm a llama!

Re:Catagory Icons
« Reply #9 on: January 25, 2003, 07:27:57 AM »
Reply with quote

Ok since upgrading to the new 1.5.1 this mod has changed. Can someone please help me out. I also want to have a picture below or the right the cat title!

FH
Logged
tdodnz
Sr. Member
****
Posts: 275


Asleep zzzzz (Snore Snore)

ICQ - 166370583cnd_nz@go.com WWW
Re:Catagory Icons
« Reply #10 on: January 25, 2003, 09:57:51 PM »
Reply with quote

the instructions Christian land gave you should work, but

heres a problem i found
"<a href="$sponsors[ID_CAT]" target="_blank">note the word sponsors while your setting for it is

sponsor[11]= 'http://www.combustionwebhosting.com/cgi-bin/affiliates/clickthru.cgi?id=FordHarley&campaign=Forum';
note the words sponsor and sponsors they should be the same. Ill have a look at 1.5 soon to see if i can help but it shouldn't of changed that much
Logged
FH
Noobie
*
Posts: 15


I'm a llama!

Re:Catagory Icons
« Reply #11 on: January 26, 2003, 12:16:37 AM »
Reply with quote

Doesnt find any of the original code  ???

Also the above one didnt work. It only showed one url for all the different pics. Even after the spelling mistke was fixed.

FH
« Last Edit: January 26, 2003, 12:17:46 AM by FH » Logged
FH
Noobie
*
Posts: 15


I'm a llama!

Re:Catagory Icons
« Reply #12 on: January 30, 2003, 05:54:16 AM »
Reply with quote

anyone?
Logged
Nemesis
What's an Admin?
Global Moderator
YaBB God
*****
Posts: 2199


WWW
Re:Catagory Icons
« Reply #13 on: January 30, 2003, 09:01:40 AM »
Reply with quote

An easier way....

In the descripiton of the topic just use an image tag to start it.

<img src="http://www.yourserver/image/yourimage.jpg" width="80" height="33"> This is board for my topic before this descripition you'll see an image.
to control the look put the code in table tags.

Check out my forum for an example:
Scroll down the page to see it
http://www.gamerzalliance.com/community/index.php
« Last Edit: January 30, 2003, 09:15:38 AM by Nemesis » Logged


Want to say thanks?
*************************************
DONATE or check out my WishList
*********************************
tdodnz
Sr. Member
****
Posts: 275


Asleep zzzzz (Snore Snore)

ICQ - 166370583cnd_nz@go.com WWW
Re:Catagory Icons
« Reply #14 on: January 31, 2003, 12:32:28 PM »
Reply with quote

sorry I missed it before but this is in an echo which means you need to close it to add in the $variables then open it as such try replacing with this.

<tr>
  <td colspan="4" height="18" class="catbg">
   <a name="' . $row_board[ID_CAT] . '"><b>' . $row_board[catName] . '</b></a>
  </td>
  <td align="center" class="catbg"><a href="' . $sponsors[ID_CAT] . '" target="_blank"><img src="' . $imagesdir . '/' . $row_board[ID_CAT] . '.gif" alt="" border="0"></a>
  </td>
 </tr>

Now if that doesn't work, tell me as its probably simple as depending on whether the echo is done with single quotes or double will stuff it up as this is set up for single
Logged
Pages: [1] 2 Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Catagory Icons « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.027 seconds with 20 queries.