Yes, you are correct! The above code from 2.0 will suffice for those not looking to use the template display_mode switch.
For those of you that want to use or was expecting to use the core template display_mode switch functions included in my 2.1 framework that I forgot to copy over before submitting, Anne is now and always accepting donations to
RESTORE this function. LOL, just kidding, no really. (Made me laugh!

, my own personal inside joke)
In: \includes\templates\winchester_responsive\common\html_header.php
find:
Code:
if ($detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode']=='isMobile' or $detect->isTablet() && $_SESSION['display_mode']=='isMobile' or $_SESSION['display_mode']=='isMobile'){
echo $responsive_mobile;
} else if ($detect->isMobile() && $_SESSION['display_mode']=='isTablet' or $detect->isTablet() && $_SESSION['display_mode']=='isTablet' or $_SESSION['display_mode']=='isTablet'){
echo $responsive_tablet;
} else if ($detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode']=='isDesktop' or $detect->isTablet() && $_SESSION['display_mode']=='isDesktop' or $_SESSION['display_mode']=='isNonResponsive'){
echo '';
} else {
echo $responsive_default;
}
}
and replace with:
Code:
if ($detect->isMobile() && !$detect->isTablet() or $detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode']=='isMobile' or $detect->isTablet() && $_SESSION['display_mode']=='isMobile' or $_SESSION['display_mode']=='isMobile') {
echo $responsive_mobile;
} else if ($detect->isTablet() or $detect->isMobile() && $_SESSION['display_mode']=='isTablet' or $detect->isTablet() && $_SESSION['display_mode']=='isTablet' or $_SESSION['display_mode']=='isTablet'){
echo $responsive_tablet;
} else if ($detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode']=='isDesktop' or $detect->isTablet() && $_SESSION['display_mode']=='isDesktop' or $_SESSION['display_mode']=='isNonResponsive'){
echo '';
} else {
echo $responsive_default;
}
}
I am sure Anne will update promptly!
@DivaVocals, Crystal
The above should work now with the scroller as well.
Code:
<?php if ($detect->isMobile() && !$detect->isTablet() or $detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode']=='isMobile' or $detect->isTablet() && $_SESSION['display_mode']=='isMobile' or $_SESSION['display_mode']=='isMobile') { ?>
<script type="text/javascript"><!--
$(document).ready(function() {
$("#foo1").carouFredSel({
auto: false,
align: "center",
padding: [0, 25, 0, 20],
width: "100%",
height: "auto",
items: {
},
scroll: 1, <!--SHOW 1 ON PHONES-->
prev : {
button : "#foo1_prev",
},
next : {
button : "#foo1_next",
}
});
});
--></script>
<?php } else if ($detect->isTablet() or $detect->isMobile() && $_SESSION['display_mode']=='isTablet' or $detect->isTablet() && $_SESSION['display_mode']=='isTablet' or $_SESSION['display_mode']=='isTablet'){ ?>
<script type="text/javascript"><!--
$(document).ready(function() {
$("#foo1").carouFredSel({
auto: false,
align: "center",
padding: [0, 25, 0, 20],
width: "100%",
height: "auto",
items: {
},
scroll: 3, <!--SHOW 3 ON TABLETS-->
prev : {
button : "#foo1_prev",
},
next : {
button : "#foo1_next",
}
});
});
--></script>
<?php } else if ($detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode']=='isDesktop' or $detect->isTablet() && $_SESSION['display_mode']=='isDesktop' or $_SESSION['display_mode']=='isNonResponsive'){ ?>
<script type="text/javascript"><!--
$(document).ready(function() {
$("#foo1").carouFredSel({
auto: false,
align: "center",
padding: [0, 25, 0, 20],
width: "100%",
height: "auto",
items: {
},
scroll: 5, <!--SHOW 5 ON NON-RESPONSIVE DESKTOPS-->
prev : {
button : "#foo1_prev",
},
next : {
button : "#foo1_next",
}
});
});
--></script>
<?php } else { ?>
<script type="text/javascript"><!--
$(document).ready(function() {
$("#foo1").carouFredSel({
auto: false,
align: "center",
padding: [0, 25, 0, 20],
width: "100%",
height: "auto",
items: {
},
scroll: 4, <!--SHOW 4 ON RESPONSIVE DESKTOPS-->
prev : {
button : "#foo1_prev",
},
next : {
button : "#foo1_next",
}
});
});
--></script>
<?php } ?>
Bookmarks