Is there a way to remove the mobile version from SMF/TP?
So that when I visit the website through my phone it will show up the same way as in a normal browser?
If you hit your SMF forum in a browser I don't think it should be showing a mobile version unless you specifically add the imode or wap paramter on your URL.
I mean that when I visit the website on my mobile phone.
When I visit a website on my phone, it doesn't show the wap or imode version unless I add it into the URL.
I find with my phone (N96), it depends how I load the site.
If I go direct to the site adress (ie. www.tinyportal.co.uk) it'll load the normal version, but if I follow a link from an email (ie. link to topic that's been replied to), it'll load the mobile version.
However, it also happens with a standard SMF site I run, so it's an SMF 'feature', not a TP one.
Anyone please knows a way to remove the mobile function?
It has to be somewhere in the code but I can't find it.
Removing the mobile functions will keep your users with older phones that rely on WAP mode (or WAP2/imode) from being able to access your site at all with their phones. However, if you still want to do it, you should ask how to remove these functions over at SMF as this is an SMF function and not a TP one.
ZarPrime
EDIT: Actually, I see you've already asked over there and haven't gotten a response yet. Keep on them about it. It's not a TP function.
Just had a quick look, and you should be able to deactivate it in Sources/display.php.
I've not tried it, but I think it should be possible by altering the following bit of code, to remove the if statement, and instead just have loadTemplate('Display') called.
// Load the proper template and/or sub template.
if (WIRELESS)
$context['sub_template'] = WIRELESS_PROTOCOL . '_display';
else
loadTemplate('Display');
Although having looked a bit closer, WIRELESS is set in index.php, and is set true if wap, wap2, or imode is detected -
if (!defined('WIRELESS'))
define('WIRELESS', isset($_REQUEST['wap']) || isset($_REQUEST['wap2']) || isset($_REQUEST['imode']));
So, rather than altering display.php, you could alter index.php, so WIRELESS is set false -
if (!defined('WIRELESS'))
define('WIRELESS', false);
Thanks mc, that works.