Thread: Zen Colorbox

Page 2 of 34 FirstFirst 123412 ... LastLast
Results 11 to 20 of 337
  1. #11
    Join Date
    Mar 2011
    Location
    Pensacola, FL
    Posts
    88
    Plugin Contributions
    4

    Default Re: Zen Colorbox

    I'm very happy with the results as well and thank you very much, niestudio.
    Am also using to display a random slideshow of all products on a e-zpage and would like to share method.

    Added following code to /includes/templates/MY_TEMPLATE/templates/tpl_page_default.php

    IMMEDIATELY FOLLOWING:
    <h1 id="ezPagesHeading"><?php echo $var_pageDetails->fields['pages_title']; ?></h1>

    Code:
    <?php
    /*Sequence for listing image paths for slideshow */
    // do we want slideshow on this page?
    if (isset($ezpage_id) and $ezpage_id == 'MY_EZ_PAGE_ID_#'){
    		//Hidden div to feed invisible images to jscript
    		echo "<div style=\"display:none\">";
    			 // query database table for image paths
    		$this_sql_for_images = mysql_query("SELECT products_image FROM zen_products ORDER BY RAND()"); 
    			// loop through image paths and create array    
    		while ($row = mysql_fetch_array($this_sql_for_images, MYSQL_NUM)) {
    			//assign string to variable
    			$the_url = $row[0]; 
    			if (file_exists("images/".$the_url)) {
    				// RegEx pattern to separate image path from extension
    				$pattern = '|(^.*)\.(.*)|';
    				//insert "_LRG" in image name so we are displaying large images
    				$replacement = '$1'."_LRG.".'$2';
    				//assemble path for large image
    				$LRG_URL =  preg_replace($pattern, $replacement, $the_url);
    				$full_path = "images/large/".$LRG_URL;
    					if (file_exists($full_path)) {
    					//echo "The large file $full_path exists<hr/>";
    						//list images with "style = display:none" so they are not visible on page
    				   echo "<a href= \"".$full_path."\""." rel=\"renmanimage\"><img src=\"".$full_path."\" style=\"display:none;padding:0;margin:0;height:1px\"></a><br/>";
    					}
    				} else {
    					//echo "The small file,  $the_url exists<hr/>";	
    					//list images with "style = display:none" so they are not visible on page
    				   echo "<a href= \"images/".$the_url."\""." rel=\"renmanimage\"><img src=\"images/".$the_url."\" style=\"display:none;padding:0;margin:0;height:1px\"></a><br/>";
    					} // End LRG file condition
    		} // End DB file exists Condition
    		//End hidden div tag
    	echo "</div>";
    	//display image to click to begin slideshow
    	echo "<a href= \"images/clickhere.jpg\" rel=\"renmanimage\"><img src=\"images/clickhere.jpg\"></a><br/>";
    } // End EZ Page ID Condition
    ?>
    Haven't tackled body_onload yet, but tentatively planning on it.
    Would also like to have main/trigger image excluded from slideshow, WHILE keeping main images from product pages in slideshow.
    If body_onload works this may be less of an issue.

  2. #12
    Join Date
    Mar 2011
    Location
    Pensacola, FL
    Posts
    88
    Plugin Contributions
    4

    Default Re: Zen Colorbox

    I'm very happy with the results as well and thank you very much, niestudio.
    Am also using to display a random slideshow of all products on a e-zpage and would like to share method.

    Added following code to /includes/templates/MY_TEMPLATE/templates/tpl_page_default.php

    IMMEDIATELY FOLLOWING:
    <h1 id="ezPagesHeading"><?php echo $var_pageDetails->fields['pages_title']; ?></h1>

    Code:
    <?php
    /*Sequence for listing image paths for slideshow */
    // do we want slideshow on this page?
    if (isset($ezpage_id) and $ezpage_id == 'MY_EZ_PAGE_ID_#'){
    		//Hidden div to feed invisible images to jscript
    		echo "<div style=\"display:none\">";
    			 // query database table for image paths
    		$this_sql_for_images = mysql_query("SELECT products_image FROM zen_products ORDER BY RAND()"); 
    			// loop through image paths and create array    
    		while ($row = mysql_fetch_array($this_sql_for_images, MYSQL_NUM)) {
    			//assign string to variable
    			$the_url = $row[0]; 
    			if (file_exists("images/".$the_url)) {
    				// RegEx pattern to separate image path from extension
    				$pattern = '|(^.*)\.(.*)|';
    				//insert "_LRG" in image name so we are displaying large images
    				$replacement = '$1'."_LRG.".'$2';
    				//assemble path for large image
    				$LRG_URL =  preg_replace($pattern, $replacement, $the_url);
    				$full_path = "images/large/".$LRG_URL;
    					if (file_exists($full_path)) {
    					//echo "The large file $full_path exists<hr/>";
    						//list images with "style = display:none" so they are not visible on page
    				   echo "<a href= \"".$full_path."\""." rel=\"renmanimage\"><img src=\"".$full_path."\" style=\"display:none;padding:0;margin:0;height:1px\"></a><br/>";
    					}
    				} else {
    					//echo "The small file,  $the_url exists<hr/>";	
    					//list images with "style = display:none" so they are not visible on page
    				   echo "<a href= \"images/".$the_url."\""." rel=\"renmanimage\"><img src=\"images/".$the_url."\" style=\"display:none;padding:0;margin:0;height:1px\"></a><br/>";
    					} // End LRG file condition
    		} // End DB file exists Condition
    		//End hidden div tag
    	echo "</div>";
    	//display image - which will need to be uploaded - to click to begin slideshow
    	echo "<a href= \"images/clickhere.jpg\" rel=\"renmanimage\"><img src=\"images/clickhere.jpg\"></a><br/>";
    } // End EZ Page ID Condition
    ?>
    Haven't tackled body_onload yet, but tentatively planning on it.
    Would also like to have main/trigger image excluded from slideshow, WHILE keeping main images from product pages in slideshow.
    If body_onload works this may be less of an issue.

    Am always open to suggestions on improving code. Am thinking of ultimately adding features for use on Category listing pages.
    Last edited by mutinyzoo; 31 May 2012 at 12:43 AM.

  3. #13
    Join Date
    Mar 2011
    Location
    Pensacola, FL
    Posts
    88
    Plugin Contributions
    4

    Default Re: Zen Colorbox

    Previous post made to work with Image Manager LRG images where they exist. If image manager is not in use, this should do the trick:

    Code:
    <?php
    /*Sequence for listing image paths for slideshow */
    // do we want slideshow on this page?
    if (isset($ezpage_id) and $ezpage_id == 'MY_EZ_PAGE_ID_#'){
    		//Hidden div to feed invisible images to jscript
    		echo "<div style=\"display:none\">";
    			 // query database table for image paths
    		$this_sql_for_images = mysql_query("SELECT products_image FROM zen_products ORDER BY RAND()"); 
    			// loop through image paths and create array    
    		while ($row = mysql_fetch_array($this_sql_for_images, MYSQL_NUM)) {
    			//assign string to variable
    			$the_url = $row[0]; 
    			if (file_exists("images/".$the_url)) {
    					//list images with "style = display:none" so they are not visible on page
    		} // End DB file exists Condition
    		//End hidden div tag
    	echo "</div>";
    	//display image - which will need to be uploaded - to click to begin slideshow
    	echo "<a href= \"images/clickhere.jpg\" rel=\"renmanimage\"><img src=\"images/clickhere.jpg\"></a><br/>";
    } // End EZ Page ID Condition
    ?>
    Last edited by mutinyzoo; 31 May 2012 at 12:43 AM.

  4. #14
    Join Date
    Jan 2006
    Posts
    1,542
    Plugin Contributions
    0

    Default Re: Zen Colorbox

    http://www.zen-cart.com/downloads.php?do=file&id=1322

    Is this the same mod as at link above?
    Steve
    prommart.com

  5. #15
    Join Date
    Nov 2009
    Posts
    285
    Plugin Contributions
    5

    Default Re: Zen Colorbox

    No, we're still in private beta right now.
    that one is a similar box, but doesn't have the same configurations.

  6. #16
    Join Date
    Jan 2006
    Posts
    1,542
    Plugin Contributions
    0

    Default Re: Zen Colorbox

    I guess this is it:

    http://www.webdivision.prommart.com/...roducts_id=195

    Looks to be working.

    Is the ://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js in html_header necessary? It gives a validation error and seems to work without it.

    And I see that it watermarks first large image but not additional images? Not a deal breaker.

    Nice look and more interesting than the old stand-by Lightbox. (which I couldn't get sql patch to install 1.5 even directly in phpmyadmin)
    Steve
    prommart.com

  7. #17
    Join Date
    Jan 2006
    Posts
    1,542
    Plugin Contributions
    0

    Default Re: Zen Colorbox

    Quote Originally Posted by niestudio View Post
    No, we're still in private beta right now.
    that one is a similar box, but doesn't have the same configurations.
    Oh, okay. Looks like I just got the old one going on my demo site in post above. Will also keep eye out for yours. Will it watermark all large images?
    Steve
    prommart.com

  8. #18
    Join Date
    Nov 2009
    Posts
    285
    Plugin Contributions
    5

    Default Re: Zen Colorbox

    No, no plans for watermarking

  9. #19
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,023
    Plugin Contributions
    32

    Default Re: Zen Colorbox

    Quote Originally Posted by niestudio View Post
    No, no plans for watermarking
    Fantastic, this will ensure that it will not bump heads with add-ons like Image Handler which does watermark images.. BTW, this works BEAUTIFULLY with IH4!!
    Last edited by DivaVocals; 4 Jun 2012 at 08:39 PM.
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  10. #20
    Join Date
    Nov 2009
    Posts
    285
    Plugin Contributions
    5

    Default Re: Zen Colorbox

    Quote Originally Posted by DivaVocals View Post
    No there is no such setting in Tabbed Products Pro.. If I turn off the TPP setting to put the product reviews into a tab, then the extra image goes away..

    I'm wondering if the fix I made here: http://www.zen-cart.com/showthread.p...411#post620411 to hide the extra reviews button somehow has affected things.. I would hate to not be able to keep reviews inside a tab just to use this add-on..
    finally got around to a workaround for this issue.
    Not sure if it should be part of the ZCB or ZLB install by default, but maybe in the FAQ of this and of the tabbed plugin.
    try adding this line to [includes/classes/zen_colorbox/autoload_default.php]
    I added it as the first line inside of the document ready function
    Code:
    $('#productMainImageReview, #productAdditionalImages_tab').find("a").removeAttr("rel");
    this should re-write the image links inside the tabbed sections to remove the rel="colorbox" attribute so that the images do not get linked/loaded into colorbox or lightbox (same code will work for either)

    d

 

 
Page 2 of 34 FirstFirst 123412 ... LastLast

Similar Threads

  1. v155 Attribute image swapped for main image using Colorbox
    By soxophoneplayer in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 2 Jun 2016, 02:34 PM
  2. Trying to fix inline code with colorbox...
    By toomanyknots in forum General Questions
    Replies: 2
    Last Post: 5 Apr 2015, 04:26 PM
  3. IH and Zen Colorbox vs Zen Lightbox?
    By Feznizzle in forum All Other Contributions/Addons
    Replies: 7
    Last Post: 28 Jan 2015, 02:29 AM
  4. Lightbox OR Colorbox
    By Rizla in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 2 May 2014, 11:55 AM
  5. LightBox, SlimBox, ColorBox, which one is better?
    By waterbender in forum General Questions
    Replies: 0
    Last Post: 13 Aug 2013, 07:32 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR