Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
description for meta and bookmarksite on showthread
Zachariah
Join Date: Feb 2002
Posts: 2,125

AS Electronics Experance in PHP, HTML, JavaScript, DHTML, Flash, XML, MySQL, Photoshop, more. Electronics I, II, III, Microprocessors, AC and DC Electronics, Boolean Algebra, Trig / Math Analysis, Chemistry / AP Physics

Canoga Park, CA
by Zachariah Zachariah is offline 18 Mar 2009
Rating: (1 vote - 5.00 average)

Hello,
I took on a task to make bookmarksite operate with a few more features and ended up also creating data for meta description. The code needs some optimization, but you will get the idea.

The point was to get "pagetext" data from the 1st post in the thread to display on showthread.php.

In file includes\function.php, find function: " fetch_threadinfo"

FIND:

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

REPLACE WITH:

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

ABOVE:

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

Add:

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

ABOVE:

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

Add:

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

BELOW:

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

Add:

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

This will create $threadinfo['preview'] within showthread.php.
- This value can be added to the meta tag description in the $headerinclude to give each thread something other than $thread['title'].

We can also edit showthread.php

Find:

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

Replace:

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

This will allow {DESCRIPTION} to be added to be added to submitting bookmark URL's to fill out the textarea on submission vs. copy and paste.

EX: Digg

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


Last edited by Zachariah; 07 Sep 2009 at 14:54..
Views: 15883
Reply With Quote
Comments
  #2  
Old 09 Jul 2009, 20:57
viper357's Avatar
viper357 viper357 is offline
 
Join Date: Dec 2006
Will this work on 3.6.12?
Reply With Quote
  #3  
Old 09 Jul 2009, 21:20
HMBeaty's Avatar
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Real name: Brooks
Possibly since its just PHP edits. You would just need to make a backup of your files in case one of these lines doesn't coincide with the 3.6.12 files
__________________
"Our greatest weakness lies in giving up. The most certain way to succeed is always to try just one more time!"
"It's important to only think about what you desire, not what you fear to achieve your ultimate goal!!
Reply With Quote
  #4  
Old 05 Sep 2009, 03:09
abdobasha2004's Avatar
abdobasha2004 abdobasha2004 is offline
 
Join Date: Aug 2008
WOW !!
this is what I am search ing about
I will try
if it work you should have the Nobel prize in coding

--------------- Added 05 Sep 2009 at 03:31 ---------------

sorry it did not work
plz revise it
plz I need it so much
__________________
Egypt News website, latest Egyptian news updated instantly.

Last edited by abdobasha2004; 05 Sep 2009 at 03:31. Reason: Auto-Merged DoublePost
Reply With Quote
  #5  
Old 06 Sep 2009, 19:00
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
Did you then add something to your meta tags in headinclude? Exactly what did you add there?
__________________
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
  #6  
Old 07 Sep 2009, 00:14
abdobasha2004's Avatar
abdobasha2004 abdobasha2004 is offline
 
Join Date: Aug 2008
ofcourse i did
I put the
$thread['preview']
in meta description
may code is :
<if condition="$show['threadinfo']">
<meta name="keywords" content="<if condition="$threadinfo['taglist']">$threadinfo[taglist], </if>$foruminfo[forumkeywords], $threadinfo[prefix_plain_html] $threadinfo[title]"/>
<meta name="description" content="<if condition="$pagenumber>1"><phrase 1="$pagenumber">$vbphrase[page_x]</phrase>-</if>$thread[preview],$threadinfo[prefix_plain_html] $threadinfo[title] من $foruminfo[title_clean]" />

IT DID NOT WORK
__________________
Egypt News website, latest Egyptian news updated instantly.
Reply With Quote
  #7  
Old 07 Sep 2009, 04:38
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
You need to use the variable $threadinfo, not $thread.
__________________
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
  #8  
Old 07 Sep 2009, 14:58
Zachariah's Avatar
Zachariah Zachariah is offline
 
Join Date: Feb 2002
Location: Canoga Park, CA
Fixed
- Thanks Lynne for the heads up on the typeo
__________________
http://www.szone.us |

Facebook | My:Hacks @ vBulletin.org
Reply With Quote
  #9  
Old 07 Sep 2009, 15:46
abdobasha2004's Avatar
abdobasha2004 abdobasha2004 is offline
 
Join Date: Aug 2008
it worked like a charm using $threadinfo[preview]

THANKS Lynne
THANKS Zachariah

THANKS A LOT , you do not know how desprate I was to make this happen
you may know lynn Because of my "duplicates"
__________________
Egypt News website, latest Egyptian news updated instantly.
Reply With Quote
  #10  
Old 19 Sep 2009, 03:38
MagicThemeParks's Avatar
MagicThemeParks MagicThemeParks is offline
 
Join Date: Sep 2009
Was having a little trouble until I noticed this post on another thread

http://www.vbulletin.org/forum/showp...1&postcount=10
Reply With Quote
  #11  
Old 11 Oct 2009, 21:51
KrisP KrisP is offline
 
Join Date: Jun 2002
$threadinfo[preview] gives empty result. Have tried modding functions.php 3 times to make sure no typos. Still dosent work. I presume $tachyjoin (is found several places) is the place where it standss alone on the line. 3.7.4 PL

--------------- Added 11 Oct 2009 at 22:29 ---------------

For this mod to work "Length of Thread Preview Text" must be greater than zero in Forum DIsplay Options in vboptions.

INSTALLED AND THANKS!!!!

Last edited by KrisP; 11 Oct 2009 at 22:29. Reason: Auto-Merged DoublePost
Reply With Quote
  #12  
Old 13 Oct 2009, 23:34
Zachariah's Avatar
Zachariah Zachariah is offline
 
Join Date: Feb 2002
Location: Canoga Park, CA
Originally Posted by KrisP View Post
For this mod to work "Length of Thread Preview Text" must be greater than zero in Forum DIsplay Options in vboptions.

INSTALLED AND THANKS!!!!
ahh good point, I worked this up on default install of VB and "Length of Thread Preview Text" has a setting.
__________________
http://www.szone.us |

Facebook | My:Hacks @ vBulletin.org
Reply With Quote
  #13  
Old 24 Oct 2009, 20:44
KrisP KrisP is offline
 
Join Date: Jun 2002
Something that would be very nice would be a "bloginfo[preview]" - a meta desription for blogs
Reply With Quote
  #14  
Old 26 Feb 2010, 04:48
KrisP KrisP is offline
 
Join Date: Jun 2002
.......

Last edited by KrisP; 26 Feb 2010 at 05:53.
Reply With Quote
  #15  
Old 12 Jan 2011, 15:27
sivaganeshk sivaganeshk is offline
 
Join Date: Oct 2010
should I make changes in vb 4.1.1 version or made it default ?
Reply With Quote
Reply



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

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


New To Site? Need Help?

All times are GMT. The time now is 07:43.

Layout Options | Width: Wide Color: