Accelerated Mobile Pages for vBulletin [vB3]
Accelerated Mobile Pages for vBulletin [vB3]
- vB Sürümü:Bilinmiyor
- Değerlendirme:
- Kurulan:0
- Yayınlanış:04.Ekim.2017
- Son Güncelleme:Belirsiz
- İndirme: 11
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
- You will upload 1 file to forum root: amp.php
- You will edit /includes/class_bbcode.php and edit/replace a few lines.
- You will add two new templates, and edit a few.
- You will probably want to customize the <style amp-custom> CSS in ampthread template.
Demo
- Visit any thread from https://www.msxlabs.org homepage.
- Scroll down to footer; you will see the AMP link at the left bottom corner, click on it. It will open the AMP version of the thread.
- The link is there for quick access to AMP version of a thread, It is not mandatory, nor It is used by AMP recognation.
Installation
- Download and extract the ZIP file.
- Upload the amp.php file to your forum root folder (same folder with showthread.php)
- Add a new template called "ampthread" and copy the template content from ampthread_template.txt file.
- Add a new template called "ampthreadbit" and copy the template content from ampthreadbit_template.txt file.
- Edit your bbcode_quote template and replace It's content with bbcode_quote.txt file's.
- Edit includes/class_bbcode.php, find:
replace with
find:
replace with:
Save and upload class_bbcode.php (overwrite).
Edit SHOWTHREAD template and add
- before </head>. Don't forget to change "yourforum.com" URL with yours.
- Edit ampthread template and change "vbulletin.com" with your forum URL:
Notes
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?
- Open a thread from your forum.
- Replace the "showthread.php" with "amp.php" in the address bar, hit enter.
- Add "#development=1" at the end of the URL and refresh the page.
- Open Chrome DevTools, check the console log, it should say "AMP validation successful."
Destek sistemi
- Bu mod, kopyalanamaz, çoğaltılamaz veya yazarın izni olmaksızın başka bir yerde yayınlanamaz.