View Full Version : text replace with images
Goomzee
06-30-2014, 03:54 AM
I have created a forum with the name "Mortal Kombat X" and then i also added some sub-forums and now i want to know how to put small image before sub-forum name for example
sub forums name is Scorpion so i want to put "scorpion" picture before scorpion name.
my website forum www.mknexusonline.com
Is this what you're looking for https://vborg.vbsupport.ru/showthread.php?t=214289?
Goomzee
07-02-2014, 04:51 AM
yes but it's show on main forum i am talking about Sub-Forums
darnoldy
07-02-2014, 03:46 PM
If you name your images with the name of the sub-forum (i.e. "scorpion.jpg), it is pretty simple to then edit the appropriate template to insert the image where you want it. Which template you need to edit depends on where, exactly, you want the image to appear.
Goomzee
08-27-2014, 05:05 AM
i tried not works i really need to change my subforum icon
darnoldy
08-27-2014, 05:49 PM
i tried not works i really need to change my subforum icon
What did you try? Show us the code. Tell us what template.
How did it "not works"? Tell us what happened.
Goomzee
08-28-2014, 04:18 AM
below is my forumhome_forumbit_level2_post coding
<tr align="center">
<td class="alt2"><img src="$stylevar[imgdir_statusicon]/$forum[imageprefix]forum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" /></td>
<td class="alt1Active" align="$stylevar[left]" id="f$forum[forumid]">
<div>
<a href="external.php?type=rss2&forumids=$forum[forumid]"><img src="images/misc/rss.gif" border="0" align="right" alt="RSS Feed for $forum[title]" /></a>
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><img border="0" src="images/misc/iconforums/$forum[forumid].gif" hspace="4px" align="left"/></a>
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><strong>$forum[title]</strong></a>
<if condition="$show['browsers']"><span class="smallfont">(<phrase 1="$forum[browsers]">$vbphrase[x_viewing]</phrase>)</span></if>
</div>
<if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
<if condition="$show['forumsubscription']"><div class="smallfont"><strong><a href="subscription.php?$session[sessionurl]do=removesubscription&f=$forum[forumid]" rel="nofollow">$vbphrase[unsubscribe_from_this_forum]</a></strong></div></if>
<if condition="$show['subforums']"><div class="smallfont" style="margin-top:$stylevar[cellpadding]px"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
</td>
<td class="alt2"><a href="member.php?find=lastposter&f=$forum[forumid]" rel="nofollow"><img height="32px" style="float:left;margin-right:4px" src="$forum[avatarurl]" border="0" /></a><div style="padding-left:36px;">$forum[lastpostinfo]</div></td>
<td class="alt1">$forum[threadcount]</td>
<td class="alt2">$forum[replycount]</td>
<if condition="$vboptions['showmoderatorcolumn']">
<td class="alt1"><div class="smallfont">$forum[moderators] </div></td>
</if>
</tr>
$childforumbits
this is subforum image link
http://www.mknexusonline.com/forums/images/tealblack/statusicon/mkx_raiden_subforum.png
and 79 is my forum ID
darnoldy
08-28-2014, 05:09 PM
In order for
<img border="0" src="images/misc/iconforums/$forum[forumid].gif" hspace="4px" align="left"/>to call the correct image, you will have to rename the images—and change where you store them.
The above template would look for the imageimages/misc/iconforums/79.gif your image isimages/tealblack/statusicon/mkx_raiden_subforum.png
neither the path nor the filename match.
Goomzee
08-29-2014, 04:57 AM
sub forum not showing images even my main forum images are disable below is code
<tr align="center">
<td class="alt2"><img src="$stylevar[imgdir_statusicon]/$forum[imageprefix]forum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" /></td>
<td class="alt1Active" align="$stylevar[left]" id="f$forum[forumid]">
<div>
<a href="external.php?type=rss2&forumids=$forum[forumid]"><img src="images/misc/rss.gif" border="0" align="right" alt="RSS Feed for $forum[title]" /></a>
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><img border="0" src="images/tealblack/statusicon/mkx_raiden_subforum.png/$forum[forumid].gif" hspace="4px" align="left"/></a>
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><strong>$forum[title]</strong></a>
<if condition="$show['browsers']"><span class="smallfont">(<phrase 1="$forum[browsers]">$vbphrase[x_viewing]</phrase>)</span></if>
</div>
<if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
<if condition="$show['forumsubscription']"><div class="smallfont"><strong><a href="subscription.php?$session[sessionurl]do=removesubscription&f=$forum[forumid]" rel="nofollow">$vbphrase[unsubscribe_from_this_forum]</a></strong></div></if>
<if condition="$show['subforums']"><div class="smallfont" style="margin-top:$stylevar[cellpadding]px"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
</td>
<td class="alt2"><a href="member.php?find=lastposter&f=$forum[forumid]" rel="nofollow"><img height="32px" style="float:left;margin-right:4px" src="$forum[avatarurl]" border="0" /></a><div style="padding-left:36px;">$forum[lastpostinfo]</div></td>
<td class="alt1">$forum[threadcount]</td>
<td class="alt2">$forum[replycount]</td>
<if condition="$vboptions['showmoderatorcolumn']">
<td class="alt1"><div class="smallfont">$forum[moderators] </div></td>
</if>
</tr>
$childforumbits
darnoldy
08-29-2014, 02:12 PM
You've messed up the file path:
<img border="0" src="images/tealblack/statusicon/mkx_raiden_subforum.png/$forum[forumid].gif" hspace="4px" align="left"/>
Replace that code with this:
<img border="0" src="images/tealblack/statusicon/mkx_raiden_subforum.png" hspace="4px" align="left"/>
Then tell us what happens.
Goomzee
08-30-2014, 06:54 AM
show same images all forums
<tr align="center">
<td class="alt2"><img src="$stylevar[imgdir_statusicon]/$forum[imageprefix]forum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" /></td>
<td class="alt1Active" align="$stylevar[left]" id="f$forum[forumid]">
<div>
<a href="external.php?type=rss2&forumids=$forum[forumid]"><img src="images/misc/rss.gif" border="0" align="right" alt="RSS Feed for $forum[title]" /></a>
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><img border="0" src="images/tealblack/statusicon/mkx_raiden_subforum.png" hspace="4px" align="left"/></a>
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><strong>$forum[title]</strong></a>
<if condition="$show['browsers']"><span class="smallfont">(<phrase 1="$forum[browsers]">$vbphrase[x_viewing]</phrase>)</span></if>
</div>
<if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
<if condition="$show['forumsubscription']"><div class="smallfont"><strong><a href="subscription.php?$session[sessionurl]do=removesubscription&f=$forum[forumid]" rel="nofollow">$vbphrase[unsubscribe_from_this_forum]</a></strong></div></if>
<if condition="$show['subforums']"><div class="smallfont" style="margin-top:$stylevar[cellpadding]px"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
</td>
<td class="alt2"><a href="member.php?find=lastposter&f=$forum[forumid]" rel="nofollow"><img height="32px" style="float:left;margin-right:4px" src="$forum[avatarurl]" border="0" /></a><div style="padding-left:36px;">$forum[lastpostinfo]</div></td>
<td class="alt1">$forum[threadcount]</td>
<td class="alt2">$forum[replycount]</td>
<if condition="$vboptions['showmoderatorcolumn']">
<td class="alt1"><div class="smallfont">$forum[moderators] </div></td>
</if>
</tr>
$childforumbits
darnoldy
08-30-2014, 01:28 PM
show same images all forumsGood?that's what it should do...so its working. Now we have to change it so that it shows a different image for each forum.
Change:
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><img border="0" src="images/tealblack/statusicon/mkx_raiden_subforum.png" hspace="4px" align="left"/></a>
to
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><img border="0" src="images/tealblack/statusicon/$forum[forumid].png" hspace="4px" align="left"/></a>
Then it will look for a different image for each forum, But you ALSO have to change the names of the image files.
Rename mkx_raiden_subforum.png to 79.png
Do the same for all of the icon images you want to use, change their file name to the ID number of the forum they are for.
Goomzee
09-01-2014, 04:59 AM
it won't works because i want only 2 subforums there ID's are 79 and 80
ForceHSS
09-01-2014, 05:52 AM
people can only help with info you give if you want this fixed you need to give all info not in parts
tbworld
09-01-2014, 06:08 AM
it won't works because i want only 2 subforums there ID's are 79 and 80
@Darnold's code will work fine. Just wrap it in a vbulletin if-else template conditional to exclude all other forum ID's. Let me know if you need an example. :)
darnoldy
09-01-2014, 05:02 PM
it won't works because i want only 2 subforums there ID's are 79 and 80
You have are 8 character subforums?you only want 2 of them to have images?
I'm confused.
Goomzee
09-02-2014, 04:29 AM
this is my forum page
http://www.mknexusonline.com/forums/index.php
and this forum
http://www.mknexusonline.com/forums/forum22/
now there are some subforums under above forum
i want to put image in this forum
http://www.mknexusonline.com/forums/forum80/ (Example image A )
http://www.mknexusonline.com/forums/forum79/ (Example Image B)
you must see this attached
below is code
<tr align="center">
<td class="alt2"><img src="$stylevar[imgdir_statusicon]/$forum[imageprefix]forum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" /></td>
<td class="alt1Active" align="$stylevar[left]" id="f$forum[forumid]">
<div>
<a href="external.php?type=rss2&forumids=$forum[forumid]"><img src="images/misc/rss.gif" border="0" align="right" alt="RSS Feed for $forum[title]" /></a>
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><img border="0" src="images/tealblack/statusicon/mkx_raiden_subforum.png" hspace="4px" align="left"/></a>
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><img border="0" src="images/tealblack/statusicon/mkx_sz_subforum.png" hspace="4px" align="left"/></a>
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><strong>$forum[title]</strong></a>
<if condition="$show['browsers']"><span class="smallfont">(<phrase 1="$forum[browsers]">$vbphrase[x_viewing]</phrase>)</span></if>
</div>
<if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
<if condition="$show['forumsubscription']"><div class="smallfont"><strong><a href="subscription.php?$session[sessionurl]do=removesubscription&f=$forum[forumid]" rel="nofollow">$vbphrase[unsubscribe_from_this_forum]</a></strong></div></if>
<if condition="$show['subforums']"><div class="smallfont" style="margin-top:$stylevar[cellpadding]px"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
</td>
<td class="alt2"><a href="member.php?find=lastposter&f=$forum[forumid]" rel="nofollow"><img height="32px" style="float:left;margin-right:4px" src="$forum[avatarurl]" border="0" /></a><div style="padding-left:36px;">$forum[lastpostinfo]</div></td>
<td class="alt1">$forum[threadcount]</td>
<td class="alt2">$forum[replycount]</td>
<if condition="$vboptions['showmoderatorcolumn']">
<td class="alt1"><div class="smallfont">$forum[moderators] </div></td>
</if>
</tr>
$childforumbits
darnoldy
09-04-2014, 03:30 PM
If you want to display images in the 8 subforum listings that you have here:
http://www.mknexusonline.com/forums/forum22/
Then I gave you the right code, but you are putting it into the wrong template.
If you only want to put the images in 2 of those subforums in the list (and I don't know why you would) then I still gave you the right code, and you still need to put it in the right template, but you also need to wrap it in a conditional to make it work that way.
Goomzee
09-05-2014, 04:37 AM
thanks please share with me the code
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.