Log in

View Full Version : Need help with variable data on showthread page


smirkley
06-01-2009, 01:10 PM
I am desperatly trying to figure out how to utilize the variable $thread[preview] on the showthread pages.

Basically I am trying to extract and use the variablename $thread[preview] in any particular thread page, just like is found in the forumdisplay pages, thread title views on mouseover.

I just cant seem to find out how to get the variable data for this made available inside a template in any showthread page.


Any help or clues GREATLY appreciated for this weather-worn coder.

Lynne
06-01-2009, 02:17 PM
$thread[preview] is the first xxx characters of the first post in the thread. What are you going to do with it in the actual thread? The whole first post is there, so why do you want just the first xxx characters?

smirkley
06-01-2009, 08:41 PM
True, and I understand the uniqueness of the desire.

I want to fill my meta desc with that variable on thread view pages.

But the variable is empty on that page and I want to figure out how to load it for this purpose.

Thanks.

Lynne
06-01-2009, 08:54 PM
The data isn't available at the time that the header template is evaled. You'd have to write a plugin to grab this information prior to the header template being evaled.

smirkley
06-01-2009, 09:10 PM
Being fairly new to vB systems, that is where I am stumped.
Before I migrated my forum to vB, I knew the former scripts inside and out.
But alas, I am lost at this stage on where to begin.
So I was hoping to solicit for advice or help in this from one of the experts here.

Thanks again.

Lynne
06-01-2009, 10:09 PM
You may want to look at some SEO type of mods. I think they often do something like what you want.