Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-23-2009, 05:05 PM
abdobasha2004's Avatar
abdobasha2004 abdobasha2004 is offline
 
Join Date: Aug 2008
Posts: 541
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Make META DESCRIPTION the first words of the first posting

Any body can tell me how to do this without using vBSEO
It is on many forums
to show first 20 or 30 words as descreprion on top of showthread?
I want to put the first words of a post (thread) in the meta tags like vbseo do
but when I use $thread[preview] in any place other than threadbit it shows nothing
however on thread bit shoes the first words of the thread

plz help

important update :
Like vBSEO , how to put the first words of paragraph in the meta description of the showthread?
I found something and was very close, it is to use the value $thread[preview] that is defined in threadbit template ( I have a thread about this that no body answered)
The only thing it is not defined in headinclude template
so the question is : how to define $thread[preview] in the headinclude?
OR
Is there any way to put first 25 word or something in meta descirption not using vBSEO?

note: I asked folks at vbulletin.org even submitted a tickets in vbulletin.com support [the answer was so honest :Sorry I do not know what code modification are required to do this.]
nobody seemed to know how to define $thread[preview] in headinclude
isn't that strange?

*The mast important value for this that in gives higher ctr in search results (preferred by users) and remove short meta description errors in webmaster tools specially for short titled threads,
Reply With Quote
  #2  
Old 02-26-2009, 08:42 PM
abdobasha2004's Avatar
abdobasha2004 abdobasha2004 is offline
 
Join Date: Aug 2008
Posts: 541
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I will appreciate any help
Reply With Quote
  #3  
Old 02-26-2009, 09:01 PM
1Unreal 1Unreal is offline
 
Join Date: Jul 2008
Location: London
Posts: 372
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You could make a plugin and use substr. You could grab the thread contents then use substr to chop it down to whatever length you want.
Reply With Quote
  #4  
Old 02-27-2009, 11:04 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You should use fetch_trimmed_title(). It will ensure it will not be chopped off in the middle of a word (and multi-byte characters!).
Reply With Quote
  #5  
Old 02-27-2009, 01:40 PM
abdobasha2004's Avatar
abdobasha2004 abdobasha2004 is offline
 
Join Date: Aug 2008
Posts: 541
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
You could make a plugin and use substr. You could grab the thread contents then use substr to chop it down to whatever length you want.
Quote:
You should use fetch_trimmed_title(). It will ensure it will not be chopped off in the middle of a word (and multi-byte characters!).
some little explanation would be gr8
Reply With Quote
  #6  
Old 03-06-2009, 08:50 AM
abdobasha2004's Avatar
abdobasha2004 abdobasha2004 is offline
 
Join Date: Aug 2008
Posts: 541
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

plz help
Reply With Quote
  #7  
Old 09-06-2009, 09:03 PM
abdobasha2004's Avatar
abdobasha2004 abdobasha2004 is offline
 
Join Date: Aug 2008
Posts: 541
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Like vBSEO , how to put the first words of paragraph in the meta description of the showthread?
I found something and was very close, it is to use the value $thread[preview] that is defined in threadbit template ( I have a thread about this that no body answered)
The only thing it is not defined in headinclude template
so the question is : how to define $thread[preview] in the headinclude?
OR
Is there any way to put first 25 word or something in meta descirption not using vBSEO?

note: I asked folks at vbulletin.org even submitted a tickets in vbulletin.com support [the answer was so honest :Sorry I do not know what code modification are required to do this.]
nobody seemed to know how to define $thread[preview] in headinclude
isn't that strange?

*The mast important value for this that in gives higher ctr in search results (preferred by users) and remove short meta description errors in webmaster tools specially for short titled threads.
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 02:26 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.05716 seconds
  • Memory Usage 2,221KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete