ZenCart v1.5.0
Template: Mystik
Site:http://www.prymlurg.com
I am trying to duplicate the no_boarder sidebox so I can add images to the side box area without headers, boarders, or backgrounds. I have duplicated the box seven times so that I can apply the box to a particular page. So, if I want the box on the index page I would use no_boarder_sidebow_main. If I want it on the contact page I would use no_boarder_sidebox_contact.
I think I have made all the correct changes to the code but I would like some verification before I proceed to testing on my site.
I also need some help with the stylesheet. I want to make sure there is no header, boarder, or background. But I also want to make sure that any text that I add is formatted the same as other sideboxes.
Here are the changes I made to my main page no_boarder_sidebox.
Original tpl_no_boarder_sidebox.php:
Code:<?php /** * blank sidebox - allows a blank sidebox to be added to your site * * @package templateSystem * @copyright 2007 Kuroi Web Design * @copyright Portions Copyright 2003-2007 Zen Cart Development Team * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: blank_sidebox.php 2007-05-26 kuroi $ */ $content = ''; $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">'; // Replace the text and HTML tags between the apostophes on lines 19 and 20. // Use as many or as few lines using this model as you need for your custom content. // If you have a multilingual site define your text in the languages/YOUR_LANGUAGE/extra_definitions/no_boarder_sidebox_defines.php and include it as shown in line 19. // If your site is monolingual, you can put the text right here as shown on line 20 (and nobody will know!) $content .= '<p>' . TEXT_NO_BOARDER_SIDEBOX . '</p>'; $content .= '<p>You can include text, links, images, HTML markup and even PHP code</p>'; $content .= '</div>'; ?>
Mod tpl_no_boarder_sidebox.php:
Code:<?php /** * blank sidebox - allows a blank sidebox to be added to your site * * @package templateSystem * @copyright 2007 Kuroi Web Design * @copyright Portions Copyright 2003-2007 Zen Cart Development Team * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: blank_sidebox.php 2007-05-26 kuroi $ */ $content = ''; $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContentNhnb">'; // Replace the text and HTML tags between the apostophes on lines 19 and 20. // Use as many or as few lines using this model as you need for your custom content. // If you have a multilingual site define your text in the languages/YOUR_LANGUAGE/extra_definitions/no_boarder_sidebox_defines.php and include it as shown in line 19. // If your site is monolingual, you can put the text right here as shown on line 20 (and nobody will know!) $content .= '<p>' . TEXT_NO_BOARDER_SIDEBOX_MAIN . '</p>'; $content .= '<p>You can include text, links, images, HTML markup and even PHP code</p>'; $content .= '</div>'; ?>
Original no_boarder_sidebox.php:
Code:<?php /** * blank sidebox - allows a blank sidebox to be added to your site * * @package templateSystem * @copyright 2007 Kuroi Web Design * @copyright Portions Copyright 2003-2007 Zen Cart Development Team * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: blank_sidebox.php 2007-05-26 kuroi $ */ // test if box should display $show_no_boarder_sidebox = true; if ($show_no_boarder_sidebox == true) { require($template->get_template_dir('tpl_no_boarder_sidebox.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_no_boarder_sidebox.php'); $title = BOX_HEADING_NO_BOARDER_SIDEBOX; $title_link = false; require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default); } ?>
Mod no_boarder_sidebox.php:
Code:<?php /** * blank sidebox - allows a blank sidebox to be added to your site * * @package templateSystem * @copyright 2007 Kuroi Web Design * @copyright Portions Copyright 2003-2007 Zen Cart Development Team * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: blank_sidebox.php 2007-05-26 kuroi $ */ // test if box should display $show_no_boarder_sidebox_main = true; if ($show_no_boarder_sidebox_main == true) { require($template->get_template_dir('tpl_no_boarder_sidebox_main.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes_nhnb'). '/tpl_no_boarder_sidebox_main.php'); $title = BOX_HEADING_NO_BOARDER_SIDEBOX_MAIN; $title_link = false; require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default); } ?>
Original no_boarder_sidebox_defines.php:
Code:<?php /** * blank sidebox definitions - text for inclusion in a new blank sidebox * * @package templateSystem * @copyright 2007 Kuroi Web Design * @copyright Portions Copyright 2003-2007 Zen Cart Development Team * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: blank_sidebox.php 2007-05-26 kuroi $ */ define('BOX_HEADING_NO_BOARDER_SIDEBOX', ''); define('TEXT_NO_BOARDER_SIDEBOX', 'Replace this text with your HTML content.'); ?>
Mod no_boarder_sidebox_defines.php:
I think this actually applies to a different sidebox. Yes/No???Code:<?php /** * blank sidebox definitions - text for inclusion in a new blank sidebox * * @package templateSystem * @copyright 2007 Kuroi Web Design * @copyright Portions Copyright 2003-2007 Zen Cart Development Team * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: blank_sidebox.php 2007-05-26 kuroi $ */ define('BOX_HEADING_NO_BOARDER_SIDEBOX_MAIN', ''); define('TEXT_NO_BOARDER_SIDEBOX_MAIN', 'Replace this text with your HTML content.'); ?>
Original no_boarders_sidebox_defines_2.php:
Code:<?php /** * blank sidebox definitions - text for inclusion in a new blank sidebox * * @package templateSystem * @copyright 2007 Kuroi Web Design * @copyright Portions Copyright 2003-2007 Zen Cart Development Team * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: blank_sidebox.php 2007-05-26 kuroi $ */ define('BOX_NO_BOARDER_SIDEBOX', ''); define('TEXT_NO_BOARDER_SIDEBOX', '/images/lc/IMG_0162.JPG'); ?>
Mod no_boarders_sidebox_defines_2.php:
Code:<?php /** * blank sidebox definitions - text for inclusion in a new blank sidebox * * @package templateSystem * @copyright 2007 Kuroi Web Design * @copyright Portions Copyright 2003-2007 Zen Cart Development Team * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: blank_sidebox.php 2007-05-26 kuroi $ */ define('BOX_NO_BOARDER_SIDEBOX_MAIN', ''); define('TEXT_NO_BOARDER_SIDEBOX_MAIN', '/images/lc/IMG_0162.JPG'); ?>
Now here's the css. I duplicated the section that applies to the sideboxes.
Added code:
I am pretty sure that I am missing something in the css.Code:/*sideboxes_nhnb*/ /*This controls the sidebox_nhnb content*/ .sideBoxContentNhnb { font-size: 11px; line-height: 125%; padding-top: 1px; padding-left: 1px; padding-right: 1px; padding-bottom: 1px; }
I also need help with the sql to insert the sideboxes to the Layout Box Controller in the admin section. I need the sql for the the MAIN page sideboxes and the areas of the sql that I would need to change for each additional page.
One more question. I know when adding these boxes I can only apply the box to either the left or right side. Do I have to duplicate all of these files again for each side? For example: no_boarder_sidebox_main_left.php and no_boarder_sidebox_right.php.
Have I missed anything else? Other files I need to modify?
Thank you in advance for the help.



Reply With Quote

