vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Question about changing thread list for an individual forum only (https://vborg.vbsupport.ru/showthread.php?t=222481)

JPetrillo 09-04-2009 06:54 PM

Question about changing thread list for an individual forum only
 
Hi all,

I would like the tread list on this page to display a preview of the thread text under the thread title.

So basically, right now under the thread title is the username of the user who posted the thread. Instead of having the username there I would like to have some text. Like when you hover your mouse over the thread link it shows a preview of the beginning of the post. This is what I would want to show up under the thread title instead of showing the username.

Is there any way for me to accomplish this?

Thank you,
JPetrillo

Lynne 09-04-2009 06:59 PM

You may edit the threadbit template to show the text instead of just having it as title text for the hover. And, since you only want it on one forum, put a condition around it <if condition="$forumid == xx">your text</if>

JPetrillo 09-04-2009 07:31 PM

Okay, so what do I add/change in the threadbit template to get it to show the text?

Lynne 09-04-2009 10:18 PM

Well, the variable is already available to you - $thread[preview] - so find where you want the preview text to display and insert it there. If it's in the correct place, then go about formatting it how you want. (You said you wanted to replace the username, so just search for "username" in the template and put the condition around it - if $forumid == x, then $thread[preview], else all the username stuff.

JPetrillo 09-09-2009 11:51 AM

Thanks! I'll try this. It brings up another question. The first content in those posts are usually a picture, and so the preview text always starts with the image directory. Is there a way to remove that so it won't display the image on that preview?

Lynne 09-09-2009 02:20 PM

You'd have to write some custom code to remove any image tags in the preview. That's not something I'm real good at doing (I'm a trial and error coder).


All times are GMT. The time now is 11:52 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.00928 seconds
  • Memory Usage 1,718KB
  • 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
  • (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