vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=134)
-   -   Thread Images (https://vborg.vbsupport.ru/showthread.php?t=90436)

python66 02-18-2005 10:00 PM

Thread Images
 
This will add some thread images to your thread list you can see them over at

http://www.codingsector.com/forumdisplay.php?f=21

To apply this hack it will involve in editing two templates

In your FORUMDISPLAY template find

Code:

<td class="thead" width="100%">
<if condition="$show['threadratings']"><span style="float:$stylevar[right]"><a href="$sorturl&amp;order=desc&amp;sort=voteavg">

ABOVE ADD

Code:

<if condition="$foruminfo[title] == forumtitle"><td class="thead" width="45" align="center" nowrap="nowrap">Preview</td></if>
NOTE: you must remove the forumtitle and replace it with the forum you want to add the images to. If you want to add images to every forum then just remove the <if> statements.

SAVE FORUMDISPLAY Template

OPEN THREADBIT Template

FIND

Code:

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

BELOW ADD

Code:

<if condition="$thread[forumtitle] == forumtitle">
<td class="alt2" width="40">
<img src="$thread[threadid].gif"></td></if>

NOTE: you must remove the forumtitle and replace it with the forum you want to add the images to. If you want to add images to every forum then just remove the <if> statements.

SAVE AND CLOSE!

now you should test it to see if it works! if you have no threads in the forum you selected then create a test 1.

now create the image and put that image in the forum root directory it must be called the id of the thread!

for example if my threadid was 1 then i would create an image called 1.gif and place it in the forum root directory.

NOTE: You can find the forum id by hovering over the link and you should get something like

where the number 10 is the thread id!

Hopefully it worked, i would love to see some variations of this!
Please excuse me if it doesnt i will fix it after all this is my first ever mod ;)

Thanks
Paul

Guy G 02-19-2005 10:45 AM

This is all nice and good but not usefull for users....
If a user wants to create a tutorial than it will have no picture - bummer.
Try making this into a hack where a user uploads a small picture which will be displayed the same way.

python66 02-20-2005 09:39 AM

Yea that will probably get upgraded. it was a simple template i made for my forums graphic tutorials to offer guests a preview. they cant post in their tho

Tony G 02-21-2005 02:44 AM

Depends on the community if it will be useful or not. But nice mod nevertheless.

imported_TCB 03-22-2005 01:00 PM

Fantastic hack! :D

I know how to edit php, but I need to have a start or a point to the right direction. I've used your hack and changed it a bit. It works fantastic.

imported_TCB 03-22-2005 07:45 PM

:(

So I've skipped the editings in the forumdisplay template, since I don't want to add the thread image as an extra table, but instead of the threadicons.

But it seems I have made an error here with the conditionals:
PHP Code:

       <if condition="$show['threadicons']">
        <
td class="alt2">
        <if 
condition="$thread[forumtitle] == cds"><img src="http://www.mysite.com/images/forumdisplay/$thread[threadid].jpg" width="90" height="90"></if>
        <if 
condition="$show['threadicon']"><img src="$thread[threadiconpath]alt="$thread[threadicontitle]border="0" />        
        <else />&
nbsp;</if></td>
        </if> 

The normal threadicons show up in all forums but the 'cds' forum, while in the cds forum a nice threadimage is displayed for all threads in this forum. But...... the threadicon (like http://www.vbulletintemplates.com/mo...cons/icon1.gif) is ALSO shown. So I have the image + the icon.

What do I need to change to have a space shown when there's no threadicon selected in all forums (but the cds forum), and only a thread image in the cds forum?

imported_TCB 03-22-2005 08:06 PM

By the way, how can I select more than one forum to use this hack?

TCB 09-16-2005 08:34 AM

This is what I have so far:
Code:

<if condition="$show['threadicons']">
        <td class="alt2">
        <if condition="$thread[forumid] == 7"><img src="http://www.mysite.com/images/forumdisplay/$thread[threadid].jpg" width="90" height="90"></if>
        <if condition="$show['threadicon']"><img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" />       
        <else />&nbsp;</if></td>
        </if>

And this is what I would like to have, but I'm lost with the conditionals:
1) have it work for forum 7, 19 and 25
2) have it show an image ($thread[threadid].jpg) for these 3 forums
3) have it show the standard threadicons for the other forums.

What do I have to edit to get it to work? :nervous:

TCB 09-17-2005 10:54 PM

can someone please help?


All times are GMT. The time now is 03:28 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.01056 seconds
  • Memory Usage 1,742KB
  • 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_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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