Firefox PHP

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
Module: Automatic Mobile Template
February 27, 2011 04:01PM
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.

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 09:47PM by Thomas Seifert.
Attachments:
open | download - mod_mobile-1.0.1.tar.gz (2.1 KB)
open | download - mod_mobile-1.0.1.zip (2.9 KB)
Re: Module: Automatic Mobile Template
March 03, 2011 01:19AM
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
Re: Module: Automatic Mobile Template
March 04, 2011 02:46PM
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 06:43PM
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.
Re: Module: Automatic Mobile Template
March 05, 2011 06:56PM
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]


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 06:58PM by shawn y..
Re: Module: Automatic Mobile Template
March 08, 2011 07:15PM
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.
Re: Module: Automatic Mobile Template
March 09, 2011 03:37AM
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
Re: Module: Automatic Mobile Template
March 09, 2011 06:00AM
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.
Broken image thumbnail and links
March 28, 2011 09:14PM
When I use the Mobile Mod, I get a broken thunbnail image on all post with pictures (shows as a blue box with ? mark). When I click on the image name, it gives me a "page not supported in mobile" message.
Re: Broken image thumbnail and links
March 28, 2011 09:19PM
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 09:34PM by Maurice Makaay.
Sorry, only registered users may post in this forum.

Click here to login