The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Adding <link rel="prev" etc
Has anyone been successful in adding <link rel="prev and "next" tags in their threads? I see most current software is doing this regardless of physical pagination.
|
#2
|
|||
|
|||
I try it with the
Code:
<if condition="$show['next']"><link rel="next" href="$address$address2&page=$nextpage</if> <if condition="$show['prev']"><link rel="prev" href="$address$address2<if condition="$prevpage != 1">&page=$prevpage</if></if> |
Благодарность от: | ||
ozzy47 |
#3
|
||||
|
||||
Thanks for posting the suggestion, even though the question was asked thirteen months ago.
|
#4
|
|||
|
|||
But is not solved.
I try something in the function.php by line 2405 to add the headinclude, but it doesnt work. |
#5
|
||||
|
||||
Just to be clear, you are trying too add something like in the attached screenshot?
|
#6
|
|||
|
|||
Quote:
PHP Code:
Edit: (I replaced the above code - I copied the wrong version). |
#7
|
|||
|
|||
Works fine with this code:
Code:
if ($pagenumber > 1) { global $headinclude; $prevpage = $pagenumber - 1; $prevnumbers = fetch_start_end_total_array($prevpage, $perpage, $results); $show['prev'] = true; $headinclude .= "<link rel=\"prev\" href=\"{$address}&page={$prevpage}\">\n"; } if ($pagenumber < $totalpages) { global $headinclude; $nextpage = $pagenumber + 1; $nextnumbers = fetch_start_end_total_array($nextpage, $perpage, $results); $show['next'] = true; $headinclude .= "<link rel=\"next\" href=\"{$address}&page={$nextpage}\">\n"; } |
#8
|
|||
|
|||
How would you do this without making changes to functions.php?
Is there a way to get the variables you need by using a plugin? Been stumped on this one for a while. Cheers, hilaryl |
#9
|
|||
|
|||
So, is there a solution for adding prev / next in head?
PP - Sorry, the code above works fine - thank you |
#10
|
|||
|
|||
Quote:
Have been looking for a solution to this issue for a while now - and this is perfect. Had to tweak a few things to allow for my URL structure - but it's working perfectly now. Also added in an if statement to cater for being on page 2 and not including a 'page=1' to the previous page. THANK YOU VERY MUCH!! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|