Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Accelerated Mobile Pages for vBulletin Details »
Accelerated Mobile Pages for vBulletin
Mod Version: 1.00, by NeutralizeR (Coder/Designer) NeutralizeR is offline
Developer Last Online: Jul 2019 I like it Show Printable Version Email this Page

vB Version: 3.8.x Rating: (4 votes - 5.00 average) Installs: 15
Released: 20 Oct 2016 Last Update: 20 Oct 2016 Downloads: 183
Not Supported Template Edits Code Changes Additional Files Re-usable Code Translations  

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
  1. You will upload 1 file to forum root: amp.php
  2. You will edit /includes/class_bbcode.php and edit/replace a few lines.
  3. You will add two new templates, and edit a few.
  4. You will probably want to customize the <style amp-custom> CSS in ampthread template.
Demo
  1. Visit any thread from https://www.msxlabs.org homepage.
  2. 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.
  3. 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
  1. Download and extract the ZIP file.
  2. Upload the amp.php file to your forum root folder (same folder with showthread.php)
  3. Add a new template called "ampthread" and copy the template content from ampthread_template.txt file.
  4. Add a new template called "ampthreadbit" and copy the template content from ampthreadbit_template.txt file.
  5. Edit your bbcode_quote template and replace It's content with bbcode_quote.txt file's.
  6. Edit includes/class_bbcode.php, 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.

    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.

  7. Save and upload class_bbcode.php (overwrite).
  8. Edit SHOWTHREAD template and add
    Block Disabled:      (Update License Status)  
    Suspended or Unlicensed Members Cannot View Code.

    before </head>. Don't forget to change "yourforum.com" URL with yours.
  9. Edit ampthread template and change "vbulletin.com" with your forum URL:
    Block Disabled:      (Update License Status)  
    Suspended or Unlicensed Members Cannot View Code.

  10. You will find some comments in amp.php and ampthread template; modify them according to your needs (optional).
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?

  1. Open a thread from your forum.
  2. Replace the "showthread.php" with "amp.php" in the address bar, hit enter.
  3. Add "#development=1" at the end of the URL and refresh the page.
  4. Open Chrome DevTools, check the console log, it should say "AMP validation successful."
Screenshots
Attachment 155404

Attachment 155405

Attachment 155406

Attachment 155407

Credits
Accelerated Mobile Pages for vBulletin 3.8 is created by NeutralizeR from https://www.msxlabs.org

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	Snap2.png
Views:	496
Size:	42.0 KB
ID:	155404   Click image for larger version

Name:	Snap3.png
Views:	403
Size:	94.9 KB
ID:	155405   Click image for larger version

Name:	Snap4.png
Views:	369
Size:	26.2 KB
ID:	155406   Click image for larger version

Name:	Snap5.png
Views:	328
Size:	54.9 KB
ID:	155407  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
  #31  
Old 04 Nov 2016, 21:15
nw-fotografie nw-fotografie is offline
 
Join Date: Mar 2016
Great job! Thanks a lot!

Originally Posted by NeutralizeR View Post
Helped via PM.

Note: I can't answer all questions via PM but I'll try to help you fix the validation issues. I believe we covered most of them. Some plugins globally add codes/lines to many vB pages, including AMP. You should exclude them for AMP threads.
Reply With Quote
  #32  
Old 05 Nov 2016, 07:53
Masterix Masterix is offline
 
Join Date: Jan 2008
Thumbs up VBSEO Settings with AMP to get unchanged Links/Urls

Originally Posted by NeutralizeR View Post
You don't actually need to rewrite AMP pages. AMP pages will be served by Google once they are crawled.
[...]
Thats right but you need to change your vBSEO-settings to get AMPlike-URLs
See there http://www.vbulletin.org/forum/showp...6&postcount=13

Thanks again for your top Addon !
Reply With Quote
  #33  
Old 05 Nov 2016, 13:56
unp unp is offline
 
Join Date: Oct 2008
Kindly share if anyone use and figure how to disable ame on amp pages.

http://www.vbulletin.org/forum/showthread.php?t=303416

or a possible alternative to ame.
Reply With Quote
  #34  
Old 07 Nov 2016, 14:18
NeutralizeR NeutralizeR is offline
 
Join Date: Aug 2005
Originally Posted by unp View Post
Kindly share if anyone use and figure how to disable ame on amp pages.

http://www.vbulletin.org/forum/showthread.php?t=303416

or a possible alternative to ame.
Check these pages:
https://www.ampproject.org/docs/guides/amp_replacements
https://www.ampproject.org/docs/guides/iframes

Check the preg_replace examples in the amp.php file.

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

__________________
MsXLabs Forum
Reply With Quote
  #35  
Old 09 Jan 2017, 23:16
citeman citeman is offline
 
Join Date: Feb 2008
Hi NeutralizeR, Thanks for this incredible mod to get AMP threads going.

I am however unable to get the url structure of the AMP threads to be like yours - .org/forum/amp/249347.html.

Adding the VBSEO custom rewrite rule:


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

Is giving an error when I try to load the rewritten URL. Am I missing something here?
Reply With Quote
  #36  
Old 29 Jan 2017, 19:58
Emad ELsayed's Avatar
Emad ELsayed Emad ELsayed is offline
 
Join Date: Feb 2013
Hello dear
Thank you very much for the featured product
Installation was successfully 3.8.10
Please check my site and whether everything is fine

http://www.lover3moon.com/vb/showthread.php?t=184366
http://www.lover3moon.com/vb/amp.php?t=184366

I have error when checking link
https://validator.ampproject.org/#ur...p%3Ft%3D184366

Best regards

Last edited by Emad ELsayed; 30 Jan 2017 at 09:04.
Reply With Quote
  #37  
Old 31 Jan 2017, 13:58
carlosacgj carlosacgj is offline
 
Join Date: Apr 2006
Originally Posted by Emad ELsayed View Post
Hello dear
Thank you very much for the featured product
Installation was successfully 3.8.10
Please check my site and whether everything is fine

http://www.lover3moon.com/vb/showthread.php?t=184366
http://www.lover3moon.com/vb/amp.php?t=184366

I have error when checking link
https://validator.ampproject.org/#ur...p%3Ft%3D184366

Best regards
I have the same validation problems and I thought that only happened to me ....
Reply With Quote
  #38  
Old 19 Mar 2017, 19:57
dr-php dr-php is offline
 
Join Date: Sep 2007
Hello,

plugin not working with me

we show blank page on visit any post included amp

example :

http://www.amalh.net/test/amp.php?t=1
Reply With Quote
  #39  
Old 11 May 2017, 00:33
hosamalzagh hosamalzagh is offline
 
Join Date: Oct 2015
Originally Posted by carlosacgj View Post
I have the same validation problems and I thought that only happened to me ....
i can repair all error for 50$
Reply With Quote
  #40  
Old 08 Jun 2017, 17:27
FelipeB FelipeB is offline
 
Join Date: Feb 2014
Originally Posted by NeutralizeR View Post
It is possible. I guess somebody else can create a vB 4 version of this mod.

I'll do it when I have time, if nobody else is willing to do...
Is there some news about this?
Reply With Quote
  #41  
Old 26 Jun 2017, 06:58
pri.studynama pri.studynama is offline
 
Join Date: Jan 2015
Real name: Priyanka
Smile

Originally Posted by NeutralizeR View Post
It is possible. I guess somebody else can create a vB 4 version of this mod.

I'll do it when I have time, if nobody else is willing to do...
Hi NeutralizeR,

Great mod! I am using VB 4.2.4 and keen to use this on my site. Do you have plans to release this for VB 4.x? Or can you guide me with the process to implement this on my 4.2.4 site.

Cheers,
An avid VB user!
Reply With Quote
  #42  
Old 24 Aug 2017, 11:44
Akeles Akeles is offline
 
Join Date: May 2010
I added it to my forum with some edits
Reply With Quote
  #43  
Old 10 Dec 2017, 16:02
dany_danay dany_danay is offline
 
Join Date: Jul 2009
Someone can edit to 4.2?
Reply With Quote
  #44  
Old 10 Dec 2017, 17:08
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
Originally Posted by dany_danay View Post
Someone can edit to 4.2?
Honestly, I would avoid Google AMP. If you do a bit of researching you'll see that it has more negatives than positives, including decreased ad-revenue. It's all aimed at speed. So unless that's your main goal, don't use it.
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #45  
Old 14 Feb 2018, 10:16
unitedpunjab's Avatar
unitedpunjab unitedpunjab is offline
 
Join Date: Feb 2006
Real name: Dhillon
attachments are not showing on amp pages, any solution ?
Reply With Quote
Reply

Tags
accelerated mobile pages, amp, amp for vbulletin, google amp


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod 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


New To Site? Need Help?

All times are GMT. The time now is 10:27.

Layout Options | Width: Wide Color: