isitfast wrote:
We have a dudamobile account set up. I am using mobilejoomla to redirect mobile users to that site using the subdomain redirect. But when we first get to the dudamobile site it loads the following error (when on a phone):
Fatal error : Cannot redeclare class TeraWurflConfig in/home/isitfast/public_html/plugins/mobile/terawurfl/terawurfl/TeraWurflConfig.php on line 24
The error disappears if we click the home button but does not disappear if we refresh the page. I know the error isn't technically within a mobilejoomla template but it seems that it is calling back to the site which produces the error. Wondering if you have any input on what is causing this?
Hi!
My suggestion would be to use the PHP redirect code that Duda offers, instead of trying another joomla plugin. Here is the exact PHP code you will want to use:
<?php
$mobileDomain = "
m.example.com";
$no_redirect = @$_REQUEST['no_redirect'];
if($no_redirect != "true")
{
$agent = @$_SERVER['HTTP_USER_AGENT'];
@ini_set('default_socket_timeout',1);
$handle = @fopen("
mobile.dudamobile.com/api/public/detect?ua=" . urlencode($agent), "r");
@stream_set_timeout($handle, 1);
/* check if we should redirect*/
$result = @fread ( $handle , 1 );
@fclose($handle);
if ($result == "y") {
$currenturl = "
".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
$mobileUrl = $mobileDomain ."?url=" .urlencode($currenturl);
$mobileUrl=$mobileUrl."&dm_redirected=true";
header("Location: ".$mobileUrl);
exit;
}
}
?>
**Make sure you change the m.example.com URL to the URL of your mobile site.
Additionally, this should be installed in your template(index.php) file. You can find some directions of how to access the template and install the redirect code here:
www.dudamobile.com/redirect/joomla
Best,
Russ
DudaMobile Team