Results 1 to 6 of 6

Thread: Opting Out of Responsive Design (choosing desktop layouts on mobile) setup question

  1. #1
    Join Date
    Sep 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Opting Out of Responsive Design (choosing desktop layouts on mobile) setup question

    1) Opting Out of Responsive Design (choosing desktop layouts on mobile)

    2) Script URL (on DD): http://www.dynamicdrive.com/forums/e...s-on-mobile%29

    3) my godaddy shared hosting account houses numerous domains... and the demo works perfectly if i upload it to the root domain. however, inside that root folder are folders for each of my other domains... and when i upload the demo into any the these domain folders (that live inside the root folder), the demo does not work.

    i'd greatly appreciate any suggestions to help me get this working for the multiple domains that are hosted inside this single hosting account!
    Last edited by joeinfo; 07-21-2015 at 06:58 PM. Reason: new information after more testing

  2. #2
    Join Date
    Sep 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    you know what... the folks at godaddy found the problem. i had something in my htaccess file that was messing things up. when htaccess was disabled, the demo worked just fine. i will leave this here in case it helps anyone else. thanks!

  3. #3
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,034
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    Try setting the path parameter, or the path and domain parameters on the setcookie() line http://www.w3schools.com/php/func_http_setcookie.asp

    I've heard that GoDaddy sessions and paths can be quite problematic due to the way they setup their servers so it's probably worth contacting them to ask what the settings should be to internally mapped domains/subdomains.

    I would guess that the path parameter should be the name of the subfolder where other domain resides, but I don't know if that's *all* that's needed or if the domain parameter should be explicitly set too.

    Hopefully just this;
    Code:
    etcookie('layout', $_GET['layout'], time()+60*60*24*30, '/subfolder/'); // how long for cookie (60*60*24*30 = 30 days)
    Let us know what it should be when you've run your tests - I don't have access to a GoDaddy account so it's always good to learn via someone who does.
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  4. #4
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,034
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    I took a while longer typing my last reply than I realised.

    Glad you got it sorted
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  5. #5
    Join Date
    Sep 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks for your reply, beverleyh.
    what it turned out to be was... i had noticed in my analytics that i was getting a lot of visits to urls with variables strung on the back -- such as mydomain.com/index.php?id=9.

    none of my pages should have query strings so my htaccess was stripping those off -- to avoid having google possibly see these urls as duplicate content.
    once i deleted that RewriteCond/Rule from the htaccess your script worked wonderfully.

    i've read many posts where folks think it is bad policy to offer full desktop layout on mobile devices but 1) the majority of my customers are older folks... so i believe some of them may feel most comfortable with desktop layout and 2) i hate how it is nearly impossible to finger scroll on many mobile layouts (especially the LATimes and the new layout for the NYTimes) without accidentally triggering an advertisement. they seem to strategically place their ads in the exact spots where they'll get triggered by finger scrolling. so i often click on their desktop layouts to prevent triggering multiple ads on every page.

    thank you again for the wonderful script and for your gracious response to my post.

  6. #6
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,034
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    Ah, I see - the rewrite rule in the htaccess file would have been stripping the query string from the end of the switch, which wouldn't activate the cookie;
    Code:
    <?php if ($layout == 'fixed') { 
    	echo '<p class="switch"><a href="?layout=rwd">Switch to Fluid Mobile Layout</a></p>'; // switch to default/rwd layout
    	} else { 
    	echo '<p class="switch"><a href="?layout=fixed">Switch to Fixed Desktop Layout</a></p>'; // switch to optout/fixed layout
    	} 
    ?>
    I'll add a note to the blog page as a tip for anyone else in the same boat. Thanks for your help on this
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

Similar Threads

  1. make navbar mobile responsive?
    By mlegg in forum CSS
    Replies: 21
    Last Post: 07-05-2014, 03:11 PM
  2. HTML5 Responsive Web design
    By letom in forum HTML
    Replies: 3
    Last Post: 03-07-2014, 03:45 AM
  3. Wordpress Responsive Theme + Mobile App
    By bbilal in forum General Paid Work Requests
    Replies: 1
    Last Post: 09-11-2013, 12:43 PM
  4. I am web designer looking for Good Information on Mobile Responsive WordPress Website
    By vedinter in forum Looking for such a script or service
    Replies: 1
    Last Post: 12-17-2012, 12:47 PM
  5. Replies: 0
    Last Post: 08-01-2012, 03:39 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •