The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

How to Disable the Mobile Version

View previous topic View next topic Go down

In progress How to Disable the Mobile Version

Post by Barada on March 5th 2016, 10:14 am

Hello,

I am Marco from The Netherlands.
This is my first post here. Happy to be here.

I am part of a team of collectors that founded a forum devoted to collecting Star Wars last year: www.TantiveXI.com
A big thanks to the excellent platform that Forumotion provided to us to make this possible. Very Happy
We went live in December 2015 and sofar we have received positive feedback from our growing community.

There is one issue which is bothering our team and a lot of our members since the beginning though: The appearance and sometimes limited functionality of the mobile version when compared to the classic version. It is a common topic when reading a 20 page feedback thread which we initiated for our members to help improve our site.


What makes things challenging is that the mobile version seems to be the default setting when our forum is approached from smart phones or tablets (from which devices we get 75% of our incoming traffic). What makes things worse is that many members / guests don't know how to switch back from mobile to classic. So many users donít experience our site as it is meant to be, and that is a real shame. You never get a second chance to make a first impression...

We tried the solution as described in the thread below, but unfortunately it broke our forum completely and we had to fix it.

http://help.forumotion.com/t143918-disable-the-mobile-version

Our questions:
  • Are there any other work arounds to disable the mobile version
  • Or maybe even better, can Forumotion allow for a simply tick box to enable/disable the mobile version? So admins of Forumotion forums have an option.


Thank you in advance for your help and consideration.
It will be much appreciated.

May the Force be with You!

Marco
From the Tantive XI team

Barada
New Member

Posts : 3
Reputation : 2
Language : English, Dutch, German

http://tantivexi.com

Back to top Go down

In progress Re: How to Disable the Mobile Version

Post by Van-Helsing on March 5th 2016, 11:26 am

Hello,
Go to ACP(Admin Control Panel) > Modules > HTML & JAVASCRIPT > Javascript codes management > Javascript codes management and create a new javascript

Title: Disable Mobile Version
Placement: In all the pages
Javascript code: Paste the following code

Code:
$(function() {
  if(window._userdata && _userdata.page_desktop) window.location = _userdata.page_desktop;
});

then press submit.

Van-Helsing
Hyperactive

Male Posts : 2222
Reputation : 82
Language : English, Greek

http://helpgr.forumgreek.com/

Back to top Go down

In progress Re: How to Disable the Mobile Version

Post by Guest on March 5th 2016, 11:51 am

Hmm... my JS is slightly different...

Name: Force Classic View on Mobile Devices
Placement: in all the pages.
The JS:
Code:
$(function(){if (_userdata && _userdata.page_desktop) window.location.href = _userdata.page_desktop.replace(/&/,'&')});

Samantha.

Guest
Guest


Back to top Go down

In progress Re: How to Disable the Mobile Version

Post by psybertech on March 5th 2016, 7:24 pm

I work with Marco (the OP) and tried this and many variations of it and have yet to get it to work at all.

Our board is based off PHPBB3 if that makes any difference.

Is there anyway I can test the vars being used to see what is set?

However, it still looks like it won't ever work to me... but people say it did or does. scratch

if _userdata, I take to mean, if user is logged in and
if _userdata.page_desktop, I take it that if it is set, we change the window location var to _userdata.page_desktop... but that right there makes no sense. If it is tested and is set to that already, why are we changing the window location to it? scratch It is already there, isn't it?

To me, I think it is saying that if a user is logged in and is viewing a desktop page, set the window location to a desktop page.

to me, the code would make more sense if it looked like:
Code:
$(function(){if (_userdata && _userdata.page_MOBILE) window.location.href = _userdata.page_desktop.replace(/&/,'&')});
or
Code:
$(function() {
  if(window._userdata && _userdata.page_MOBILE) window.location = _userdata.page_desktop;
});

Obviously, the _userdata.page_mobile is not a var (since I tried for kicks and giggles), but if the code looked more like that, I would take it to mean, if user is logged in and the view is mobile, set location to desktop view.

Anyway... regardless...

I cannot get the examples to work at all.
Is there some other MOD that we might have installed that is stomping those two vars in the JS?
And back to my question, can I test these vars somehow (what should I see when testing them?)

Or any way to add a button for the user to easily switch on demand?

Thanks!!
Very Happy

psybertech
New Member

Posts : 6
Reputation : 1
Language : English

http://psybertech.forumotion.com

Back to top Go down

In progress Re: How to Disable the Mobile Version

Post by Guest on March 5th 2016, 8:06 pm

@psybertech wrote:I work with Marco (the OP) and tried this and many variations of it and have yet to get it to work at all.

Our board is based off PHPBB3 if that makes any difference.

Is there anyway I can test the vars being used to see what is set?

However, it still looks like it won't ever work to me... but people say it did or does. scratch

if _userdata, I take to mean, if user is logged in and
if _userdata.page_desktop, I take it that if it is set, we change the window location var to _userdata.page_desktop... but that right there makes no sense. If it is tested and is set to that already, why are we changing the window location to it? scratch It is already there, isn't it?

To me, I think it is saying that if a user is logged in and is viewing a desktop page, set the window location to a desktop page.

to me, the code would make more sense if it looked like:
Code:
$(function(){if (_userdata && _userdata.page_MOBILE) window.location.href = _userdata.page_desktop.replace(/&/,'&')});
or
Code:
$(function() {
  if(window._userdata && _userdata.page_MOBILE) window.location = _userdata.page_desktop;
});

Obviously, the _userdata.page_mobile is not a var (since I tried for kicks and giggles), but if the code looked more like that, I would take it to mean, if user is logged in and the view is mobile, set location to desktop view.

Anyway... regardless...

I cannot get the examples to work at all.
Is there some other MOD that we might have installed that is stomping those two vars in the JS?
And back to my question, can I test these vars somehow (what should I see when testing them?)

Or any way to add a button for the user to easily switch on demand?

Thanks!!
Very Happy

Just checked your board and it turns out you've got various JS issues (giggles too) and that's why the code ain't working. Anyway, pls open your own ticket, you're not the one requesting help here. ty.

Guest
Guest


Back to top Go down

In progress Re: How to Disable the Mobile Version

Post by psybertech on March 5th 2016, 8:21 pm

RoXaNNeX wrote:Just checked your board and it turns out you've got various JS issues (giggles too) and that's why the code ain't working. Anyway, pls open your own ticket, you're not the one requesting help here. ty.
GIGGLES TOO?
uhmmm, is that a technical term?

To clarify... the topic from the original author... is this not a support request/ticket? Or is it just a question he posted?
If not, I will have him officially open a ticket. I was just trying to add to his OP.

Thank you.

psybertech
New Member

Posts : 6
Reputation : 1
Language : English

http://psybertech.forumotion.com

Back to top Go down

In progress Re: How to Disable the Mobile Version

Post by brandon_g on March 5th 2016, 9:21 pm

Hello @psybertech ,

I believe you mentioned that you work with the topic starter (like a co admin, etc) correct? If so, don't worry about it, you can keep posting here because your discussing almost the same issue, if not the same issue and your doing so on behalf of the same forum.

Usually we just like folks to start a new topic for every issue in order to keep things crom getting confusing and also so that someone searching about a similar issue in our search bar can find a solution better without having to read through many topics with solutions to many issues.

In this case though, you are fine and you can keep posting here. Wink

-Brandon


Remember to mark your topic when a solution is found.

brandon_g
Support Moderator
Support Moderator

Male Posts : 5354
Reputation : 489
Language : English
Location : USA

http://broadcastingduo.forumotion.com/

Back to top Go down

In progress Re: How to Disable the Mobile Version

Post by Van-Helsing on March 6th 2016, 1:58 am

Hello,
I found the following error on your forum:



this error maybe conflicts other javascript codes. Please try to disable it and check again if the javascript which disabling the mobile forum version working.

Van-Helsing
Hyperactive

Male Posts : 2222
Reputation : 82
Language : English, Greek

http://helpgr.forumgreek.com/

Back to top Go down

In progress Re: How to Disable the Mobile Version

Post by Barada on March 7th 2016, 8:57 pm

Thank you all for providing input to get the mobile version disabled.
It seems we can get this to work now. But the proof of the pudding is in the eating...

We will first run a poll this week to ask our members if they want to get rid off the mobile version as well.
If the majority votes yes, we will disable the mobile version and report back on this in this thread.

Have a good day

- Marco


Barada
New Member

Posts : 3
Reputation : 2
Language : English, Dutch, German

http://tantivexi.com

Back to top Go down

In progress Re: How to Disable the Mobile Version

Post by SLGray on March 7th 2016, 9:22 pm

Is this solved?


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 36663
Reputation : 2444
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

In progress Re: How to Disable the Mobile Version

Post by Barada on March 7th 2016, 10:14 pm

Not yet. We will report back in a week after implementing the suggested solutions.


Barada
New Member

Posts : 3
Reputation : 2
Language : English, Dutch, German

http://tantivexi.com

Back to top Go down

In progress Re: How to Disable the Mobile Version

Post by Van-Helsing on March 14th 2016, 6:39 pm

Hello,
The mobile version still cannot disabled I tried now everthing(css/javascript/templates codes) without result. Is there a way to disable it via css or javascript or both of them? Also is there a way to disable the link "Mobile version" from footer links?

Van-Helsing
Hyperactive

Male Posts : 2222
Reputation : 82
Language : English, Greek

http://helpgr.forumgreek.com/

Back to top Go down

View previous topic View next topic Back to top


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