Module: Automatic Mobile Template
Posted by Brian Moon
All files from this thread
| File Name | File Size | Posted by | Date | ||
|---|---|---|---|---|---|
| mod_mobile-1.0.1.tar.gz | 2.1 KB | open | download | Brian Moon | 03/28/2011 | Read message |
| mod_mobile-1.0.1.zip | 2.9 KB | open | download | Brian Moon | 03/28/2011 | Read message |
| photo.PNG | 65.7 KB | open | download | Durtdawber | 04/08/2011 | Read message |
| mod_mobile-1.0.2.zip | 3.3 KB | open | download | Bruno | 09/07/2011 | Read message |
|
February 27, 2011 09:01AM |
Admin Registered: 12 years ago Posts: 2,842 |
This module lets you pick a template to have automatically enabled when a mobile device is detected. You can select the template to use and you can enter the user agent keywords to look for to enable the template. There is a new Mobile Template that works with this module. Feel free to make your own.
This module is running here at Phorum.org.
Edited 3 time(s). Last edit at 03/28/2011 02:47PM by Thomas Seifert.
This module is running here at Phorum.org.
Changelog:
----------
2010-03-28 v1.0.1 Thomas Seifert
- added the file page to the allowed pages and category, version fields to info.txt
2010-02-27 v1.0.0
- initial release by Brian Moon
Brian - Cowboy Ninja Coder - Personal Blog - Twitter
Edited 3 time(s). Last edit at 03/28/2011 02:47PM by Thomas Seifert.
|
March 02, 2011 06:19PM |
Registered: 5 years ago Posts: 521 |
The phrase "New Topic" becomes simply "New" even when viewing from the PC (normal template) after having enabled the mobile template.
Robert Angle
Phorum lover, nothing more.
Ruminations
Robert Angle
Phorum lover, nothing more.
Ruminations
|
March 04, 2011 07:46AM |
Registered: 5 years ago Posts: 521 |
Quote
Robert Angle
The phrase "New Topic" becomes simply "New" even when viewing from the PC (normal template) after having enabled the mobile template.
If you look at the link at the top, the same thing is happening here at phorum.org
Robert Angle
Phorum lover, nothing more.
Ruminations
|
Re: Module: Automatic Mobile Template March 05, 2011 11:43AM |
Registered: 5 years ago Posts: 27 |
This is really cool. Thanks for putting it together.
I've been customizing it to add an icon to the home screen when bookmarked and to run in full screen mode (as a web app basically). Has anyone come across a way to have links open within the webapp rather than popping open in the browser?
Again, great work. Thank you.
I've been customizing it to add an icon to the home screen when bookmarked and to run in full screen mode (as a web app basically). Has anyone come across a way to have links open within the webapp rather than popping open in the browser?
Again, great work. Thank you.
|
Re: Module: Automatic Mobile Template March 05, 2011 11:56AM |
Registered: 5 years ago Posts: 27 |
I found this thread that seems to have some info on how to get links from within webapps to actually open in the webapp itself rather than opening in Safari. Not sure how to implement this in the Phorum mobile template to get every link to open in the webapp page. Is it possible?
[forums.macrumors.com]
Edited 1 time(s). Last edit at 03/05/2011 11:58AM by shawn y..
[forums.macrumors.com]
Quote
Ok, here is how I ended up getting it to work.
I have 2 ways of specifying a link in the WebApp.
For links that I want to open within the WebApp and not open in Safari, I use this:
Code:
<a onclick="parent.location='URL GOES HERE'">Link</a>
For links that I want to open in Safari, I use the standard HTML link:
Code:
<a href="URL GOES HERE">Link</a>
That's it. Simple once you know how.
Edited 1 time(s). Last edit at 03/05/2011 11:58AM by shawn y..
|
Re: Module: Automatic Mobile Template March 08, 2011 12:15PM |
Registered: 2 years ago Posts: 4 |
I appologize ahead of time, I don't have a smartphone to try this out so my scenarios below haven't been narrowed down very well. Just going by what people tell me.
I installed everything, and got some users lined up to try it. Enabled the module. They said they didn't see any change. So, while I had people lined up, I just switched one of my lesser used forums over to the mobile template manually. I started seeing the "New Topics" link change to "New" like Robert described above in all the other Emerald templated forums, and I didn't see a "New" link in the foum I had using the mobile template. My users then did see the mobile template for that one forum.
My test window was over, so I switched my forum back to Emerald. I also went into the Settings for this module and added BlackBerry since it wasn't in the default list, and saved the list then turned the module Off (I had originally gone into the settings for the module and look at them when I turned it on, but didn't change or save them, just assumed it would default OK). Then I started getting posts about how much people liked the new template. I said, "Its off, are you sure you are seenig it?" So far, it sounds like it, but I haven't seen it with my own eyes. They said they can create new topics too, so the "New" link must be there.
Not sure if you have to save the settings to get the module to detect the default list of agents and truly be on. Also the Off setting may not work after that.
I installed everything, and got some users lined up to try it. Enabled the module. They said they didn't see any change. So, while I had people lined up, I just switched one of my lesser used forums over to the mobile template manually. I started seeing the "New Topics" link change to "New" like Robert described above in all the other Emerald templated forums, and I didn't see a "New" link in the foum I had using the mobile template. My users then did see the mobile template for that one forum.
My test window was over, so I switched my forum back to Emerald. I also went into the Settings for this module and added BlackBerry since it wasn't in the default list, and saved the list then turned the module Off (I had originally gone into the settings for the module and look at them when I turned it on, but didn't change or save them, just assumed it would default OK). Then I started getting posts about how much people liked the new template. I said, "Its off, are you sure you are seenig it?" So far, it sounds like it, but I haven't seen it with my own eyes. They said they can create new topics too, so the "New" link must be there.
Not sure if you have to save the settings to get the module to detect the default list of agents and truly be on. Also the Off setting may not work after that.
|
Re: Module: Automatic Mobile Template March 08, 2011 08:37PM |
Registered: 2 years ago Posts: 4 |
OK, I was able to spend a few minutes with a smartphone. When the module was off, the mobile template was turned off. When I turned the template on, it did go into the mobile template. But I'm still not sure it did originally - seems like I had to save the settings on the module first. Wasn't able to try that whole scenario today, though.
Don
Don
|
Re: Module: Automatic Mobile Template March 08, 2011 11:00PM |
Registered: 7 years ago Posts: 145 |
Don,
Yes you should save the settings when you enable a module, even if you haven't changed anything. The original defaults in the admin come from the module settings.php, but the module may/will use data from a table(s) when it is running (not the settings script). If you haven't saved, it never gets written to the table.
Yes you should save the settings when you enable a module, even if you haven't changed anything. The original defaults in the admin come from the module settings.php, but the module may/will use data from a table(s) when it is running (not the settings script). If you haven't saved, it never gets written to the table.
|
Broken image thumbnail and links March 28, 2011 02:14PM |
Registered: 7 years ago Posts: 122 |
|
March 28, 2011 02:19PM |
Admin Registered: 10 years ago Posts: 8,807 |
Well, then you should post it in the module's thread.
edit mmakaay: merged the question into the module thread
Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
Edited 1 time(s). Last edit at 03/28/2011 02:34PM by Maurice Makaay.
edit mmakaay: merged the question into the module thread
Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum HostingEdited 1 time(s). Last edit at 03/28/2011 02:34PM by Maurice Makaay.
Sorry, only registered users may post in this forum.
