vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=168)
-   -   Insert Images In Sub-Forums (https://vborg.vbsupport.ru/showthread.php?t=123154)

jarod1981? 08-05-2006 11:34 PM

Insert Images In Sub-Forums
 
Hi guys

I want insert in all my sub-forums an image before each forums...

I must modify "forumhome_subforumbit_post", right?

I try some time to editing but it's don't work...Can you help me please?

Forumhome_subforumbit_post
:

Code:

<img class="inlineimg" src="$stylevar[imgdir_statusicon]/subforum_$forum[statusicon].gif" alt="" /> <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">
<span class="smallfont">$forum[title]</span></a>

Example


Very thanks..guys

Buraq 08-06-2006 01:23 AM

I actually just played around with this yesterday on my forum. What you want to do is the following...

You must apply these changes to forumhome_forumbit_level2_post. forumhome_subforumbit_post is when you set the forum to display the subforums of a forum (like the small text under "Premium Modifications" on vb.org).

Code:

<tr align="center">
        <td class="alt2"><img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" /></td>
        <td class="alt1Active" align="$stylevar[left]" id="f$forum[forumid]">
                <div>
                    <div style="float:left"><img src="your image"/></div>
                        <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" nowrap="nowrap">$forum[lastpostinfo]</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

Basically add the green code into the proper template.

You will need to include conditionals on $forum[forumid] if you want to assign forum-specific images.

jarod1981? 08-09-2006 04:26 PM

Hi Buraq

I have follow your instructions but the images are insert in Forumhome and don't in Sub-Forums....


I want insert a different images for each section in my Sub-Forums, don't in Forumhome!

I want isert image here : Link

Which template I must modify? And what code Can I Use, please?

Very thanks ;)

upsetter 08-09-2006 10:34 PM

will this work for 3.6.0?...

Buraq 08-11-2006 05:06 AM

My bad, I thought the forums you were trying to edit were on ForumHome (couldn't tell from the picture). I looked through the templates again and what you need to edit for ForumDisplay is forumhome_forumbit_level1_post...

Code:

<tbody>
        <tr align="center">
                <td class="alt1Active" colspan="2" align="$stylevar[left]" id="f$forum[forumid]">
               
                <table cellpadding="0" cellspacing="0" border="0">
                <tr>
                        <td><img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" /></td>
                        <td><img src="$vboptions[cleargifurl]" alt="" width="9" height="1" border="0" /></td>
                        <td>
                        <div>
                              <div style="float:left"><img src="your image"/></div>
                                <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>
                </tr>
                </table>
               
                </td>
                <td class="alt2" nowrap="nowrap">$forum[lastpostinfo]</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>
</tbody>
<if condition="$childforumbits">
<tbody>
        $childforumbits
</tbody>
</if>

If you want the image to show on specific forums, you can do the following...

Code:

<if condition="$forum[forumid]==X">
    <div style="float:left"><img src="your image" /></div>
</if>

Where "X" is the forum ID you want.

OR If you want multiple forums to have different images (like you showed in your first post), you can include the following code instead...

Code:

<if condition="$forum[forumid]==X OR $forum[forumid]==Y OR $forum[forumid]==Z">
    <div style="float:left"><img src="your path/$forum[forumid].gif"/></div>
</if>

Here, you would replace your path with the directory where you save the images, and you would name the images X.gif, Y.gif, and Z.gif. X, Y, Z (etc) are the IDs of the forums you wish to give images, we placed a conditional at the top so that you dont get an empty div in Firefox or the missing image icon in IE when the image file doesn't exist (for a forum ID that you didn't make an image for).

hope that helped.

Quote:

Originally Posted by upsetter
will this work for 3.6.0?...

I haven't installed 3.6.0 yet, but I don't see why not. It's a simple template edit.


All times are GMT. The time now is 06:46 AM.

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.01477 seconds
  • Memory Usage 1,744KB
  • 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
  • (5)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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