XF 1.3 Redirect mobile users

typb

Member
Hello,
On my xenforo installation I am currently using a portal frontpage to display 'news'.
I would like it so when a user on a mobile device access my site they are automatically directed to the forums instead of landing on the home page.
Is this at all possible?
 
My first question is do you want to do it by effective resolution or what? You might not want to redirect large tablet users for example.

I actually run a 3 column layout on XenPorta. Ended up using Javascript to move and stack my left column next to the right one on mobile. That way we could still use XenPorta on mobile without the left column going to the top which was crazy.
 
My first question is do you want to do it by effective resolution or what? You might not want to redirect large tablet users for example.

I actually run a 3 column layout on XenPorta. Ended up using Javascript to move and stack my left column next to the right one on mobile. That way we could still use XenPorta on mobile without the left column going to the top which was crazy.

For a quick fix I don't mind redirecting tablet users, however my main interest is directing people on smaller resolutions.
 
Wouldn't take much to write a quick jquery script to redirect everyone under a particular effective resolution. So for example the 1080P screen in my cell phone minus the controls is 360x592. The nexus 7 tablet sideways is about 960 pixels in width depending on the year. Id balance that against the minimum size that works for your front page.

Will want to make sure your using a method that queries the device resolution and not the window resolution.
 
Wouldn't take much to write a quick jquery script to redirect everyone under a particular effective resolution. So for example the 1080P screen in my cell phone minus the controls is 360x592. The nexus 7 tablet sideways is about 960 pixels in width depending on the year. Id balance that against the minimum size that works for your front page.

Will want to make sure your using a method that queries the device resolution and not the window resolution.

Thanks for the reply, I've searched the net and found an appropriate script and customised it based on resolutions, where would the appropriate place be to place the script?
 
The script itself it doesn't matter. The most appropriate place would in the js folder, perhaps inside a folder named after the site or project or whatever.

As far as the script declaration goes you only want it to show up on that page, otherwise other pages would redirect. Not sure what your using for a portal. But id find the most appropriate place in the base template for that.
 
Top Bottom