This is a discussion on Help me please. within the PHP Language forums, part of the PHP Programming Forums category; Ok I am running a software called zen-cart. please don't tell me to go to there support forum ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Ok I am running a software called zen-cart. please don't tell me to go
to there support forum with out looking at the code first as you are all php experts, and some of there user community may not be. the dilemma is that i have two files that need to go into the same directory one is for a lightbox script the other is for an image swapper script, they also have to be the same file so I need to combine the code from both files into one block of code that can do both my problem is I have participially no knowledge of php. here is the first block this is for the lightbox: <?php require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_MAIN_PRODUCT_IMA GE)); ?> <div id="productMainImage" class="centeredContent back"> <script language="javascript" type="text/javascript"><!-- document.write(' <?php echo $ahref_start . zen_image($products_image_medium, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT, 'name="imageSwap"') . $enlarge_text . $ahref_end; ?>'); //--></script> <!-- bof Zen Lightbox v1.4 aclarke 2007-09-15 --> if ($current_page_base == 'product_reviews') { $zen_lightbox_products_name = $products_name_reviews_page; } else { $zen_lightbox_products_name = $products_name; } if (ZEN_LIGHTBOX_STATUS == 'true') { echo '<script language="javascript" type="text/javascript"><!-- document.write(\'<a href="' . zen_lightbox($products_image_large, addslashes($products_name), LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT) . '" rel="lightbox[gallery]" title="' . addslashes($zen_lightbox_products_name) . '">' . zen_image($products_image_medium, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . '<br /><span class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span></a>\')//--></ script>'; } else { echo '<script language="javascript" type="text/javascript"><!-- document.write(\'<a href="javascript:popupWindow(\\\'' . zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $_GET['products_id']) . '\ \\')">' . zen_image($products_image_medium, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . '<br /><span class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span></a> \')//--></script>'; } ?> <!-- eof Zen Lightbox v1.4 aclarke 2007-09-15 --> <noscript> <?php echo '<a href="' . zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $_GET['products_id']) . '" target="_blank">' . zen_image($products_image_medium, $products_name, MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . '<br /><span class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span></a>'; ?> </noscript> </div> here is the code for the image swapper: <?php require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_MAIN_PRODUCT_IMA GE)); ?> <div id="productMainImage" class="centeredContent back"> <script language="javascript" type="text/javascript"><!-- document.write('<?php echo $ahref_start . zen_image($products_image_medium, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT, 'name="imageSwap"') . $enlarge_text . $ahref_end; ?>'); //--></script> <noscript> <?php echo '<a href="' . zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $_GET['products_id']) . '" target="_blank">' . zen_image($products_image_medium, $products_name, MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . '<br /><span class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span></a>'; ?> </noscript> </div> - Philip |
|
|||
|
On Feb 24, 5:58 pm, philiple...@gmail.com wrote:
> Ok I am running a software called zen-cart. please don't tell me to go > to there support forum with out looking at the code first as you are > all php experts, and some of there user community may not be. the > dilemma is that i have two files that need to go into the same > directory one is for a lightbox script the other is for an image > swapper script, they also have to be the same file so I need to > combine the code from both files into one block of code that can do > both my problem is I have participially no knowledge of php. > > here is the first block this is for the lightbox: > > <?php require(DIR_WS_MODULES . > zen_get_module_directory(FILENAME_MAIN_PRODUCT_IMA GE)); ?> > <div id="productMainImage" class="centeredContent back"> > <script language="javascript" type="text/javascript"><!-- > document.write(' > > <?php echo $ahref_start . zen_image($products_image_medium, > addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT, > 'name="imageSwap"') . $enlarge_text . $ahref_end; ?>'); > //--></script> > <!-- bof Zen Lightbox v1.4 aclarke 2007-09-15 --> > > if ($current_page_base == 'product_reviews') { > > $zen_lightbox_products_name = $products_name_reviews_page; > > } else { > > $zen_lightbox_products_name = $products_name; > > } > > if (ZEN_LIGHTBOX_STATUS == 'true') { > > echo '<script language="javascript" type="text/javascript"><!-- > document.write(\'<a href="' . zen_lightbox($products_image_large, > addslashes($products_name), LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT) . > '" rel="lightbox[gallery]" title="' . > addslashes($zen_lightbox_products_name) . '">' . > zen_image($products_image_medium, addslashes($products_name), > MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . '<br /><span > class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span></a>\')//--></ > script>'; > > } else { > > echo '<script language="javascript" type="text/javascript"><!-- > document.write(\'<a href="javascript:popupWindow(\\\'' . > zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $_GET['products_id']) . '\ > \\')">' . zen_image($products_image_medium, > addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . > '<br /><span class="imgLink">' . TEXT_CLICK_TO_ENLARGE . '</span></a> > \')//--></script>'; > > } > > ?> > <!-- eof Zen Lightbox v1.4 aclarke 2007-09-15 --> > <noscript> > <?php > echo '<a href="' . zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . > $_GET['products_id']) . '" target="_blank">' . > zen_image($products_image_medium, $products_name, MEDIUM_IMAGE_WIDTH, > MEDIUM_IMAGE_HEIGHT) . '<br /><span class="imgLink">' . > TEXT_CLICK_TO_ENLARGE . '</span></a>'; > ?> > </noscript> > </div> > > here is the code for the image swapper: > > <?php require(DIR_WS_MODULES . > zen_get_module_directory(FILENAME_MAIN_PRODUCT_IMA GE)); ?> > <div id="productMainImage" class="centeredContent back"> > <script language="javascript" type="text/javascript"><!-- > document.write('<?php echo $ahref_start . > zen_image($products_image_medium, addslashes($products_name), > MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT, 'name="imageSwap"') . > $enlarge_text . $ahref_end; ?>'); > //--></script> > <noscript> > <?php > echo '<a href="' . zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . > $_GET['products_id']) . '" target="_blank">' . > zen_image($products_image_medium, $products_name, MEDIUM_IMAGE_WIDTH, > MEDIUM_IMAGE_HEIGHT) . '<br /><span class="imgLink">' . > TEXT_CLICK_TO_ENLARGE . '</span></a>'; > ?> > </noscript> > </div> > > - Philip practically* thats what i get for using firefox's spell checker |
|
|||
|
philiplemon@gmail.com wrote:
> Ok I am running a software called zen-cart. please don't tell me to go > to there support forum with out looking at the code first as you are > all php experts, and some of there user community may not be. the > dilemma is that i have two files that need to go into the same > directory one is for a lightbox script the other is for an image > swapper script, they also have to be the same file so I need to > combine the code from both files into one block of code that can do > both my problem is I have participially no knowledge of php. > <snip lots of code> > - Philip > Sorry, you need to go to their support site. We are PHP programmers, but I don't think any of us know anything about the internals of Zen cart. Those on their forums do know that information. Of course, if you're willing to pay someone for the time it takes to learn the internals, then someone here would be glad to help you. But I don't think anyone here is going to spend hours researching your question. Go to the Zen cart help forums. That's what they're there for. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |