News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

SMF4iPhone Mod

Started by Fabius85, May 14, 2010, 01:58:13 AM

Previous topic - Next topic

dembow

#200
please update this to rc5...please! 


nevermind managed to make it work on RC5

waruna

If I install this mod, does iphone user can surf my forum nicely? And does this mod support Blackberry?

I use SMF 2.0 RC2, is it ok?

Thanks in advance
Trust of Lust

mastro

Quote from: dembow on March 21, 2011, 06:28:34 PM
please update this to rc5...please! 


nevermind managed to make it work on RC5

Do you mean that you made it to recognize the iphone??

dembow

Quote from: mastro on March 23, 2011, 10:48:09 AM

Do you mean that you made it to recognize the iphone??

have you tried installing this on RC5?

mastro

Quote from: dembow on March 25, 2011, 12:18:00 PM
Quote from: mastro on March 23, 2011, 10:48:09 AM

Do you mean that you made it to recognize the iphone??

have you tried installing this on RC5?

Yes ->Look here www.hdforum.gr [nofollow]
But it has the known problem "SMF4iPhone Mod failed to connect to DetectFree"

jack001

ya. Its not getting installed in my smf 2.0 rc5.
Giving error of file either corrupt or not compatible to version. Please mod it for rc5.
https://www.edufor.xyz Edutainment forum - Education with Entertainment!

dembow

@mastro @jack001 when installing the mod emulate for RC3 (click the advanced link and change it to RC3 instead of RC5). at least for me it let me install it

i have a work around for the detect problem but it makes the classic button do nothing and users can't see the "default" theme just the iPhone theme  :-\

Lolafish

Will there be an updated iphone mod that uses something "other" than Detect Free in the near future?

My work around right now is that I've added a "Mobile Site" menu button in my forum, but it's inconvenient to make users have to look for it.  Auto detect is so much better.   ;)

AquaPuppies - A Goldfish Community
www.aquapuppies.com

Running SMF 2.0.2 & SimplePortal 2.3.5

KensonPlays

I tried emulating for RC4 it says installed correctly but i tried on my android phone on Dolphin Browser HD and Dolphin Browser Mini but it loads full desktop site.

Owner of Mesozoic Haven

rosey

would love to see an update for RC5

butchs

#210
Quote from: Lolafish on April 01, 2011, 12:14:35 PM
Will there be an updated iphone mod that uses something "other" than Detect Free in the near future?

My work around right now is that I've added a "Mobile Site" menu button in my forum, but it's inconvenient to make users have to look for it.  Auto detect is so much better.   ;)

I am getting annoyed with this...  I gave this mod to Fab hoping he would support it since he seemed to have the drive and a mobile device (something I do not have).  >:(

It can be easily converted to Tera-Wurfl.

Download and install Terra-Wurfl.

Search Detectfree.php for:
// No data in SMF cache about this IP or session and no cookie. Time to check the Detectfree db
        $headers = "";
        if (function_exists("getAllHeaders")) {
                foreach (getAllHeaders() as $key => $value) {
                        $key_lower = strtolower($key);
                        if ($key_lower == "connection") continue;
                        if ($key_lower == "content-length") continue;
                        if ($key_lower == "content-type") continue;
                        if ($key_lower == "host") continue;
                        if ($key_lower == "keep-alive") continue;
                        $headers .= "$key: $value\r\n";
                }
        } else {
                foreach ($_SERVER as $key => $value) {
                        if (substr($key, 0, 5) == "HTTP_") {
                                $key = str_replace("_", " ", substr($key, 5));
                                $key = str_replace(" ", "-", ucwords(strtolower($key)));
                                $key_lower = strtolower($key);
                                if ($key_lower == "connection") continue;
                                if ($key_lower == "content-length") continue;
                                if ($key_lower == "content-type") continue;
                                if ($key_lower == "host") continue;
                                if ($key_lower == "keep-alive") continue;
                                $headers .= "$key: $value\r\n";
                        }
                }
        }
       
        $url = "http://detectfree.moviladetection.com/";
$contents  = iphone_fetch_web_data($url, $headers);

$is_mobile = "undef";

if (!$contents) {
loadLanguage('Errors');
log_error($txt['iphDNS'], 'user'); // could not connect
        } else {
                $lines = explode("\r?\n", $contents);
               
                foreach ($lines as $line) {
                        $pos = strpos($line, ":");
                        if ($pos && strlen($line) > $pos + 1) {
                                $key = substr($line, 0, $pos);
                                $value = substr($line, $pos + 1);
                                if ($key == "is_mobile")
                                        $is_mobile = $value;
                        }
                }
        }


replace with:
$is_mobile = false;
// Include the Tera-WURFL file
require_once("TeraWurfl.php");

// instantiate the Tera-WURFL object
$myDevice = new TeraWurfl();

// Get the capabilities from the object
$myDevice->GetDeviceCapabilitiesFromAgent($_SERVER['HTTP_USER_AGENT']);
$cap = $myDevice->capabilities;

//  device brand $cap['product_info']['brand_name']
$devicename = $cap['product_info']['model_name'];

// check if this device is mobile
if($cap['product_info']['is_wireless_device'])
$is_mobile = true;



Then simply maintain the wurfl database.
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

Commander Keen

It works! (RC4 and Tera-Wurfl). At least on my own iphone 4

Thanks a lot!

mastro

How do we install Tera-Wurfl?? Is there a how to?? Any fast details on the installation??

Snape

Quote from: mastro on April 13, 2011, 01:38:50 PM
How do we install Tera-Wurfl?? Is there a how to?? Any fast details on the installation??
The wiki explains how...but if you're on shared hosting, make sure your provider supports mysqli in PHP or else the installer won't run at all.

butchs

Quote from: Commander Keen on April 12, 2011, 10:56:41 AM
It works! (RC4 and Tera-Wurfl). At least on my own iphone 4

Thanks a lot!

Yay!!!  Not bad for a guy who does not have a smart phone.
:)
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

mastro

#215
Quote from: Snape on April 13, 2011, 01:47:57 PM
Quote from: mastro on April 13, 2011, 01:38:50 PM
How do we install Tera-Wurfl?? Is there a how to?? Any fast details on the installation??
The wiki explains how...but if you're on shared hosting, make sure your provider supports mysqli in PHP or else the installer won't run at all.

Thanks you...managed to succeed !!

Finally...what do you mean by "Then simply maintain the wurfl database." ???

butchs

wurfl uses a database that has to be updated.  Read about it at the wurfl site.
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

Sakacoco

butchs,

Thanks for the Tera Wurfl but it doesn't work on my setup using SMF 2.0 RC5, any tips ?

butchs

Try testing Tera Wurfl and make sure that is working.
I have been truly inspired by the SUGGESTIONS as I sit on my throne and contemplate the wisdom imposed upon me.

Dlget

i'm getting error message, "SMF4iPhone Mod failed to connect to DetectFree" in Error log

Advertisement: