Forums / Addon Templates / Responsive DIY Template Default for v1.5.x

Responsive DIY Template Default for v1.5.x

Views: 48,346

Results 201 to 220 of 332
26 Mar 2015, 3:46 PM
#201
pompidompie avatar

pompidompie

Zen Follower

Join Date:
Mar 2015
Posts:
105
Plugin Contributions:
0

Responsive DIY Template Default for v1.5.x

I like to ask for some help getting te code in. I have tryed to do it myself, but i keep getting a black page.

This is my main-page

<?php /** * Common Template - tpl_main_page.php * * Governs the overall layout of an entire page<br /> * Normally consisting of a header, left side column. center column. right side column and footer<br /> * For customizing, this file can be copied to /templates/your_template_dir/pagename<br /> * example: to override the privacy page<br /> * - make a directory /templates/my_template/privacy<br /> * - copy /templates/templates_defaults/common/tpl_main_page.php to /templates/my_template/privacy/tpl_main_page.php<br /> * <br /> * to override the global settings and turn off columns un-comment the lines below for the correct column to turn off<br /> * to turn off the header and/or footer uncomment the lines below<br /> * Note: header can be disabled in the tpl_header.php<br /> * Note: footer can be disabled in the tpl_footer.php<br /> * <br /> * $flag_disable_header = true;<br /> * $flag_disable_left = true;<br /> * $flag_disable_right = true;<br /> * $flag_disable_footer = true;<br /> * <br /> * // example to not display right column on main page when Always Show Categories is OFF<br /> * <br /> * if ($current_page_base == 'index' and $cPath == '') {<br /> * $flag_disable_right = true;<br /> * }<br /> * <br /> * example to not display right column on main page when Always Show Categories is ON and set to categories_id 3<br /> * <br /> * if ($current_page_base == 'index' and $cPath == '' or $cPath == '3') {<br /> * $flag_disable_right = true;<br /> * }<br /> * * @package templateSystem * @copyright Copyright 2003-2007 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: tpl_main_page.php 7085 2007-09-22 04:56:31Z ajeh $ */ // the following IF statement can be duplicated/modified as needed to set additional flags if (in_array($current_page_base,explode(",",'list_pages_to_skip_all_right_sideboxes_on_here,separated_by_commas,and_no_spaces')) ) { $flag_disable_right = true; } if ($this_is_home_page) { $flag_disable_left = true; $flag_disable_right = true; } $header_template = 'tpl_header.php'; $footer_template = 'tpl_footer.php'; $left_column_file = 'column_left.php'; $right_column_file = 'column_right.php'; $body_id = ($this_is_home_page) ? 'indexHome' : str_replace('_', '', $_GET['main_page']); ?> <body id="<?php echo $body_id . 'Body'; ?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js" type="text/javascript"></script> <script src="<?php echo $template->get_template_dir('',DIR_WS_TEMPLATE, $current_page_base,'jscript') . '/back_to_top.min.js' ?>" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function(){ BackToTop({ text : 'Back to Top', autoShow : true, timeEffect : 750 }); }); </script> <?php if (SHOW_BANNERS_GROUP_SET1 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET1)) { if ($banner->RecordCount() > 0) { ?> <div id="bannerOne" class="banners"><?php echo zen_display_banner('static', $banner); ?></div> <?php } } ?> <div id="mainWrapper"> <?php /** * prepares and displays header output * */ if (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_HEADER_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == '')) { $flag_disable_header = true; } require($template->get_template_dir('tpl_header.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_header.php');?> <div id="content-container"> <?php if ($this_is_home_page) { ?> <div id="home-banner"><center><?php require($template->get_template_dir('tpl_home_slider.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_home_slider.php');?></center></div> <?php } ?> <table width="100%" border="0" cellspacing="0" cellpadding="0" id="contentMainWrapper"> <tr> <?php if (COLUMN_LEFT_STATUS == 0 || (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_COLUMN_LEFT_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == ''))) { // global disable of column_left $flag_disable_left = true; } if (!isset($flag_disable_left) || !$flag_disable_left) {

?>

<td id="navColumnOne" class="columnLeft" style="width: <?php echo COLUMN_WIDTH_LEFT; ?>"> <?php /** * prepares and displays left column sideboxes * */ ?> <div id="navColumnOneWrapper" style="width: <?php echo BOX_WIDTH_LEFT; ?>"><?php require(DIR_WS_MODULES . zen_get_module_directory('column_left.php')); ?></div></td> <?php } ?> <td valign="top"> <!-- bof breadcrumb --> <?php if (DEFINE_BREADCRUMB_STATUS == '1' || (DEFINE_BREADCRUMB_STATUS == '2' && !$this_is_home_page) ) { ?> <div id="navBreadCrumb"><?php echo $breadcrumb->trail(BREAD_CRUMBS_SEPARATOR); ?></div> <?php } ?> <!-- eof breadcrumb --> <?php if (SHOW_BANNERS_GROUP_SET3 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET3)) { if ($banner->RecordCount() > 0) { ?> <div id="bannerThree" class="banners"><?php echo zen_display_banner('static', $banner); ?></div> <?php } } ?> <!-- bof upload alerts --> <?php if ($messageStack->size('upload') > 0) echo $messageStack->output('upload'); ?> <!-- eof upload alerts --> <?php /** * prepares and displays center column * */ require($body_code); ?> <?php if (SHOW_BANNERS_GROUP_SET4 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET4)) { if ($banner->RecordCount() > 0) { ?> <div id="bannerFour" class="banners"><?php echo zen_display_banner('static', $banner); ?></div> <?php } } ?></td> <?php //if (COLUMN_RIGHT_STATUS == 0 || (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_COLUMN_RIGHT_OFF == 'true' && $_SESSION['customers_authorization'] != 0)) { if (COLUMN_RIGHT_STATUS == 0 || (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_COLUMN_RIGHT_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == ''))) { // global disable of column_right $flag_disable_right = true; } if (!isset($flag_disable_right) || !$flag_disable_right) { ?> <td id="navColumnTwo" class="columnRight" style="width: <?php echo COLUMN_WIDTH_RIGHT; ?>"> <?php /** * prepares and displays right column sideboxes * */ ?> <div id="navColumnTwoWrapper" style="width: <?php echo BOX_WIDTH_RIGHT; ?>"><?php require(DIR_WS_MODULES . zen_get_module_directory('column_right.php')); ?></div></td> <?php } ?> </tr> </table> </div></div> <?php /** * prepares and displays footer output * */ if (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_FOOTER_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == '')) { $flag_disable_footer = true; } require($template->get_template_dir('tpl_footer.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_footer.php'); ?> <!--bof- parse time display --> <?php if (DISPLAY_PAGE_PARSE_TIME == 'true') { ?> <div class="smallText center">Parse Time: <?php echo $parse_time; ?> - Number of Queries: <?php echo $db->queryCount(); ?> - Query Time: <?php echo $db->queryTime(); ?></div> <?php } ?> <!--eof- parse time display --> <!--bof- banner #6 display --> <?php if (SHOW_BANNERS_GROUP_SET6 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET6)) { if ($banner->RecordCount() > 0) { ?> <div id="bannerSix" class="banners"><?php echo zen_display_banner('static', $banner); ?></div> <?php } } ?> <!--eof- banner #6 display --> </div> </body>

And this is the file that i have to get the parts out that i need to add in my own main-page

<?php /** * tpl_main_page.php * * Governs the overall layout of an entire page<br /> * Normally consisting of a header, left side column. center column. right side column and footer<br /> * For customizing, this file can be copied to /templates/your_template_dir/pagename<br /> * example: to override the privacy page<br /> * - make a directory /templates/my_template/privacy<br /> * - copy /templates/templates_defaults/common/tpl_main_page.php to /templates/my_template/privacy/tpl_main_page.php<br /> * <br /> * to override the global settings and turn off columns un-comment the lines below for the correct column to turn off<br /> * to turn off the header and/or footer uncomment the lines below<br /> * Note: header can be disabled in the tpl_header.php<br /> * Note: footer can be disabled in the tpl_footer.php<br /> * <br /> * $flag_disable_header = true;<br /> * $flag_disable_left = true;<br /> * $flag_disable_right = true;<br /> * $flag_disable_footer = true;<br /> * <br /> * // example to not display right column on main page when Always Show Categories is OFF<br /> * <br /> * if ($current_page_base == 'index' and $cPath == '') {<br /> * $flag_disable_right = true;<br /> * }<br /> * <br /> * example to not display right column on main page when Always Show Categories is ON and set to categories_id 3<br /> * <br /> * if ($current_page_base == 'index' and $cPath == '' or $cPath == '3') {<br /> * $flag_disable_right = true;<br /> * }<br /> * * @package templateSystem * @copyright Copyright 2003-2007 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: tpl_main_page.php 7085 2007-09-22 04:56:31Z ajeh $ * Altered by rbarbour (ZCAdditions.com), Responsive DIY Template Default for 1.5.x (65) */ // the following IF statement can be duplicated/modified as needed to set additional flags if (in_array($current_page_base,explode(",",'shopping_cart')) ) { $flag_disable_right = true; } if (in_array($current_page_base,explode(",",'login')) ) { $flag_disable_right = true; $flag_disable_left = true; } // (BOF - 2.1) Responsive DIY Template Default for 1.5.x (65) if ($flag_disable_right or COLUMN_RIGHT_STATUS == '0') { $box_width_right = preg_replace('/[^0-9]/', '', '0'); $box_width_right_new = ''; }else{ $box_width_right = COLUMN_WIDTH_RIGHT; $box_width_right = preg_replace('/[^0-9]/', '', $box_width_right); $box_width_right_new = 'col' . $box_width_right; } if ($flag_disable_left or COLUMN_LEFT_STATUS == '0') { $box_width_left = preg_replace('/[^0-9]/', '', '0'); $box_width_left_new = ''; }else{ $box_width_left = COLUMN_WIDTH_LEFT; $box_width_left = preg_replace('/[^0-9]/', '', $box_width_left); $box_width_left_new = 'col' . $box_width_left; } $side_columns_total = $box_width_left + $box_width_right; $center_column = '970'; // This value should not be altered $center_column_width = $center_column - $side_columns_total; // (EOF - 2.1) Responsive DIY Template Default for 1.5.x (65) $header_template = 'tpl_header.php'; $footer_template = 'tpl_footer.php'; $left_column_file = 'column_left.php'; $right_column_file = 'column_right.php'; $body_id = ($this_is_home_page) ? 'indexHome' : str_replace('_', '', $_GET['main_page']); ?> <body id="<?php echo $body_id . 'Body'; ?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>> <?php if (SHOW_BANNERS_GROUP_SET1 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET1)) { if ($banner->RecordCount() > 0) { ?> <div id="bannerOne" class="banners"><?php echo zen_display_banner('static', $banner); ?></div> <?php } } ?> <!--(BOF - 2.1) Responsive DIY Template Default for 1.5.x (65)--> <?php if (COLUMN_WIDTH == '0'){ ?> <!--(EOF - 2.1) Responsive DIY Template Default for 1.5.x (65)--> <div id="mainWrapper"> <?php /** * prepares and displays header output * */ if (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_HEADER_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == '')) { $flag_disable_header = true; } require($template->get_template_dir('tpl_header.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_header.php');?> <table width="100%" border="0" cellspacing="0" cellpadding="0" id="contentMainWrapper"> <tr> <?php if (COLUMN_LEFT_STATUS == 0 || (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_COLUMN_LEFT_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == ''))) { // global disable of column_left $flag_disable_left = true; } if (!isset($flag_disable_left) || !$flag_disable_left) { ?> <td id="navColumnOne" class="columnLeft" style="width: <?php echo COLUMN_WIDTH_LEFT; ?>"> <?php /** * prepares and displays left column sideboxes * */ ?> <div id="navColumnOneWrapper" style="width: <?php echo BOX_WIDTH_LEFT; ?>"><?php require(DIR_WS_MODULES . zen_get_module_directory('column_left.php')); ?></div></td> <?php } ?> <td valign="top"> <!--(BOF - 2.1) Responsive DIY Template Default for 1.5.x (65)--> <?php }else{ ?> <?php /** * prepares and displays header output * */ if (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_HEADER_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == '')) { $flag_disable_header = true; } require($template->get_template_dir('tpl_header.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_header.php'); ?> <div class="onerow-fluid <?php echo $fluidisFixed; ?>"> <?php if (COLUMN_LEFT_STATUS == 0 || (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_COLUMN_LEFT_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == ''))) { // global disable of column_left $flag_disable_left = true; } if (!isset($flag_disable_left) || !$flag_disable_left) { ?> <div class="<?php echo $box_width_left_new; ?>"> <?php /** * prepares and displays left column sideboxes * */ ?> <?php require(DIR_WS_MODULES . zen_get_module_directory('column_left.php')); ?> </div> <?php } ?> <?php /** * decide center column width * */ ?> <div class="<?php echo 'col' . $center_column_width; ?>"> <?php } ?> <!--(EOF - 2.1) Responsive DIY Template Default for 1.5.x (65)--> <!-- bof breadcrumb --> <?php if (DEFINE_BREADCRUMB_STATUS == '1' || (DEFINE_BREADCRUMB_STATUS == '2' && !$this_is_home_page) ) { ?>
<div id="navBreadCrumb"><?php echo $breadcrumb->trail(BREAD_CRUMBS_SEPARATOR); ?></div>
<?php } ?> <!-- eof breadcrumb --> <?php if (SHOW_BANNERS_GROUP_SET3 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET3)) { if ($banner->RecordCount() > 0) { ?> <div id="bannerThree" class="banners"><?php echo zen_display_banner('static', $banner); ?></div> <?php } } ?> <!-- bof upload alerts --> <?php if ($messageStack->size('upload') > 0) echo $messageStack->output('upload'); ?> <!-- eof upload alerts --> <?php /** * prepares and displays center column * */ require($body_code); ?> <?php if (SHOW_BANNERS_GROUP_SET4 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET4)) { if ($banner->RecordCount() > 0) { ?> <div id="bannerFour" class="banners"><?php echo zen_display_banner('static', $banner); ?></div> <?php } } ?> <!--(BOF - 2.1) Responsive DIY Template Default for 1.5.x (65)--> <?php if (COLUMN_WIDTH == '0'){ ?> <!--(EOF - 2.1) Responsive DIY Template Default for 1.5.x (65)--> </td> <?php //if (COLUMN_RIGHT_STATUS == 0 || (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_COLUMN_RIGHT_OFF == 'true' && $_SESSION['customers_authorization'] != 0)) { if (COLUMN_RIGHT_STATUS == 0 || (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_COLUMN_RIGHT_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == ''))) { // global disable of column_right $flag_disable_right = true; } if (!isset($flag_disable_right) || !$flag_disable_right) { ?> <td id="navColumnTwo" class="columnRight" style="width: <?php echo COLUMN_WIDTH_RIGHT; ?>"> <?php /** * prepares and displays right column sideboxes * */ ?> <div id="navColumnTwoWrapper" style="width: <?php echo BOX_WIDTH_RIGHT; ?>"><?php require(DIR_WS_MODULES . zen_get_module_directory('column_right.php')); ?></div></td> <?php } ?> </tr> </table> <!--(BOF - 2.1) Responsive DIY Template Default for 1.5.x (65)--> <?php }else{ ?> <br class="clearBoth" /> <br class="clearBoth" /> </div> <?php //if (COLUMN_RIGHT_STATUS == 0 || (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_COLUMN_RIGHT_OFF == 'true' && $_SESSION['customers_authorization'] != 0)) { if (COLUMN_RIGHT_STATUS == 0 || (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '') || (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_COLUMN_RIGHT_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == ''))) { // global disable of column_right $flag_disable_right = true; } if (!isset($flag_disable_right) || !$flag_disable_right) { ?> <div class="<?php echo $box_width_right_new; ?>"> <?php /** * prepares and displays right column sideboxes * */ ?> <?php require(DIR_WS_MODULES . zen_get_module_directory('column_right.php')); ?> </div> <?php } ?> </div> <?php } ?> <!--(EOF - 2.1) Responsive DIY Template Default for 1.5.x (65)--> <?php /** * prepares and displays footer output * */ if (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_FOOTER_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == '')) { $flag_disable_footer = true; } require($template->get_template_dir('tpl_footer.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_footer.php'); ?> <!--bof- parse time display --> <?php if (DISPLAY_PAGE_PARSE_TIME == 'true') { ?> <div class="smallText center">Parse Time: <?php echo $parse_time; ?> - Number of Queries: <?php echo $db->queryCount(); ?> - Query Time: <?php echo $db->queryTime(); ?></div> <?php } ?> <!--eof- parse time display --> <!--bof- banner #6 display --> <?php if (SHOW_BANNERS_GROUP_SET6 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET6)) { if ($banner->RecordCount() > 0) { ?> <div id="bannerSix" class="banners"><?php echo zen_display_banner('static', $banner); ?></div> <?php } } ?> <!--eof- banner #6 display --> <!--(BOF - 2.1) Responsive DIY Template Default for 1.5.x (65)--> <?php if (COLUMN_WIDTH == '0'){ ?> </div><!--eof--> <br class="clearBoth"> <?php }else{ ?> <?php //do nothing ?> <?php } ?> <!--(EOF - 2.1) Responsive DIY Template Default for 1.5.x (65)--> </body>

Language: Dutch
English: not so very good
Allready have a live shop, so building local/on my computer

5 Apr 2015, 12:05 AM
#202
catach avatar

catach

Zen Follower

Join Date:
Oct 2005
Posts:
101
Plugin Contributions:
0

Re: Responsive DIY Template Default for v1.5.x

Does anyone know if this is compatible with 1.5.4?

5 Apr 2015, 5:08 PM
#203
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Responsive DIY Template Default for v1.5.x

Yes, it is compatible with 1.5.4

catach:

Does anyone know if this is compatible with 1.5.4?

26 Apr 2015, 5:25 PM
#205
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Responsive DIY Template Default for v1.5.x

I have merged with 1.3.9h, so it does works, however, you will have to manually add the admin pages for earlier versions, their are two plugins in the plugin section.

Admin Page Keys and one by numinix I think.

4 Jun 2015, 8:05 AM
#206
dreamer40 avatar

dreamer40

New Zenner

Join Date:
Oct 2011
Posts:
19
Plugin Contributions:
0

Re: Responsive DIY Template Default for v1.5.x

I have just finished upgrading my dev site to 1.5.4 ready to switch it for my 1.3.9h but before I make it live I would like to investigate making it responsive. Does anyone have a link or two they would like to share to live responsive Zen-cart sites that I can have a wander around to see how they work and what is possible?

4 Jun 2015, 3:40 PM
#207
sarahl avatar

sarahl

Zen Follower

Join Date:
May 2004
Location:
UK
Posts:
471
Plugin Contributions:
0

Re: Responsive DIY Template Default for v1.5.x

So I must be really dumb today but how do I turn off the "This must be a Desktop!" code :(:(

4 Jun 2015, 3:57 PM
#208
sarahl avatar

sarahl

Zen Follower

Join Date:
May 2004
Location:
UK
Posts:
471
Plugin Contributions:
0

Re: Responsive DIY Template Default for v1.5.x

includes/YOUR TEMPLATE/common/tpl_header.php

found it - can I just delete or do I need to keep that in there? As it says EXAMPLE for 2.1b etc .. ?

Oh BTW the links and instructions all don't work so I used instructions from first post instead - you have certainly changed it a lot from previous - been using for a while but this one has totally caught me out!

Oh another comment I had to up the max width 1200px in media queries as most PC's pof my clients are above 1200 which means that the site was displaying full width when in a large screen :D changed to 2000px instead as that way sites are not broken / full width on the larger screens :)

Oh 1.5.4 added in the new CDN jquery code in header file - just so you know yours needs updating if its ok for 1.5.4 - I think that was the only new things from 1.5.3 that is relevant :)

9 Jun 2015, 12:21 PM
#209
dreamer40 avatar

dreamer40

New Zenner

Join Date:
Oct 2011
Posts:
19
Plugin Contributions:
0

Re: Responsive DIY Template Default for v1.5.x

I recently finished upgrading my dev site to 1.5.4 and all tested OK so I thought I would see if I could make it responsive. I found this template (2.1b) so thought I would try it and have been very pleased with the way it looks on my iPad and iPhone as it will make the site far more usable on those but after further testing have noticed an issue.

The site looks great and the side boxes appear and disappear depending on screen size and width but I discovered that on my laptop on the order information page (index.php?main_page=account_history_info&order_id=xxxx) the right hand side boxes appear under the order details rather than on the side where they should.

On the iPhone and iPad in portrait mode the currency and shipping boxes are the only right hand ones I have chosen to display and rather than just being full width below the main page as they are on the other screens they are in a little box like area of their own under the order so the issue seems to affect all devices.

I restored the site back from a backup and tried implementing again and get the same results.

First off I tried installing all of the code and SQL but without the style sheets from the package.

In that state, with 'Activate Responsive Template' set to 0 the site looks perfectly normal.
If I change it to 1 but have none of the package .css files the site fills the whole screen including full width side boxes, which is fair enough.
If I overwrite my stylesheet.css with the one from the package the colours are all over the place but display in a single column as above.
If I then put the responsive.css in place the site still has the wrong colours but the layout becomes normal everwhere except on the Order Information Page.

If I do an inspect element on the right column I can see that it appears to be nested in with the centre column which explains why it appears underneath it. I found that putting a </div> on line 250 of tpl_main_page.php fixed the column issue on that page but broke all of the other pages.

Has anyone else had this issue when implementing the template or have suggestions as to what to try next?

Attachment #15346

Attachment #15347

Attachment #15348

Attachment #15349

10 Jun 2015, 8:16 AM
#210
dreamer40 avatar

dreamer40

New Zenner

Join Date:
Oct 2011
Posts:
19
Plugin Contributions:
0

Re: Responsive DIY Template Default for v1.5.x

Phew, found it!

There was a </div> missing at the bottom of includes/templates/CUSTOM/templates/tpl_account_history_info_default.php.

The current site seems to work fine without it but the responsive template exposes the issue.

10 Jun 2015, 6:23 PM
#211
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Responsive DIY Template Default for v1.5.x

Thank you for posting your issue and resolution!

Yes, amongst the flexibility this code provides, it also exposes any unclosed div elements by breaking the layout.

I have been absent from the forums for some time due to personal reasons but have been working on a improved version that literally cuts the merging in half. Hope to release soon!

Dreamer40:

Phew, found it!

There was a </div> missing at the bottom of includes/templates/CUSTOM/templates/tpl_account_history_info_default.php.

The current site seems to work fine without it but the responsive template exposes the issue.

10 Jun 2015, 6:30 PM
#212
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Responsive DIY Template Default for v1.5.x

You can delete the SAMPLE part of that file but the added class to headerWrapper need to remain intact for the non Responsive code to work.

I will be adding new readme.txt files soon!

The responsive_default.css files has examples to limit the max-display for larger screens.

The code itself does not require any jQuery or javascript, any included in package are for example purposes only.

SarahL:

includes/YOUR TEMPLATE/common/tpl_header.php

found it - can I just delete or do I need to keep that in there? As it says EXAMPLE for 2.1b etc .. ?

Oh BTW the links and instructions all don't work so I used instructions from first post instead - you have certainly changed it a lot from previous - been using for a while but this one has totally caught me out!

Oh another comment I had to up the max width 1200px in media queries as most PC's pof my clients are above 1200 which means that the site was displaying full width when in a large screen :D changed to 2000px instead as that way sites are not broken / full width on the larger screens :)

Oh 1.5.4 added in the new CDN jquery code in header file - just so you know yours needs updating if its ok for 1.5.4 - I think that was the only new things from 1.5.3 that is relevant :)

11 Jun 2015, 4:41 AM
#213
dreamer40 avatar

dreamer40

New Zenner

Join Date:
Oct 2011
Posts:
19
Plugin Contributions:
0

Re: Responsive DIY Template Default for v1.5.x

rbarbour:

Hope to release soon!

I look forward to it and thanks again for such a great add-on!

11 Jun 2015, 1:45 PM
#214
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: Responsive DIY Template Default for v1.5.x

Great add-on.
I have been installing today (and yesterday!) and it looks very good.

Just a question? the override (my template) function does not work for me? For example, I show the standard greeting on my HOME page not the one I have written and stored in ["shop"\includes\languages\english\classic\index.php].

My site is here http://www.simmar.ch/catalog/index.php?main_page=index&language=en

BTW you can probably notice I am still working on the appearance !!

11 Jun 2015, 6:45 PM
#215
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Responsive DIY Template Default for v1.5.x

The correct override folder is:

responsive_template_default

If it doesn't exist, it can be added anywhere you see the "classic" folder

11 Jun 2015, 7:54 PM
#216
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: Responsive DIY Template Default for v1.5.x

Great, thanks for the lightning fast answer.

12 Jun 2015, 10:51 AM
#217
sarahl avatar

sarahl

Zen Follower

Join Date:
May 2004
Location:
UK
Posts:
471
Plugin Contributions:
0

Re: Responsive DIY Template Default for v1.5.x

rbarbour:

You can delete the SAMPLE part of that file but the added class to headerWrapper need to remain intact for the non Responsive code to work.

I will be adding new readme.txt files soon!

The responsive_default.css files has examples to limit the max-display for larger screens.

The code itself does not require any jQuery or javascript, any included in package are for example purposes only.

Sorry for delay in replying - thank you :)

Oh the CDN jquery - what I meant was the new 154 files includes that within the html_header.php file so if people use yours from the ZIP file it is missing that line - its not needed for your module - no - but its been added for 154 core code :)

Just as another comment - I ended up not using the ipad portrait code as it made the layout wore rather than better - in my opinion - so I have left it pretty much as is without any extras and site worked great!!

either way - great mod so thank you

13 Jun 2015, 10:29 AM
#218
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: Responsive DIY Template Default for v1.5.x

SarahL:

So I must be really dumb today but how do I turn off the "This must be a Desktop!" code :(:(

rbarbour:

You can delete the SAMPLE part of that file but the added class to headerWrapper need to remain intact for the non Responsive code to work.

I will be adding new readme.txt files soon!

The responsive_default.css files has examples to limit the max-display for larger screens.

The code itself does not require any jQuery or javascript, any included in package are for example purposes only.

I am even dumber! :blush:
Not only can I not turn off the "This must be a Desktop!" code but I also do not understand your answer :( :(
I tried commenting out various stuff like document write around this section " 2.0 utilizes php-mobile-detect, allows us to use different Javascript for different devices." but instead of turn off the "This must be a Desktop!" code I managed to turn off the whole page :(
Of course I have no clue what I am doing :)

13 Jun 2015, 2:11 PM
#219
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Responsive DIY Template Default for v1.5.x

You will have to post the file so I can see the changes you made

marton_1:

I am even dumber! :blush:
Not only can I not turn off the "This must be a Desktop!" code but I also do not understand your answer :( :(
I tried commenting out various stuff like document write around this section " 2.0 utilizes php-mobile-detect, allows us to use different Javascript for different devices." but instead of turn off the "This must be a Desktop!" code I managed to turn off the whole page :(
Of course I have no clue what I am doing :)

13 Jun 2015, 2:48 PM
#220
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: Responsive DIY Template Default for v1.5.x

rbarbour:

You will have to post the file so I can see the changes you made

Ah, probably my post was not clearly written :(

I reversed my changes so my page is no longer turned off :)

I just would like to stop displaying "This must be a Desktop!" at the top of the pages.
Example code would be nice :) :)

Site is here www[.]simmar[.]ch/catalog

Thanks