Disable the Mobile Version (New Script)

Go down

Disable the Mobile Version (New Script)

Post by Ange Tuteur on October 9th 2018, 6:03 pm

EDIT : Thanks to Forumactif you no longer need a script to disable the mobile version -- it can be disabled via the admin panel. cheers See the link below for more information.
https://help.forumotion.com/t156600p30-disable-mobile-version-problem#1081976

You may also view the old method below if you're curious, however, I highly suggest using the option in the admin panel instead !
Click to view old method:

Information


Forumactif's recent update may have rendered your old script for disabling the mobile version useless. If this is the case, and you're experiencing endless redirections, it's highly recommended that you remove the old script via the founder tools which will allow you a direct connection to the admin panel.

Seeing as the old script no longer works, I wrote up a new one that will work with the current changes. If you still wish to disable the mobile version, follow the steps below.


Installation


Go to Admin Panel > Modules > JavaScript codes management and create a new script with the following settings.

Title : Disable Mobile Version
Placement : In all the pages
Code :
Code:
document.addEventListener('DOMContentLoaded', function () {
  if (_userdata.tpl_mobile && my_getcookie('_mobile_version') != '0') {
    my_setcookie('_mobile_version', '0', true);
    window.location.reload();
  }
});

Save the script and the modification will be installed !


Summary


If all goes as planned, whenever you visit the mobile version of your forum, you should be redirected to the desktop version automagically. Super

Note : This new script uses cookies, so you may experience the redirection again if you clear your browser's cookies.

If any issues with this script, feel free to let us know below.


Last edited by Ange Tuteur on October 10th 2018, 4:22 pm; edited 1 time in total
avatar
Ange Tuteur
Forumaster

Male Posts : 13212
Reputation : 2936
Language : EN, JA, FR
Location : Macungie, PA

https://github.com/SethClydesdale

Back to top Go down

Re: Disable the Mobile Version (New Script)

Post by SarkZKalie on October 9th 2018, 6:14 pm

Thank you for the update, Katty! You always surprise me with these script


avatar
SarkZKalie
Support Moderator
Support Moderator

Male Posts : 940
Reputation : 157
Language : English

http://rotavn.forumotion.com

Back to top Go down

Re: Disable the Mobile Version (New Script)

Post by APE on October 10th 2018, 4:17 pm

Dear @Ange Tuteur there is no need for your code now our team have made the settings on the ACP for the founder to change the settings as they wish
please read https://help.forumotion.com/t156600p30-disable-mobile-version-problem#1081976



avatar
APE
Administrator
Administrator

Male Posts : 13117
Reputation : 1391
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

Re: Disable the Mobile Version (New Script)

Post by Ange Tuteur on October 10th 2018, 4:18 pm

@APE Well that's good to see. cheers I'll update the first post with this information. Wink
avatar
Ange Tuteur
Forumaster

Male Posts : 13212
Reputation : 2936
Language : EN, JA, FR
Location : Macungie, PA

https://github.com/SethClydesdale

Back to top Go down

Re: Disable the Mobile Version (New Script)

Post by APE on October 10th 2018, 4:19 pm

You are so welcome Smile have a great day buddy ....PS i miss you buddy Embarassed



avatar
APE
Administrator
Administrator

Male Posts : 13117
Reputation : 1391
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum