Quote Originally Posted by yaritai View Post
Just wanted to add that since the session display mode is not set unless clicking the switches, I think the if statements should be changed to:

Basically I just added $_SESSION['display_mode']==''. This would now allow the view to change for those who are using the switches. These changes should also be used in places where the mobile detect is using this same if statement structure. I have not looked at what files are affected but do recall other files that use it to call specific files/code.

Without the changes above, the switches would not do anything as the addition of the 2.0 code workaround would always override the switch.
The reason it was not working is because it was looking for a $_SESSION on page load which did not exist, I fixed that!

Now the php-detect class renders the proper responsive files on page load and YES, sets the $_SESSION after a link is clicked.

My fix will be added to the update of the DIY Responsive Template Default for v1.5.x package, Anne may use or choose to go your route or any other as she sees fit. Just looking at what you provided, I'm sure it works but have not tested.