Jump to content

Option To Go Straight To Forums If Ip.content Installed?


Recommended Posts

It used to work this way, but with the last couple of releases, IP.Content is loading on the mobile skin instead of it going straight to the forums. It looks horrible since I'm using a pretty heavily customized template for IP.Content on my board. I'd rather anyone that gets the mobile skin loaded be redirected to the forums instead of having IP.Content display.

Any way around this to make it work like it used to in previous versions?

Thanks!

Link to comment

Only thing I can suggest, is if there is a mobile template for it.

Add a simple redirect/refresh thingy to go to your forums.

<meta http-equiv="refresh" content="0;url=http://website.com/forums/" />

Unfortunately I do not see a mobile template for it in your mobile skin. I'm curious why it used to redirect to the forums automatically, but that functionality changed somewhere in the last 2-3 versions of your mobile skin?

Link to comment

Unfortunately I do not see a mobile template for it in your mobile skin. I'm curious why it used to redirect to the forums automatically, but that functionality changed somewhere in the last 2-3 versions of your mobile skin?

Nope, my skin has no control over how the site works. Just how it looks.

Link to comment
  • 3 weeks later...

I racked my brains on this subject, I use upportal for my homepage on the desktop and it renders horribly on the aquaskin, but I used the ipb-portal and built in some content tailered for the aquaskin and it looks great but getting it to switch when a mobile phone user was a problem. I found a solution with a script offered by this guy - you must pay for it if its a commercial site, I am not but I made a donation for the script anyway.


/>http://detectmobilebrowsers.mobi/

download and put the php file in your forum root, mobile_device_detect.php in the same folder as the ipb file initdata.php, then edit that file with this

change


if ( ! defined( 'IPS_DEFAULT_PUBLIC_APP' ) )
{
define( 'IPS_DEFAULT_PUBLIC_APP', 'ipcontent' );
}

to this substituting the ap of your choice for desktop and mobile my aps are uportal and portal, they can be switched to index or whatever you use.

line 19 add

require_once('mobile_device_detect.php');
$mobile = mobile_device_detect();

line 46 change to

/**
* Default app name
* You can set this in your own scripts before 'initdata.php' is required.
*/
if ( ! defined( 'IPS_DEFAULT_PUBLIC_APP' ) )
{
if($mobile =='0')
{
define( 'IPS_DEFAULT_PUBLIC_APP', 'uportal' );
}
else
{
define( 'IPS_DEFAULT_PUBLIC_APP', 'portal' );
}
}

my forum
/>http://www.vfrd.com

Edited by miguelmayo
Link to comment

Here is my workaround. A simple PHP script that I use as my index.php file in my site's root directory:

<?php

//setting the variables

$ipod = stripos($_SERVER['HTTP_USER_AGENT'],"iPod");

$iphone = stripos($_SERVER['HTTP_USER_AGENT'],"iPhone");

//detecting device

if ($ipod == true || $iphone == true){

header( 'Location: http://www.urbanplanet.org/forums/index.php/' ) ;

} else {

header( 'Location: http://www.urbanplanet.org/forums/index.php?app=ccs&module=pages&section=pages&folder=&id=4' ) ;

//header( 'Location: http://www.urbanplanet.org/forums/index.php' ) ;

}

?>

Link to comment
×
×
  • Create New...