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) NeutralizeR is offline
Developer Last Online: Oct 2021 I like it Show Printable Version Email this Page

vB Version: 3.8.x Rating: (4 votes - 5.00 average) Installs: 16
Released: 20 Oct 2016 Last Update: 20 Oct 2016 Downloads: 219
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:	599
Size:	42.0 KB
ID:	155404   Click image for larger version

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

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

Name:	Snap5.png
Views:	400
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.
Comments
  #2  
Old 20 Oct 2016, 19:05
NeutralizeR NeutralizeR is offline
 
Join Date: Aug 2005
Template edits for validation.

Page Navigation Templates > pagenav
remove:

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

__________________
MsXLabs Forum

Last edited by NeutralizeR; 01 Nov 2016 at 15:51.
Reply With Quote
  #3  
Old 20 Oct 2016, 23:56
Brandon Sheley's Avatar
Brandon Sheley Brandon Sheley is offline
 
Join Date: Mar 2005
Real name: Brandon
It's crazy to see a vbulletin 3 mod released, thanks for sharing NeutralizeR
__________________

Love and support one another #vote2020
I offer Managed IT Services in Kansas
Reply With Quote
  #4  
Old 21 Oct 2016, 12:57
attilio's Avatar
attilio attilio is offline
 
Join Date: Apr 2007
Real name: Attilio
Can this mod work with vbulletin 4.2.4?
Reply With Quote
  #5  
Old 21 Oct 2016, 13:09
NeutralizeR NeutralizeR is offline
 
Join Date: Aug 2005
Originally Posted by attilio View Post
Can this mod work with vbulletin 4.2.4?
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...
__________________
MsXLabs Forum
Reply With Quote
  #6  
Old 21 Oct 2016, 21:11
zorcocuq zorcocuq is offline
 
Join Date: Apr 2011
Real name: Sinan
Thanks NeutralizeR.
__________________
webmaster sitesi
Reply With Quote
  #7  
Old 21 Oct 2016, 22:49
Nas.er Nas.er is offline
 
Join Date: Mar 2016
Real name: Naser
Thanks NeutralizeR
Reply With Quote
  #8  
Old 24 Oct 2016, 06:24
Goomzee Goomzee is offline
 
Join Date: Apr 2008
Real name: 84962726515
I am using 3.8.2 and not works
__________________
internetpharmacydir.com
Reply With Quote
  #9  
Old 26 Oct 2016, 09:01
Wana Maly Wana Maly is offline
 
Join Date: Oct 2016
Real name: Mostafa Hamouda
thank you too much
I added it to my forum with some edits
example: http://vb.elmstba.com/amp.php?t=28465

http://vb.elmstba.com/t28465.html
Reply With Quote
  #10  
Old 26 Oct 2016, 11:10
NeutralizeR NeutralizeR is offline
 
Join Date: Aug 2005
Originally Posted by Goomzee View Post
I am using 3.8.2 and not works
Need more detail... Check the examples in the code.

Originally Posted by Wana Maly View Post
thank you too much
I added it to my forum with some edits
example: http://vb.elmstba.com/amp.php?t=28465

http://vb.elmstba.com/t28465.html
You need to fix the validation errors:
Snap1.jpg

For example, you can't use "style" on elements. Add a "class" instead.


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


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

and add your style as ".normalfont {font-weight:normal}" to your "ampthread" template.

I guess that part comes from pagination template. You can edit and remove the "style" part, too.
__________________
MsXLabs Forum
Reply With Quote
  #11  
Old 27 Oct 2016, 16:54
unp unp is offline
 
Join Date: Oct 2008
I am using a plugin to proxy cache remote images for https.

This is my class_bbcode-


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

And this is the plugin I am using-


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

Kindly help.
Reply With Quote
  #12  
Old 27 Oct 2016, 20:14
NeutralizeR NeutralizeR is offline
 
Join Date: Aug 2005
Modify your class_bbcode.php as told in first post.

Replace your plugin with:

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

__________________
MsXLabs Forum
Reply With Quote
  #13  
Old 30 Oct 2016, 10:23
Masterix Masterix is offline
 
Join Date: Jan 2008
Need an rewriterule forVBSEO

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!

Last edited by Masterix; 05 Nov 2016 at 07:58.
Reply With Quote
  #14  
Old 30 Oct 2016, 18:08
NeutralizeR NeutralizeR is offline
 
Join Date: Aug 2005
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:

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

or

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

__________________
MsXLabs Forum
Reply With Quote
  #15  
Old 01 Nov 2016, 15:15
beansbaxter's Avatar
beansbaxter beansbaxter is offline
 
Join Date: May 2005
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!
__________________
PNW Moto - Motorcycle riders in Washington, Oregon, Idaho
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 21:55.

Layout Options | Width: Wide Color: