Firefox PHP

Module: Automatic Mobile Template

Posted by Brian Moon 
Re: Broken image thumbnail and links
March 28, 2011 09:56PM
As a first change I uploaded a new version which allows showing files when directly linked.
Showing them in a post needs to be done in the template.

Thomas Seifert
Phorum Development Team /
Custom Phorum and general software development
worry-free Phorum Hosting
Images now partially working...
April 08, 2011 04:14PM
The image links now show up so that you can tap on them to view but the thumbnail view that is produced by embed images mod still shows up weird. Basically you get two links in a post, 1. the embedded thumb and 2. the name of the image as a link. Either will display the picture when tapped on.

I would ideally like to get the thumb to show up but if not possible then I would like to not display the empty thumb box and just display the name as a link.

See the image for an example...

Re: Module: Automatic Mobile Template
April 08, 2011 08:53PM
I want to put the spam prevention feature on the mobile template used with the module, but cannot find the hook or code to do so.

I am also having the same problem with the 'terms of service' module checkbox not appearing in the mobile template. Both of these features worked fine on the older version of the module and mobile template (the automatic iphone module)

Other than that, the mod works fine and the template works pretty well. I just want to add the other features before it goes live to the site audience.
Re: Module: Automatic Mobile Template
April 12, 2011 09:57PM

Nice module. Just installed this and got many mails in my inbox about the php ./script.php --scheduled:
PHP Notice:  Undefined index: HTTP_USER_AGENT in /path/to/phorum/mods/mod_mobile/mod_mobile.php on line 14

To solve this, I modified mod_mobile.php as below:

Language: PHP
  1. function mod_mobile(){
  3. global $PHORUM;
  5. if(empty($PHORUM["mod_mobile"]["template"])) return;
  6. if (!isset($_SERVER["HTTP_USER_AGENT"])) return; // this is what I added
  8. $words = explode("\n", $PHORUM["mod_mobile"]["ua_keywords"]);


Kindest regards,
Giam Teck Choon
Re: Module: Automatic Mobile Template
April 18, 2011 11:32AM
Brilliant. This works perfectly!!! Thank you so much.

The only thing I had to fix was remove "icon-exclamation" class from read.tpl to get rid of the background image

Also it would be nice if the module settings automatically selected mobile template :D

Skye Nott
Corvus Digital
Re: Module: Automatic Mobile Template
April 18, 2011 12:14PM
One problem i'm finding is that the "short" nav text in mod_mobile/lang/english.php is overriding the normal /include/lang/english.php names for buttons even when the mobile skin is not being shown. What is the loading procedure for module language files?

Skye Nott
Corvus Digital
Re: Module: Automatic Mobile Template
April 20, 2011 07:45AM
I changed the lang/english.php strings to $PHORUM["DATA"]["LANG"]["mod_mobile"][...] and the "mobile" templates as needed.

Skye Nott
Corvus Digital
Re: Module: Automatic Mobile Template
April 26, 2011 07:18PM
I am also stuck on the language issue as it overrides mine for a couple of menus.
However the module as far as I see does not allow moderation. Am I correct?
Re: Module: Automatic Mobile Template
April 26, 2011 08:21PM
Correct. The mobile template is stripped down to a bare minimum and moderation via mobile is not supported.

Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Automatic Mobile Template
July 01, 2011 12:40AM
Is there a way to detect a mobile browser and just draw from a different template?

I am writing my own mobile version of my phorum, and while I want the mobile detection, I do not want any modules or features disabled by it.

Essentially, I am just writing something that will display much nicer.

Robert Angle
Phorum lover, nothing more.
Sorry, only registered users may post in this forum.

Click here to login