TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,965
  • Latest: boruko
Stats
  • Total Posts: 195,982
  • Total Topics: 21,320
  • Online today: 431
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online

Remove the mobile version?

Started by Stroopy, July 09, 2009, 07:32:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Stroopy

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?

IchBin

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.

Stroopy

I mean that when I visit the website on my mobile phone.

IchBin

When I visit a website on my phone, it doesn't show the wap or imode version unless I add it into the URL.

mc

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.

Stroopy

Anyone please knows a way to remove the mobile function?
It has to be somewhere in the code but I can't find it.

ZarPrime

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.

mc

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');

mc

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);


Stroopy


This website is proudly hosted on Crocweb Cloud Website Hosting.