Is "updating box files (a step-by-step guide).txt" up to date?
=> question re: found no options array in extra_boxes files.
I'm mid-way through installing Admin Profiles (step 4) & mid-way through the above guide in testing/demo mode install of zen cart.
The one third party contribution I've previously installed is, in fact, Image Handler 2 -- convenient, given your example.
But I find a discrepancy between the instructions & the files discussed.
[ (ZC_Root_Dir)/admin/includes/boxes/extra_boxes/product_music_extras_dhtml.php
& (same_path)/image_handler_tools_dhtml.php).
That being that in neither did I find an $options array as mentioned in step 4 & shown in the example in step 5.
The one & only statement in the IH file was:
$za_contents[] = array('text' => BOX_TOOLS_IMAGE_HANDLER, 'link' => zen_href_link(FILENAME_IMAGE_HANDLER, '', 'NONSSL'));
At first I figured that since there is only the one $za_content element there is no need (at present ) for the options array So replacing the 5 assignments from the music_extras w/ the above 1 line will work. As below:
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
$za_contents[] = array('text' => BOX_TOOLS_IMAGE_HANDLER, 'link' => zen_href_link(FILENAME_IMAGE_HANDLER, '', 'NONSSL'));
But looking at the step 5 example I'm guessing that the important part is the
if (page_allowed($value['page'])=='true')
test within the foreach loop. Yes? Is this the new part to make AP work? Seems like it would be, but I didn't see such a test nor instructions to add it in the step-by-step.
I'm hoping not only to be corrected if I've missed something, but that by bringing it up here it might help clarify the process for others.
For reference, version ID's:
* @version $Id: product_music_extras_dhtml.php 3001 2006-02-09 21:45:06Z wilt $
* @version $Id: image_handler_tools_dhtml.php,v 1.1 2006/04/11 22:00:55 tim Exp $
For reference, example code from step 5 in step-by-step as I found it:
Code:
<?php
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
$options = array( array('box' => BOX_TOOLS_IMAGE_HANDLER, 'page' => FILENAME_IMAGE_HANDLER)
);
foreach ($options as $key => $value)
if (page_allowed($value['page'])=='true')
$za_contents[] = array('text' => $value['box'], 'link' => zen_href_link($value['page'], '', 'NONSSL'));
?>
BTW, Kuroi, this looks to be a superb contribution. Kudos to you.
Bookmarks