Disable mobile version problem

Page 2 of 2 Previous  1, 2

Go down

Solved Disable mobile version problem

Post by mohamadkirkuk on October 8th 2018, 11:21 pm

First topic message reminder :

Technical Details


Forum version : #phpBB2
Position : Founder
Concerned browser(s) : Google Chrome
Who the problem concerns : Yourself
Forum link : ( link is hidden, you must reply to see )

Description of problem

The problem with converting the mobile version to computer version is previously when a visitor was entering the site through the phone he was being redirected to the copmuter site automatically but now the code doesnt work like it did is there an alternative way

The current code no longer works " javascript "
Code:
$(function() { if(window._userdata && _userdata.page_desktop) window.location = _userdata.page_desktop;});
avatar
mohamadkirkuk
New Member

Posts : 11
Reputation : 1
Language : arabia , english

https://norton.forumarabia.com

Back to top Go down


Solved Re: Disable mobile version problem

Post by mohamadkirkuk on October 9th 2018, 4:08 pm

Please find a solution as soon as possible     
avatar
mohamadkirkuk
New Member

Posts : 11
Reputation : 1
Language : arabia , english

https://norton.forumarabia.com

Back to top Go down

Solved Re: Disable mobile version problem

Post by The Godfather on October 9th 2018, 4:13 pm

i invite you to read this :

@The Godfather wrote:Hi

This script is a custom script not coming from Forumotion but from the community, we can not provide an update today. The best is to disable this custom script for the moment. As a reminder, each user can switch to the web version in one click via the menu of the mobile version or the option in the web browser.

If a solution is found, we will update the announcement by linking to a tutorial. If no solution is found by the community in a few days, our technical team will look into this problem.

it's not a technical bug but a side effect of a custom script that is no longer tolerated. those who want to have a functional forum must either update their script or delete it and it is not up to us to do it for them.

if you can't do it, we will then study a solution on our side but it's not on the agenda for the moment. so i advise you to update your scripts on your side

thank you
avatar
The Godfather
Administrator
Administrator

Posts : 3085
Reputation : 448

Back to top Go down

Solved Re: Disable mobile version problem

Post by TamDonCo on October 9th 2018, 4:24 pm

Is anyway to disable mobile version completely by modifying template ?

my users do not like mobile version at all

The prolem is not many people know how to switch to web version manually and seems annoyed to them
avatar
TamDonCo
Forumember

Posts : 359
Reputation : 2
Language : English

http://nhomcho.forummotion.com/

Back to top Go down

Solved Re: Disable mobile version problem

Post by APE on October 9th 2018, 4:29 pm

Sadly No there is no way to turn mobile part of the forum off without having a NEW code.

I'm sure the members that made the code before will try and fix the old code for you.



avatar
APE
Administrator
Administrator

Male Posts : 13383
Reputation : 1420
Language : fluent in dork / mumbojumbo & English haha

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

Back to top Go down

Solved Re: Disable mobile version problem

Post by Ange Tuteur on October 9th 2018, 4:46 pm

Hello everyone,

To disable the mobile version you'll now have to modify the cookie _mobile_version and set its value to 0. The old script uses links to modify this state and has now been deprecated, so I highly suggest removing it to avoid endless redirections.

I did however, go and wrote a quick script that utilizes cookies to disable the mobile version, so feel free to replace the old script with the one below if you like.
Code:
document.addEventListener('DOMContentLoaded', function () {
  if (_userdata.tpl_mobile && my_getcookie('_mobile_version') != '0') {
    my_setcookie('_mobile_version', '0', true);
    window.location.reload();
  }
});

Have a good day. bye
avatar
Ange Tuteur
Forumaster

Male Posts : 13215
Reputation : 2941
Language : EN, JA, FR
Location : Macungie, PA

https://github.com/SethClydesdale

Back to top Go down

Solved Re: Disable mobile version problem

Post by TamDonCo on October 9th 2018, 4:59 pm

Thank You very much , Ange Tuteur

Works fine but I have to clear cache and cookies to make it works

Thanks again
avatar
TamDonCo
Forumember

Posts : 359
Reputation : 2
Language : English

http://nhomcho.forummotion.com/

Back to top Go down

Solved Re: Disable mobile version problem

Post by mohamadkirkuk on October 9th 2018, 5:02 pm

@Ange Tuteur wrote:Hello everyone,

To disable the mobile version you'll now have to modify the cookie _mobile_version and set its value to 0. The old script uses links to modify this state and has now been deprecated, so I highly suggest removing it to avoid endless redirections.

I did however, go and wrote a quick script that utilizes cookies to disable the mobile version, so feel free to replace the old script with the one below if you like.
Code:
document.addEventListener('DOMContentLoaded', function () {
  if (_userdata.tpl_mobile && my_getcookie('_mobile_version') != '0') {
    my_setcookie('_mobile_version', '0', true);
    window.location.reload();
  }
});

Have a good day. bye
thank you very much
that's work
But he is slow
avatar
mohamadkirkuk
New Member

Posts : 11
Reputation : 1
Language : arabia , english

https://norton.forumarabia.com

Back to top Go down

Solved Re: Disable mobile version problem

Post by omarpop23 on October 9th 2018, 6:42 pm

if you want it switch fast try this way
put this code after
{HOSTING_JS}
in overall_header of Mobile Version Template
Code:
<script>
(function () {
  if (_userdata.tpl_mobile && my_getcookie('_mobile_version') != '0') {
    my_setcookie('_mobile_version', '0', true);
    window.location.reload();
  }
})();
</script>
avatar
omarpop23
Forumember

Male Posts : 180
Reputation : 3
Language : Arabic
Location : Egypt

http://devs.ahlamontada.com

Back to top Go down

Solved Re: Disable mobile version problem

Post by McLeod on October 10th 2018, 2:11 pm

Yessss ! Thank you !!!
It works at forumactif too (french version, sorry for my english).

But, the mobile version opens the browser on the root of the forum.
It's possible to open the default page of my forum which is on the portal (in web version) ?
avatar
McLeod
New Member

Posts : 2
Reputation : 1
Language : French

http://www.villapaintball.fr

Back to top Go down

Solved Re: Disable mobile version problem

Post by Draxion on October 10th 2018, 3:58 pm

@McLeod wrote:Yessss ! Thank you !!!
It works at forumactif too (french version, sorry for my english).

But, the mobile version opens the browser on the root of the forum.
It's possible to open the default page of my forum which is on the portal (in web version) ?

All you have to do is put the link you want it to redirect to in between the parenthesis.
Code:
window.location.reload("LINK GOES HERE");


NEVER provide your founder's account or email
Please provide forum's URL when dealing with design and appearance issues
Don't forget to mark the topic as when the issue is resolved. This helps the staff greatly.
PM Support is prohibited!
TOS | General Rules | FAQ | Tricks & Tips | Latest Updates | Introduce Yourself

avatar
Draxion
Support Moderator
Support Moderator

Male Posts : 2233
Reputation : 283
Language : English
Location : USA

http://www.draxionsgameden.com/

Back to top Go down

Solved Re: Disable mobile version problem

Post by The Godfather on October 10th 2018, 4:09 pm

Hello,

In order to avoid any inconvenience for you, each administrator can now choose the default display type of his forum on mobile devices from his admin panel > Display > Templates > Mobile Version > Mobile version configuration >Your forum address leads to : Web version / Mobile version.



This option is now available for your forums in its 6 versions (phpBB2, phpBB3, PunBB, Invision, ModernBB & AwesomeBB).

From then on, you no longer need to use codes to force a specific version on the mobile devices of your forum users. All you have to do is make your choice properly via this option Very Happy

Don't forget to delete the external scripts you have set up for this purpose to avoid any conflict Wink

We hope that this will bring you full satisfaction

Regards king
avatar
The Godfather
Administrator
Administrator

Posts : 3085
Reputation : 448

Back to top Go down

Solved Re: Disable mobile version problem

Post by TamDonCo on October 10th 2018, 4:15 pm

Thank You very much, The Godfather
avatar
TamDonCo
Forumember

Posts : 359
Reputation : 2
Language : English

http://nhomcho.forummotion.com/

Back to top Go down

Solved Re: Disable mobile version problem

Post by McLeod on October 10th 2018, 4:48 pm

Thanks !!!
Option Ok in french version, perfect !
avatar
McLeod
New Member

Posts : 2
Reputation : 1
Language : French

http://www.villapaintball.fr

Back to top Go down

Solved Re: Disable mobile version problem

Post by Draxion on October 10th 2018, 7:02 pm

Problem solved & topic archived.
Please read our forum rules: ESF General Rules


NEVER provide your founder's account or email
Please provide forum's URL when dealing with design and appearance issues
Don't forget to mark the topic as when the issue is resolved. This helps the staff greatly.
PM Support is prohibited!
TOS | General Rules | FAQ | Tricks & Tips | Latest Updates | Introduce Yourself

avatar
Draxion
Support Moderator
Support Moderator

Male Posts : 2233
Reputation : 283
Language : English
Location : USA

http://www.draxionsgameden.com/

Back to top Go down

Page 2 of 2 Previous  1, 2

Back to top


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