Add to Mobile Home Screen

Add to Mobile Home Screen 1.4.1

No permission to download

SimonV

Well-known member
SimonV submitted a new resource:

Add to Mobile Home Screen - This addon opens an overlaying message inviting users to add your site to their mobile homescreen.

This is my first addon for XenForo so your feedback is welcomed.

This addon uses a JavaScript widget that opens an overlaying message inviting the user to add your website to their home screen.

The JavaScript used by this is called Add To Homescreen (ATH) and was made available via http://cubiq.org/add-to-home-screen under MIT Licence

Information


From http://cubiq.org/add-to-home-screen:

The...

Read more about this resource...
 
I'm so glad you've released this. Was looking at the cubiq website for this last week and it's been on my to do list.

Will install once this respects usergroup permission :)
 
Nevermind, I've installed it on a site that only gets visited by members anyway. Works great! :)

There's a typo in your description as well, dead link to cert forums.

If you customise the text, how you you insert the iOS icon, which is present in the default message?

upload_2015-1-2_12-6-21.webp
 
Actually, it looks like it uses conditionals to change the default text depending on the device type, is that right?

If so I don't think the %icon in the custom message will look good on Android device. I don't have one to test though.

Probably best to not use the icon if it's a custom message, unless you're able to add another field so you can have a custom iOS message and a custom Android message?
 
One thing to note is that modal isn't a great idea on phone sized devices in safari.

Now that the bottom menu hides when scrolling down, if this appears and modal locks the screen, you can't start to scroll up to get the 'add to home screen' button to appear.

A novice user who isn't familiar with what buttons are hidden might not know that they need to scroll up to view it, therefore the alert may cause them frustration if they don't know what to do and scrolling is locked.

If it was possible to activate modal only for tablets where the button is always visible, that could be an idea. Otherwise, probably best to leave it disabled.
 
SimonV updated Add to Mobile Home Screen with a new update entry:

Added enable addToHomescreen.removeSession()

Added an option to enable addToHomescreen.removeSession() which clears the current session. This is very useful when testing various options and the callout seems not to be willing to show up again. This is common because ATH is very conservative, to avoid showing the message by mistake it tries to show it the less as possible.

Also updated the 'Custom Message Text' field to be HTML compatible.

To Upgrade
Upgrade the addon with the new XML file, no need to upload the...

Read the rest of this update entry...
 
Actually, it looks like it uses conditionals to change the default text depending on the device type, is that right?

It appear so yes but I don't have a Android device to test.

EDIT: I just tested in debug mode using a browser and yes the icon changes and so does the default message text.

default.webp
 
Thanks @SimonV! works perfect! (y)

PVQocBk.gif
 
Last edited:
One thing to note is that modal isn't a great idea on phone sized devices in safari.

Now that the bottom menu hides when scrolling down, if this appears and modal locks the screen, you can't start to scroll up to get the 'add to home screen' button to appear.

A novice user who isn't familiar with what buttons are hidden might not know that they need to scroll up to view it, therefore the alert may cause them frustration if they don't know what to do and scrolling is locked.

If it was possible to activate modal only for tablets where the button is always visible, that could be an idea. Otherwise, probably best to leave it disabled.

I updated the setting 'Start Delay' to be able to hold a value of 0 which may minimise this a little.
 
Added a simple user group permission that gives the ability to set which user groups the message should be shown to, the defaults are 1,2 which is 'Registered' and 'Unregistered / Unconfirmed'. Simply enter usergroup ID's separated by a comma.
Does this work only for the Primary Usergroup? I have it set for a Secondary Usergroup and it doesn't appear to be working.
 
It uses a simple "isMemberOf" condition so yes will check both primary and secondary usergroups.

What are you trying to do and what do you have set?
 
Top Bottom