PDA

View Full Version : Question about changing thread list for an individual forum only


JPetrillo
09-04-2009, 06:54 PM
Hi all,

I would like the tread list on this page (http://www.gamersthrone.com/forum/s414) 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).