vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Add icon beside Forum Icon (https://vborg.vbsupport.ru/showthread.php?t=190985)

fitaholic 09-15-2008 03:18 PM

Add icon beside Forum Icon
 
Can someone please tell me how to add an icon to a specific thread. (forum) I want to add an icon beside the thread icon. see www.myls1.com for an example of how he does it.

Thank you in advance for responding,

Mr. Fitaholic

Opserty 09-15-2008 03:22 PM

Edit the forumhome_forumbit_level2_post template. On that site they have added something like the following:
Code:

tr align="center">
        <td class="alt2"><img src="images/statusicon/forum_old.gif" alt="" id="forum_statusicon_124" border="0"></td>
        <td class="alt1Active" id="f124" align="left">

<div style="margin: 0px; padding: 0px; float: left;">
<img src="images/statusicon/124.gif" alt=""></div>


                <div>
                        <a href="forumdisplay.php?f=124"><strong>Maintenance and Repairs</strong></a>
                        <span class="smallfont">(6 Viewing)</span>

                </div>
                <div class="smallfont">General LSX Maintenance and Repairs</div>
               
               
        </td>
        <td class="alt2">
<div class="smallfont" align="left">
        <div>
                <span style="white-space: nowrap;">
               
               
                <a href="showthread.php?goto=newpost&amp;t=3171" style="white-space: nowrap;" title="Go to first unread post in thread 'Taylor 10.5 MM wires  = JUNK'"><strong>Taylor 10.5 MM wires  = JUNK</strong></a></span>

        </div>
        <div style="white-space: nowrap;">
                by <a href="member.php?find=lastposter&amp;f=124" rel="nofollow">dixonk</a>
        </div>
        <div style="white-space: nowrap;" align="right">
                09-06-2008 <span class="time">11:51 AM</span>
                <a href="showthread.php?p=39636#post39636"><img title="Go to last post" class="inlineimg" src="images/buttons/lastpost.gif" alt="Go to last post" border="0"></a>

        </div>
</div>
</td>
        <td class="alt1">31</td>
        <td class="alt2">302</td>
       
</tr>

In the template it probably looks like this:
Code:

<div style="margin: 0px; padding: 0px; float: left;">
<img src="images/statusicon/$forum[forumid].gif" alt=""></div>

Then you can just name your forum icons like 19.gif for the forum that has the id number 19 e.t.c.

fitaholic 09-15-2008 04:19 PM

Thats awesome Opserity, but how do I make it for only one forum id???

Opserty 09-16-2008 08:33 AM

Code:

<if conditon="$forum['forumid'] == XX">
<div style="margin: 0px; padding: 0px; float: left;">
<img src="images/statusicon/$forum[forumid].gif" alt=""></div>
</if>


salava 09-16-2008 08:59 AM

Thanks. It is useful for me too.

fitaholic 09-16-2008 12:39 PM

Thank you Opserty you are the bomb. Something is showing wrong with this code though....


When entered I receive an error saying:

The following error occurred when attempting to evaluate this template:

The conditional on line 7 appears to be missing its beginning tag (<if>). This may cause unexpected behavior.

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

When I add <if> which is infront of your <if> I continue to get this same error!!!

--------------- Added [DATE]1221627582[/DATE] at [TIME]1221627582[/TIME] ---------------

Can someone please look at Opseritys code and let me know what is missing or why I am receiving an error.

Thank you in advance


All times are GMT. The time now is 10:26 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.01164 seconds
  • Memory Usage 1,729KB
  • 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
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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