![]() |
Image on Forumbit (forumhome)
this is for the forumhome, open your "forumhome_forumbit_level2_post" template and find ;
HTML Code:
<if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if> HTML Code:
<if condition="$forum[parentid]==XX OR $forum[parentid]==XX"><img src="$stylevars[imgdir_misc]/[forumhome]/$forum[forumid].gif" alt="$forum[title]" border="0" vspace="2 px" hspace="2 px" align="left"/></if> |
Mind posting a screen shot? :)
|
added to first post :)
|
Always a useful modification. Good work. ^_^
|
I like this mod, I might use it in the future.
|
Hmm, this can be cool with small images :D
|
And if you want to make the images into links to that forum,
find: PHP Code:
PHP Code:
Code:
hspace="2 px" align="left"/> Code:
</a> a-la http://www.nzboards.com |
so do I just add this so many times for each image I wanna put in?
|
Is there anyway to apply this to 'forum_old.gif' etc ... instead of adding an extra image in the forum description...
|
Quote:
23.gif and so on, it automatically puts them in front of the right forum then |
I don't understand how to use this.
What are the part I have to edit? |
i'm not sure how to explain it any simpler than stated in the first post, if you have a specific question on what bits confusing you, then let me know
|
I wanna add pictures for more then one forums.
And still I don't understand what I have to edit of the code you posted. Can u mark it in red please? |
it's literally copy and paste the whole "forumhome_forumbit_level2_post" template into a text editor, even word would do, find <if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if> and then paste <if condition="$forum[parentid]==XX OR $forum[parentid]==XX"><img src="$stylevars[imgdir_misc]/[forumhome]/$forum[forumid].gif" alt="$forum[title]" border="0" vspace="2 px" hspace="2 px" align="left"/></if> right below it
if you give me the link to your forums and tell me the forums, i'll even post the code on how to add it to those specific forums. |
<a href="http://www.interfans.org/forum/" target="_blank">http://www.interfans.org/forum/</a>
I'd like to have an image for each subforums of the category FC INTERNAZIONALE |
this is the code you'll need to add to that to the template:
HTML Code:
<if condition="$forum[parentid]==3"><img src="$stylevars[imgdir_misc]/[forumhome]/$forum[forumid].gif" alt="$forum[title]" border="0" vspace="2 px" hspace="2 px" align="left"/></if> |
and this will add the images I want to all the forums of that category?
The images are different in every forum |
yup
|
I still don't understand how can this work :(
Where do I have to put the images, in what folder? |
images go in the directory
images/misc/forumhome/ and you name the images after the forumid i would say install the mod and then work backwards, you can right click on the red x and get the location and image name for each image from there. |
since I have more forum I have to copy the cose for as many forums as I have?
|
nope it's all automatic
|
I don't understand :(
|
Hey Sabretooth, I took your advice and stopped in over here to look for support. Only problem is, I think my template mods are a little different than what you have developed here. But you said to stop in for support, so here goes:
Here are my templates: ...forumhome_forumbit_level1_post... Code:
<tbody> Code:
<tr align="center"> For a more complete description of the problem that I am having, see this thread over at vB.com : http://www.vbulletin.com/forum/showthread.php?t=126680 My description is a bit wordy, but I tried to effectively describe what I wanted and the problem that I was having. Any help would be VERY, VERY appreciated! :) mm |
lol i said you should've installed my one then you could've come for support, alright i'll look into yours tomorrow morning
but try HTML Code:
<tbody> HTML Code:
<tr align="center"> |
Quote:
|
Does this add one to each forum or is there a way where we can make it only apply to certain forums?
|
Quote:
|
just change all instances of
HTML Code:
valign="top" HTML Code:
valign="middle" |
Thanks sabret00the. But this one was just too difficult for me.
Quote:
There were other hacks or mods that were interfering. Jake B. looked into it and worked his "mojo". And as usual, he's got it running perfectly. I told him, he needs to add whatever he did to vertically align my titles/descriptions into his tutorial for adding images to forumdisplay pages. Take it easy. :) mm |
Hmm... this really doesn't seem to be working but my templtes are pretty modified ;) So any help would be appreciated.
|
you got your templates?
doubt i'll see this tonight as on my way out, but i'll see your reply tomorrow morning |
Here are my templates for this. These templates have been modified to add small images next to forum titles AND to vertically align the title and descriptions.
forumhome_forumbit_level1_post Code:
<tbody> Code:
<tr align="center"> Take it easy. :) mm |
Quote:
forumhome_forumbit_level2_post Code:
<tr align="center"> |
how would I do this so it shows only on certain styles? I'm putting this code inside the Forum Description so I can show a logo in the Forum Bit of each forum.
|
Love this mod. I tried to install it on my board, and removed the conditional since I want a different image to show up for every forum (movie titles).
However I get red x's on titles that have no image uploaded to my image folder. Ideally I would love to have a default image to show if there is no corresponding image for that forum (ie. 59.jpg) Is there a way to get rid of the red x's? (they only show in IE) and write a conditional to show a default image if there is no image corresponding to that forum id? Thanks in advance. Here is my code: forumhome_forumbit_level2_post HTML Code:
<tr align="center"> |
the only way i could think of is with hacking i.e. using the file_exists() function of php.
you could however use a conditonal to say HTML Code:
<img src="$stylevars[imgdir_misc]/images/misc/forumhome/<if condition="in_array($forum['forumid'], array(XX, XX, XX, XX, XX, XX))">other_image.jpg<else />$forum[forumid].jpg</if>" class="picborder" alt="" /> |
Thanks sabret00the. The only problem with an array is that I am constantly adding 2 or 3 new forums every month and I would really prefer this be maintanence free and not have to edit the template each time I create a new forum. So I would like the image to be the generic default, until I upload one onto the server.
Your mention of the file_exists() function sounds like a good one. I tried a few attempts at this and got a code explosion though... :eek: But I am no PHP guru. Any suggestions how to get the code below to function? HTML Code:
if ( file_exists('$stylevars[imgdir_misc]/images/misc/forumhome/$forum[forumid].jpg') ) { HTML Code:
<img src="$stylevar[imgdir_misc]/images/misc/forumhome/<if (file_exists($forum[forumid].jpg'))>$forum[forumid].jpg<else />spacer.gif</if>" class="picborder" alt="" /> |
before i provide the code changes you need, could you do me a favour and ask over at vb.com if enabling the file_exists() function in templates is a security risk.
|
Waiting on a reply at vb.com, but I did find this on a quick search.
http://www.vbulletin.com/forum/showt...ists%28%29+php If it is a risk is there another way to do this? Maybe just place the file if it is there and if not use the placeholder image and I could have a backgound image placed by css? Thanks again. |
All times are GMT. The time now is 11:57 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|