![]() |
How to redirect mobile users to mobile version of custom page?
I have my own IRC Network being run from my dedicated server, so I setup 2 different custom templates and 2 different custom php pages to show my IRC Web Client. The first custom page "irc.php" is the full desktop version of my IRC Web Client, and the second is "irc_mobile.php", which is the mobile version of my IRC Web Client.
Now I have everything working correctly, I created the custom templates on both mobile and desktop styles, so everything is running perfect. However, I would like to add some code to the desktop version of my IRC Web Client template, that redirects users to the mobile version "irc_mobile.php" if they are using the mobile style. This is the Template for the Desktop Version of my IRC Client: Code:
This is the template for the Mobile Version of my IRC Client: Code:
As you can see, I already have a condition for guests. If the user is not logged in, they get an Error Message that tells the user they need to login to use the IRC Client. How do I redirect users from the Desktop version to the mobile version, if they go to the desktop version on their mobile device? --------------- Added [DATE]1408009595[/DATE] at [TIME]1408009595[/TIME] --------------- Nevermind, I figured it out! All I did was, change the name of mobile client template to the same as the desktop template, so the templates match the same PHP file, since its not actually the PHP file that makes the template mobile, its the template itself. So if the user clicks on the "irc.php" using the mobile style, it will use the mobile irc template. Could a mod please close this thread? |
All times are GMT. The time now is 04:47 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|