![]() |
|
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
![]() Rating:
![]() 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:
REPLACE WITH:
ABOVE:
Add:
ABOVE:
Add:
BELOW:
Add:
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:
Replace:
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
The following members like this post: Digital Jedi
Last edited by Zachariah; 07 Sep 2009 at 15:54.. |
||||||||||||||||||||||||||||||||||||||||||||
Views: 16679
|
Comments |
#2
|
||||
|
||||
Will this work on 3.6.12?
No members have liked this post.
|
#3
|
||||
|
||||
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!! No members have liked this post.
|
#4
|
||||
|
||||
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 04:31 --------------- sorry it did not work plz revise it plz I need it so much No members have liked this post.
Last edited by abdobasha2004; 05 Sep 2009 at 04:31. Reason: Auto-Merged DoublePost |
#5
|
||||
|
||||
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.) No members have liked this post.
|
#6
|
||||
|
||||
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 ![]() No members have liked this post.
|
#7
|
||||
|
||||
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.) No members have liked this post.
|
#8
|
||||
|
||||
Fixed
![]() - Thanks Lynne for the heads up on the typeo No members have liked this post.
|
#9
|
||||
|
||||
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" ![]() ![]() No members have liked this post.
|
#10
|
||||
|
||||
Was having a little trouble until I noticed this post on another thread
![]() http://www.vbulletin.org/forum/showp...1&postcount=10 No members have liked this post.
|
#11
|
|||
|
|||
$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 23: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!!!! No members have liked this post.
Last edited by KrisP; 11 Oct 2009 at 23:29. Reason: Auto-Merged DoublePost |
#12
|
||||
|
||||
ahh good point, I worked this up on default install of VB and "Length of Thread Preview Text" has a setting.
No members have liked this post.
|
#13
|
|||
|
|||
Something that would be very nice would be a "bloginfo[preview]" - a meta desription for blogs
![]() No members have liked this post.
|
#14
|
|||
|
|||
.......
No members have liked this post.
Last edited by KrisP; 26 Feb 2010 at 06:53. |
#15
|
|||
|
|||
should I make changes in vb 4.1.1 version or made it default ?
No members have liked this post.
|
![]() |
«
Previous Article
|
Next Article
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Article Options | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 01:02.