Log in

View Full Version : Board Optimization - Progressive Web App [PWA] for vBulletin


iA1
11-02-2018, 10:00 PM
Progressive Web App for vBulletin

Overview:

Progressive Web App (PWA) is a collection of latest technologies for web and mobile apps.

A Progressive Web App is:
Progressive - Works for every user, regardless of browser choice because it's built with progressive enhancement as a core tenet.
Responsive - Fits any form factor: desktop, mobile, tablet, or whatever is next.
Connectivity independent - Enhanced with service workers to work offline or on low-quality networks.
App-like - Feels like an app, because the app shell model separates the application functionality from application content .
Fresh - Always up-to-date thanks to the service worker update process.
Safe - Served via HTTPS to prevent snooping and to ensure content hasn't been tampered with.
Discoverable - Is identifiable as an "application" thanks to W3C manifest and service worker registration scope, allowing search engines to find it.
Re-engageable - Makes re-engagement easy through features like push notifications.
Installable - Allows users to add apps they find most useful to their home screen without the hassle of an app store.
Linkable - Easily share the application via URL, does not require complex installation.


This product allows you to design a PWA for your forum using a simple service worker for offline webpage. For best experience, use this in combination with Web Push notifications (https://vbulletin.org/forum/showthread.php?t=326558). Read more about PWA here: https://developers.google.com/web/progressive-web-apps/



Pre-requisites:

To fully benefit from PWA, your forum must fulfill the following:

HTTPS enabled
Responsive style



Optional


Install Web Push Notifications, https://vbulletin.org/forum/showthread.php?t=326558
Upload your forum logo images with at least two sizes, 512x512 and 128x128 pixel


With PWA and web push, you no longer need an app on Play store.


To Install:


Upload the files from upload folder of attached zip to your forum root directory
Modify manifest.json file as per your forum requirement and upload it to your forum root directory.
If you are using the Web Push Notifications product, you may already have manifest.json file on your server. Simply modify that file and fill the missing tags
Install the product using the xml file in AdminCP -> Plugins & Products -> Manage Products -> Add/Import Product.

Click Installed. Keep your mobile users engaged.


Backup/Warning:

This product does not alter your database, however it is always good practice to make regular backups and you should make a backup before installing ANY new mod.

As always, products are USE AT YOUR OWN RISK. I will provide support and do my best to help but no absolute guarantee is offered.


Demo

Visit https://www.vb4mobile.com using your smartphone browser. You will see a banner at the bottom asking you to add vB4Mobile to home screen.

https://i.imgur.com/txe1Non.png

https://i.imgur.com/PpceHCM.png

https://i.imgur.com/UHKC1bO.png

If you run PWA audit using Chrome Developer Tools, it shows 100%.

https://vborg.vbsupport.ru/external/2018/11/1.png



Licence Agreement

This modification is provided "AS IS" without any liability whatsoever on the developer.
This modification is released under the All Rights Reserved licence.
You may not redistribute the package in whole or significant part.
All copyright notices must remain unchanged and visible.
You may provide phrase .xml files for other languages on any site,
but you may not provide the full product .xml file - only the phrases.

=====PLEASE DO NOT REDISTRIBUTE=====

This product is available on https://vbulletin.org only. No other sites may redistribute this mod. If you find this mod at any site besides the above please contact me by PM


Please "Mark as Installed (https://vbulletin.org/forum/vborg_miscactions.php?do=installhack&threadid=326873)" if you use this.
Donations (https://vbulletin.org/forum/showthread.php?t=326873&nojs=1#gtdonate) are always welcome


Paid support is available for Responsive Style and setting up PWA on your forum. (https://www.vb4mobile.com/sendmessage.php)

iA1
11-03-2018, 06:15 PM
The only file that you have to edit is the manifest.json file.


{
"name" : "vB 4 Mobile",
"short_name" : "vB4Mobile",
"scope" : "/",
"display" : "standalone",
"start_url" : "/",
"theme_color" : "#7192a8",
"description" : "vBulletin 4 Mobile, Responsive and PWA",
"orientation" : "any",
"background_color" : "#7192a8",
"icons": [
{
"src": "/images/vBlogo.png",
"type": "image/png",
"sizes": "512x512"
}
]
}


All fields are self-explanatory. name, short_name, description, theme_color, background_color. For the icon, upload at least one square image of size 512x512 and update "src" field by replacing "/images/vBlogo.png" with the path to your own logo image.

For information on how to write manifest.json, visit https://developers.google.com/web/fundamentals/web-app-manifest/

If you are using Web Push notifications add-on (https://vbulletin.org/forum/showthread.php?t=326558), then you will also have "gcm_sender_id" field at the end.

Update:

For iOS, add this line in headinclude template:

<link rel="apple-touch-icon" href="https://yourdomain.com/logo192x192.png">


Replace the logo image link with a square image of 192x192 pixel.

rodriiverduguez
11-04-2018, 01:44 PM
If I understood correctly, this product will make my site Responsive? If so, I will apply it and see the changes. obviously always make a backup

iA1
11-04-2018, 01:49 PM
No, this does not make your site responsive. You will need a responsive style for that.

This is Progressive Web App, which makes your site similar to a mobile app in certain ways.

MrZeropage
11-05-2018, 09:04 PM
I installed it on vB4.2.5 (PHP7.0) and... no effect.
Using my iPhone with Safari and Chrome, it still shows the same mobile Style from vB, no change to see.

iA1
11-06-2018, 03:45 PM
For iOS, add this line in headinclude template:

<link rel="apple-touch-icon" href="https://yourdomain.com/logo192x192.png">


Replace the logo image link with a square image of 192x192 pixel.



PWA works differently on iOS.

According to https://medium.com/@firt/progressive-web-apps-on-ios-are-here-d00430dee3a7 , you will have to look for the Add to Home Screen button in share options.

If you are able to find it, please post some screenshots for other users. I don't have an iPhone to test it out.

What PWAs can do on Android and not on iOS

On Android you can store more than 50 Mb
Android doesn’t delete the files if you don’t use the app, but it can delete the files under storage pressure. Also, if installed or used a lot by the user the PWA can request Persistent Storage
Bluetooth access for BLE devices
Web Share for accessing native share dialog
Speech Recognition
Background Sync and Web Push Notifications
Web App Banner to invite the user to install the app
You can customize (a little bit) the splash screen and the orientations you want
With WebAPK and Chrome, users can’t install more than one instance of a PWA
With WebAPK and Chrome, the PWAs appears under Settings and you can see data usage; on iOS everything appears under Safari
With WebAPK and Chrome, the PWA manages intents for its URL, so if you get a link to the PWA, it will be opened in standalone mode and not within the browser’s window.


What PWAs can do on iOS and not on Android

Users can change icon’s name before installing it
They can be configured in a configuration profile, so corporate users can receive PWAs shortcuts from the company (that’s a good one!). Safari uses the term WebClip for this feature; however it doesn’t seem to be reading the Web App Manifest (according to the documentation)

scottkoz20
11-12-2018, 02:52 PM
So, if I understand this right, I need to have your responsive style, which you offer as a paid service in order for this modification?

iA1
11-12-2018, 03:56 PM
So, if I understand this right, I need to have your responsive style, which you offer as a paid service in order for this modification?

It doesn't have to be my responsive style. Any responsive style will do. Even the mobile style that you get bundled with vB 4 will work fine.

Making a responsive style requires time and effort. As far as I know, there is no freely available responsive style for vB 3 and vB 4 at the moment.

scottkoz20
11-12-2018, 07:34 PM
Making a responsive style requires time and effort. As far as I know, there is no freely available responsive style for vB 3 and vB 4 at the moment.

I get that completely - I wanted to be sure that the requirements was something that did not require it to be something that you had specifically done. I'll test this out on my site over the next week

Brandon Sheley
11-13-2018, 09:56 AM
interesting, about time another mobile option came out
Hopefully it's not to late or expensive ;)

CharlieDelta
11-26-2018, 02:08 PM
Interesting. Will check this out.

CharlieDelta
11-26-2018, 02:20 PM
The banner is not displaying when I visit https://www.vb4mobile.ml/ on my phone using both Chrome and Firefox browsers.

iA1
11-26-2018, 03:51 PM
The banner is not displaying when I visit https://www.vb4mobile.ml/ on my phone using both Chrome and Firefox browsers.

Is it an Android phone? I can see it on my android phone.

This products enables PWA for your site, but displaying the Add to Home Screen banner is browser dependent. Each browser decides how and when to display the banner or not to display it at all. We don't have any control over it. We only enable all the features required to display it.

iA1
07-10-2019, 05:55 PM
https://vborg.vbsupport.ru/

See the icon on lower-right corner, beside the camera

Works on all Android devices. iOS is not yet supported.

Update:

For iOS, add this line in headinclude template:

<link rel="apple-touch-icon" href="https://yourdomain.com/logo192x192.png">


Replace the logo image link with a square image of 192x192 pixel.

scottkoz20
10-19-2019, 02:46 PM
still no support for iOS correct?

iA1
10-28-2019, 03:51 AM
still no support for iOS correct?

For iOS, add this line in headinclude template:

<link rel="apple-touch-icon" href="https://yourdomain.com/logo192x192.png">


Replace the logo image link with a square image of 192x192 pixel.

scottkoz20
10-30-2019, 10:47 AM
For iOS, add this line in headinclude template:

<link rel="apple-touch-icon" href="https://yourdomain.com/logo192x192.png">


Replace the logo image link with a square image of 192x192 pixel.

I had put this in the header, not headinclude... :rolleyes:


Thanks,
SK