When you CLONE this "blank sidebox" module, the BEST thing to do is to RE-NAME all the constants and defines to something emtirely different from "blank_sidebox".
For example, I created a CLONE from the blank sidebox module to show a sidebox for the MEMBERSHIPS my client has.
The FIRST thing I did was to RE-NAME the PHP files in each of the folders:
FROM THIS:
languages/english/extra_definitions/blank_sidebox_defines.php
modules/sideboxes/blank_sidebox.php
templates/template_default/sideboxes/tpl_blank_sidebox.php
TO THIS:
languages/english/extra_definitions/membership_sidebox_defines.php
modules/sideboxes/membership_sidebox.php
templates/template_default/sideboxes/tpl_membership_sidebox.php
Then, in each of the RE-NAMED php files, I changed every instance of blank_sidebox and BLANK_SIDEBOX to membership_sidebox and MEMBERSHIP_SIDEBOX
EG, for languages/english/extra_definitions/membership_sidebox_defines.php:
PHP Code:
<?php
/**
* membership sidebox definitions - text for inclusion in a new membership 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: membership_sidebox.php 2007-05-26 kuroi $
*/
define('BOX_HEADING_MEMBERSHIP_SIDEBOX', 'Membership Sidebox Header');
define('TEXT_MEMBERSHIP_SIDEBOX', 'Replace this text with your HTML content.');
?>
AND FOR: modules/sideboxes/membership_sidebox.php
PHP Code:
<?php
/**
* membership sidebox - allows a membership 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: membership_sidebox.php 2007-05-26 kuroi $
*/
// test if box should display
$show_membership_sidebox = true;
if ($show_membership_sidebox == true) {
require($template->get_template_dir('tpl_membership_sidebox.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_membership_sidebox.php');
$title = BOX_HEADING_MEMBERSHIP_SIDEBOX;
$title_link = false;
require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
}
?>
AND FOR: templates/template_default/sideboxes/tpl_membership_sidebox.php
PHP Code:
<?php
/**
* membership sidebox - allows a membership 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: membership_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/membership_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_MEMBERSHIP_SIDEBOX . '</p>';
$content .= '<p>You can include text, links, images, HTML markup and even PHP code</p>';
$content .= '</div>';
?>
Bookmarks