The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Accelerated Mobile Pages for vBulletin Details »» | |||||||||||||||||||||||||||||
Accelerated Mobile Pages for vBulletin
Developer Last Online: Oct 2021
What is AMP?
https://www.ampproject.org/ Info When Google announced AMP, I realized I'd eventually need AMP support for my vBulletin forum. After reading the AMP implementation docs, I decided to modify printthread.php file since It only displays the basic elements and contents of a thread. So, you got the idea... Implementation
I installed a fresh vBulletin 3.8 to my localhost and tested this mod. It should work just fine unless your vBulletin is highly modified. If you get validation errors, I believe you can fix them by looking at the examples (comments). Does it work?
Snap2.png Snap3.png Snap4.png Snap5.png Credits Accelerated Mobile Pages for vBulletin 3.8 is created by NeutralizeR from https://www.msxlabs.org Download Now
Show Your Support
|
12 благодарности(ей) от: | ||
A.Chakery, Abu1, blind-eddie, bond010007, Brandon Sheley, Kane@airrifle, LeventX, m7sen, Masterix, Nas.er, PinkMilk, z3r0 |
Comments |
#12
|
|||
|
|||
I am using a plugin to proxy cache remote images for https.
This is my class_bbcode- PHP Code:
PHP Code:
|
#13
|
|||
|
|||
Modify your class_bbcode.php as told in first post.
Replace your plugin with: Code:
$url = parse_url($link); //amphack if (THIS_SCRIPT == 'amp') { if ($url['scheme'] == 'https') { $retval = ($fullsize ? '<div class="size_fullsize">' : '') . '<amp-img layout="responsive" src="' . $link .'" alt="" />' . ($fullsize ? '</div>' : ''); } elseif ($url['host'] == 'www.site.com') { $retval = ($fullsize ? '<div class="size_fullsize">' : '') . '<amp-img layout="responsive" src="' . $link .'" alt="" />' . ($fullsize ? '</div>' : ''); } else { $retval = ($fullsize ? '<div class="size_fullsize">' : '') . '<amp-img layout="responsive" src="cache.php?img=' . rawurlencode($link) .'" alt="" />' . ($fullsize ? '</div>' : ''); } } else { if ($url['scheme'] == 'https') { $retval = ($fullsize ? '<div class="size_fullsize">' : '') . '<img src="' . $link .'" border="0" alt="" />' . ($fullsize ? '</div>' : ''); } elseif ($url['host'] == 'www.site.com') { $retval = ($fullsize ? '<div class="size_fullsize">' : '') . '<img src="' . $link .'" border="0" alt="" />' . ($fullsize ? '</div>' : ''); } else { $retval = ($fullsize ? '<div class="size_fullsize">' : '') . '<img src="cache.php?img=' . rawurlencode($link) .'" border="0" alt="" />' . ($fullsize ? '</div>' : ''); } } //amp hack |
#14
|
|||
|
|||
Installed but VBSEO rewrite showthread.php
Any Help? OK, my bad https://www.elo-forum.org/amp.php?t=92082&page=5 anyway need to add or change a rewriterule? EDIT Ok, with vbseo you dont need any rewriterule! Goto your VBSEO-Admincp. Select: "General Settings" -> "vBSEO Basic Settings". Scoll down to "Exclusion of pages?". Add there amp.php and save your settings. Btw. Thanks in advance! |
#15
|
|||
|
|||
You don't actually need to rewrite AMP pages. AMP pages will be served by Google once they are crawled.
You can try these Custom Rewrite Rules for vBSEO: Code:
'^amp\.php\?t=(\d+)' => 'amp/$1.html' Code:
'^amp\.php\?t=(\d+)&page=(\d+)$' => 'amp/$1-$2.html' |
#16
|
||||
|
||||
Installed on 3.8.8 PL2 and seems to work... however, the website is in English and Chrome thinks the AMP page is in Turkish and wants to translate? How to resolve?
Example Thread - http://pnwmoto.com/amp/2425.html And thanks for building this mod! |
Благодарность от: | ||
NeutralizeR |
#17
|
|||
|
|||
Quote:
Code:
<html amp lang="tr"> Code:
<html amp lang="en"> |
Благодарность от: | ||
beansbaxter |
#18
|
||||
|
||||
You beat me to it! I found out where the problem was happening, made the edit, and came back to this thread to find you already posted a fix. Thanks!
|
#19
|
||||
|
||||
Great everything works...
I too am running vBSEO. Not sure if this is possible, is there a way to change the AMP permalink structure to match up with vBSEO URL's? And to convert the vBSEO Printable Thread URL's to the AMP version? Examples below: -- Currently, the vBSEO Print Thread structure is: Code:
[forum_title]/[thread_id]-[thread_title]-print.html Code:
[forum_title]/[thread_id]-[thread_title]-amp.html Currently, the vbSEO Print Thread Pagination: Code:
[forum_title]/[thread_id]-[thread_title]-[thread_page]-print.html Code:
[forum_title]/[thread_id]-[thread_title]-[thread_page]-amp.html And then how to change the AMP permalink to match up? Thoughts? |
#20
|
|||
|
|||
AMP version of threads are unaffaced by vBSEO on my setup. I guess you are tying to make vBSEO powered AMP threads. It will require some edits in vbseo\includes.
You currently have two canonical tags on your AMP threads. Remove the one in ampthread template. Check my second post, edit your pagenav template. Finally, you should remove <base href...> tag from your AMP threads. I think it is added by vBSEO, too. You must see the "AMP validation successful." message in your developer console log. http://pnwmoto.com/amp/2425.html#development=1 Example: Attachment 155444 |
#21
|
|||
|
|||
Once Googlebot crawls your AMP thread, (and if it returns valid AMP status code) Google will save a copy of your page to their servers.
So, when Google pushes AMP content for all kind of websites to mobile search results (soon), your AMP thread will be served via Google. This is what I know and I did not make any extra SEO efforts for AMP threads, based on this information. |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|