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: 181
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.
  #46  
Old 17 Aug 2018, 03:55
m7sen m7sen is offline
 
Join Date: Mar 2014
hi

thanks for this addon , I did it on 3.8.8
but it doesn't work when I check the console log, it said this


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

- I also test it on https://search.google.com/test/amp

it said:
Custom JavaScript is not allowed.
line 446:5

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

I tried to remove Google Analytics but it doesn't work!

Update ***************

I fix it.
open ampthread template.

search on:

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

move it to be above

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

search on

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

add this under it

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

--------------------

Another issue comes on theads pages
https://www.xxxxxx.com/vb/amp.php?t=127909&page=140

is will give you this error on amp google test

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

i tried to fix it, and it's work with me but I don't know if it currect
go to pagenav tamplete
search on:

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

change it to:

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

End ***************

* There are general issue
very important! must add schema.org data

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

but the problem is I don't know how to edit the information like:

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

so I tried to make it by using
https://www.google.com/webmasters/markup-helper/

search on

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

add this under it

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

now the problem in those

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

I tried to fix it but it doesn't show on "View page source"

another issue, there is no choose to turn amp off or run it again.

* My issue
- I have an issue using DBSEO, need to change the link to be

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

i tried any&every thing

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

but nothings work!

I also need to make the template RTL.

some Idea !

- I wonder if It possible to make all style as amp ? such forums and user profile ?

- Is it possible to make copy from the archive folder and rename it to amp and make the editing to be amp ? and add script or meta name to head-include template !

any help ?

Last edited by m7sen; 19 Aug 2018 at 00:39.
Reply With Quote
  #47  
Old 19 Aug 2018, 00:50
m7sen m7sen is offline
 
Join Date: Mar 2014
Bugs!


I got new issue from theards in the posts

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



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

I'm trying to fix it.

I i tried to fix this line in class_bbcode.php file

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

to be

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

but nothing happend!

the problem is this line

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

in class_bbcode.php file doesn't affect the posts!
Its just affect the first post only!

---------------

css 'tg' & 'table' issue

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

I think the problem from bbcode_quote tamplete

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

I couldn't fix it

I'm afraid I must to remove every things! because those issues make the site die.
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 12:55.

Layout Options | Width: Wide Color: