vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   How can I display thread icons inside the thread? (https://vborg.vbsupport.ru/showthread.php?t=145692)

fly 04-24-2007 07:39 PM

How can I display thread icons inside the thread?
 
In the threadbit template, I found this:

PHP Code:

    <if condition="$show['threadicons']">
        <
td class="alt1"><if condition="$show['threadicon']"><img src="$thread[threadiconpath]alt="$thread[threadicontitle]border="0" /><else />&nbsp;</if></td>
    </if> 

But am not really sure how to make that show up in the actual thread itself. Thanks for any ideas.

EnIgMa1234 04-24-2007 07:40 PM

just use the exact same thing in showthread template

Brad 04-24-2007 09:58 PM

Just throwing the html in there won't work because $show['threadicon'] is only set in forumdisplay.php.

If you allow icons for all forums then that is not important to your set-up anyway, in such a case using this in the SHOWTHREAD template will work;

HTML Code:

<img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" />

fly 04-24-2007 10:16 PM

Quote:

Originally Posted by Brad (Post 1234989)
Just throwing the html in there won't work because $show['threadicon'] is only set in forumdisplay.php.

If you allow icons for all forums then that is not important to your set-up anyway, in such a case using this in the SHOWTHREAD template will work;

HTML Code:

<img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" />

Sadly, none of that is apparently set for the SHOWTHREAD template. Here is the actual HTML it generated:

HTML Code:

<!-- Added -->
<img src="" alt="" border="0" />
<!-- Added -->

Any other ideas?

Brad 04-24-2007 11:00 PM

1 Attachment(s)
Hehe my bad...didn't know they weren't set in the latest version. :)

First thing you need to do is edit showthread.php. :)

Find this bit of code in showthread.php;

PHP Code:

$specialtemplates = array(
    
'smiliecache',
    
'bbcodecache',
    
'mailqueue',
); 

Change it to;

PHP Code:

$specialtemplates = array(
    
'smiliecache',
    
'bbcodecache',
    
'mailqueue',
    
'iconcache'
); 

Now install the attached plug-in and edit the showthread template per the instructions above.

fly 04-24-2007 11:42 PM

Sweet! Thanks man! This is really gonna help my forum. I assume the iconcache HAS to be there tho? No way to do this without file edits?

Brad 04-25-2007 12:23 AM

Quote:

Originally Posted by flypaper (Post 1235036)
Sweet! Thanks man! This is really gonna help my forum. I assume the iconcache HAS to be there tho? No way to do this without file edits?

Yea the iconcache is needed..otherwise the plug-in would not function. :)

I could probably work around the file edit but it would be a mess...the 'easy' solution in this situation is to edit the file.


All times are GMT. The time now is 04:25 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.02796 seconds
  • Memory Usage 1,733KB
  • 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_html_printable
  • (3)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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