Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 05 Sep 2009, 03:06
abdobasha2004's Avatar
abdobasha2004 abdobasha2004 is offline
 
Join Date: Aug 2008
How to use "$thread[preview]" in meta description

The $thread[preview] value gives the first few words of a thread
it is already defined in vbulletin script and foumd in threadbit template, when mouse passed over the thread title it gives thread description as first fee words
however if I use it in meta description it shows nothing

why?
Is there any necessary tags or definition or any thing??!
Reply With Quote
  #2  
Old 05 Sep 2009, 03:25
bmckinley's Avatar
bmckinley bmckinley is offline
 
Join Date: Jun 2009
Real name: Bill
Maybe this???

Not sure, but it would seem necessary to make it an <a>ttribute. The meta needs to know that is code, not just funny type...try using the <a href="......."></a> and see if anything changes. You also need to tell it which thread to pull from.
__________________
Perpetual Newb...
Reply With Quote
  #3  
Old 05 Sep 2009, 03:38
abdobasha2004's Avatar
abdobasha2004 abdobasha2004 is offline
 
Join Date: Aug 2008
You also need to tell it which thread to pull from
i think that is the problem
how is that
Reply With Quote
  #4  
Old 05 Sep 2009, 03:42
bmckinley's Avatar
bmckinley bmckinley is offline
 
Join Date: Jun 2009
Real name: Bill
I'm not sure.

Not sure how to code that part. Suggest you copy the code from a template that it is working in,,,and then make the adjustments as needed. That should give you the right format.
__________________
Perpetual Newb...
Reply With Quote
  #5  
Old 05 Sep 2009, 03:52
abdobasha2004's Avatar
abdobasha2004 abdobasha2004 is offline
 
Join Date: Aug 2008
this can not happen
I can not use the template in meta description !
I think this needs php designer or something !
Reply With Quote
  #6  
Old 05 Sep 2009, 05:41
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
The header template is evaled before the thread preview is defined which is why you don't have that variable available to you right there. You will need a plugin to do this. Someone just posted this exact same question a couple days ago and we went over what to do. Try a a search for it.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #7  
Old 05 Sep 2009, 06:06
abdobasha2004's Avatar
abdobasha2004 abdobasha2004 is offline
 
Join Date: Aug 2008
The header template is evaled before the thread preview is defined which is why you don't have that variable available to you right there. You will need a plugin to do this. Someone just posted this exact same question a couple days ago and we went over what to do. Try a a search for it.
oh plz
did you find any plugin
plz give me the link
plz

thanks
Reply With Quote
  #8  
Old 06 Sep 2009, 17:35
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
There is even an article on this and it was written after 3.8 came out so I'm sure it is up-to-date if you follow the instructions exactly - http://www.vbulletin.org/forum/showt...ighlight=meta*
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #9  
Old 06 Sep 2009, 22:29
abdobasha2004's Avatar
abdobasha2004 abdobasha2004 is offline
 
Join Date: Aug 2008
There is even an article on this and it was written after 3.8 came out so I'm sure it is up-to-date if you follow the instructions exactly - http://www.vbulletin.org/forum/showt...ighlight=meta*
I tried
it DID NOT work
the coder also says :The code needs some optimization, but you will get the idea.
Reply With Quote
  #10  
Old 13 Sep 2009, 14:54
993ti 993ti is offline
 
Join Date: Dec 2005
It does work mate
Follow the instructions and when you are going to edit the template(s), use $threadinfo[preview] instead of $threadinfo['preview'] (note the difference).
I'm using it in the headinclude template like this:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Check the source here to see it working http://www.streetcars.nl/showthread.php?t=271
__________________
Twenteracingscene - Dutch car club (VB), Aibo forum (VB)
Streetcars (VB),
Reply With Quote
  #11  
Old 19 Sep 2009, 02:35
MagicThemeParks's Avatar
MagicThemeParks MagicThemeParks is offline
 
Join Date: Sep 2009
993ti, any particular place that I should put it in the headinclude for it to show correctly?

Edited: Got it, nevermind

Last edited by MagicThemeParks; 19 Sep 2009 at 03:01.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 20:40.

Layout Options | Width: Wide Color: