vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   text replace with images (https://vborg.vbsupport.ru/showthread.php?t=312563)

Goomzee 06-30-2014 03:54 AM

text replace with images
 
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

Dave 06-30-2014 07:58 AM

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

Quote:

Originally Posted by Goomzee (Post 2512822)
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

Quote:

<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&amp;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]&nbsp;</div></td>
</if>
</tr>
$childforumbits
this is subforum image link
http://www.mknexusonline.com/forums/...n_subforum.png
and 79 is my forum ID

darnoldy 08-28-2014 05:09 PM

In order for
HTML Code:

<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 image
HTML Code:

images/misc/iconforums/79.gif
your image is
HTML Code:

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

Quote:

<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&amp;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]&nbsp;</div></td>
</if>
</tr>
$childforumbits

darnoldy 08-29-2014 02:12 PM

You've messed up the file path:
HTML Code:

<img  border="0"  src="images/tealblack/statusicon/mkx_raiden_subforum.png/$forum[forumid].gif"  hspace="4px" align="left"/>
Replace that code with this:
HTML Code:

<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

Quote:

<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&amp;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]&nbsp;</div></td>
</if>
</tr>
$childforumbits

darnoldy 08-30-2014 01:28 PM

Quote:

Originally Posted by Goomzee (Post 2513095)
show same images all forums

Good?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:
HTML Code:

<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
HTML Code:

<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

Quote:

Originally Posted by Goomzee (Post 2513312)
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

Quote:

Originally Posted by Goomzee (Post 2513312)
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

1 Attachment(s)
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

Quote:

<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&amp;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]&nbsp;</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


All times are GMT. The time now is 08:06 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
  • Page Generation 0.01413 seconds
  • Memory Usage 1,806KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_html_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (19)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete