I installed the Editable Sidebox. It worked great. I want multiple editable sideboxes so I copied each of the 4 files and renamed them ending in a _2. I also changed the items in the editable_sidebox_2_defines.php as the readme file said. It didn't work. I was getting a duplicate sidebox that had the same title and content as the first one. There were a few people in the forum that had the same problem and I wasn't able to find the "answer". I finally figured it out so I wanted to post "the answer" here so others won't have to either give up or take hours to figure it out.
I will assume that the reader is using "_2" to rename the files. I haven't "added" the CUSTOM/override file name. If you are installing it into your CUSTOM template you will need to change the file names below accordingly.
Step 1: There are 4 files to COPY and RENAME. They should be:
- /languages/english/extra_definitions/editable_sidebox_2_defines.php
- /languages/english/html_includes/define_editable_sidebox_2_content.php
- /templates/template_default/sideboxes/tpl_editable_sidebox_2.php
- /modules/sideboxes/editable_sidebox_2.php
Step 2: Do as the Readme file says: In languages/english/extra_definitions/editable_sidebox_2_defines.php
Starting at line 15:
define('BOX_HEADING_EDITABLE_SIDEBOX_2', 'Insert Your Box Title Here');
// If you change the name of the html_include file with the sidebox content, put the new name,
// without the ",php" suffix between the 2nd set of single quotes below.
// If you have multiple editable sideboxes, you will also need to change the 1st parameter
// e.g. DEFINE_EDITABLE_SIDEBOX_NAME_2
define('DEFINE_EDITABLE_SIDEBOX_NAME_2',
'define_editable_sidebox_2_content');
Step 3: There are 6 different areas that you need add "_2" to in:
/modules/sideboxes/editable_sidebox_2.php
(lines 13 - 19):
$show_editable_sidebox_2 = true;
$define_sidebox = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', DEFINE_EDITABLE_SIDEBOX_NAME_2, 'false');
if ($show_editable_sidebox_2 == true) {
require($template->get_template_dir('tpl_editable_sidebox_2.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_editable_sidebox_2.php');
$title = BOX_HEADING_EDITABLE_SIDEBOX_2;
Step 4 & 5: Remember to customize the header and the content per the readme instructions.
Step 6: Remember to TURN ON the sidebox in Admin>Tools>Layout Box Controller
I hope this helps someone!