View Full Version : any way to put an image in a certain forum?
MaDCaT75
10-03-2003, 05:45 AM
Is there a way that I can put like a 200 x 500 image in one of my forums and have it show up like near the top of the forum navigation links?
assassingod
10-03-2003, 06:06 AM
Try this:
OPen forumdisplay.php and find:
$newthreadlink = "";
and below add:
if($foruminfo[forumid] == XX)
{
$forumimg = "<img src=\"{imagesfolder}/img.gif\" />";
}
else
{
$forumimg = "";
}
Change XX to the forum id you want the image to appear and the url of the image:)
Then use $forumimg in the forumdisplay template
MaDCaT75
10-03-2003, 06:59 AM
Thanks I'll try it :)
Edit: works great! :)
http://www.sims2forums.com/forumdisplay.php?forumid=16
:D
assassingod
10-03-2003, 01:35 PM
No problem:)
Dean C
10-03-2003, 03:40 PM
You're best using Logician's template conditionals for this one - an easy hack to install and you could do this without having to worry about changing files when upgrading :)
amykhar
10-03-2003, 03:43 PM
Except having to change the files used to install Logician's hack ;)
MaDCaT75
10-04-2003, 06:19 AM
ok but what if i wanna do more than one image for one forum and another image for another forum?
Dean C
10-04-2003, 02:09 PM
Except having to change the files used to install Logician's hack ;)
You got me ;)
MaDCaT75
10-04-2003, 07:59 PM
ok but what if i wanna do more than one image for one forum and another image for another forum?
Anybody? :confused:
memobug
10-05-2003, 08:57 AM
Will there be one image for each forum, or one for most of them? If so, you probably want to append the forumid to the image filename, e.g. image_1.jpg, image_2.jpg and then load it accordingly. Otherwise if it's a smattering of images and lots of forums, you might use a switch:
switch ($foruminfo[forumid]) {
case 5:
$forumimg = "<img src=\"{imagesfolder}/bananas.gif\" />";
break;
case 9:
$forumimg = "<img src=\"{imagesfolder}/apples.gif\" />";
break;
case 32:
$forumimg = "<img src=\"{imagesfolder}/stringcheese.gif\" />";
break;
default:
$forumimg = "<img src=\"{imagesfolder}/default image.gif\" />";
## or maybe
## $forumimg = "";
}
amykhar
10-05-2003, 09:08 PM
There is a way to do this without hacking. It's a bit convoluted though.
In your templates, put an image named image$forum[forumid].gif where you want it. Then, put single pixel images named image1.gif, image2.gif, etc. in the directory and put the desired different image in with the proper name (e.g. image22.gif)
Likewise, it could be done with several images. Just pick different naming schemes.
This isn't a route I would want to take with a huge number of forums, but given that you don't seem to understand basic php, this is one option for you.
Amy
MaDCaT75
10-06-2003, 01:22 AM
Nevermind I figured it out with the help of some people in IRC...... thanks anyways :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.