Jump to content
Dnj1964

html content in popup (Large Image)

Recommended Posts

<strong><em>Product Name</em><br/><u>blah blah blah blah blah blah blah blah</u></strong>

Adding this into the large image html popup - nothing shows up.

Adding just text breaks the colorbox and only shows the text and no image.

 

Share this post


Link to post
Share on other sites

That is the way colorbox works.  You either have an image or html.  You could use <img> to show the image, though I've not tried that.  I did change the php code to utilise the html, and show in a title.

Mike


osC CE live - developing osC Phoenix adding modules with no core changes(awesome and easy!)

Share this post


Link to post
Share on other sites

 

Thank you the replies, was looking at the code and going to change suit.

 

Thanks again

 

Share this post


Link to post
Share on other sites
On 3/8/2019 at 6:34 AM, Mikepo said:

That is the way colorbox works.  You either have an image or html.  You could use <img> to show the image, though I've not tried that.  I did change the php code to utilise the html, and show in a title.

Mike

That doesn't make any sense to me. Why would you add HTML only? It seems the HTML is so you can create a caption for the image. Also, if you add one with just HTML and no image it removes that image item when you save the product. If you add an image and HTML, as the first poster said, only the HTML appears. The thumbnail appears correctly on the product page, but the color box only has the HTML, which looks horrendous by the way.

image_with_html.png

Share this post


Link to post
Share on other sites
         $pi_output .= '<div class="piGal" data-imgcount="' . $photoset_layout . '">';
          while ($pi = tep_db_fetch_array($pi_query)) {
            $pi_counter++;

//            if (tep_not_null($pi['htmlcontent'])) {
//              $pi_html[] = '<div id="piGalDiv_' . $pi_counter . '">' . $pi['htmlcontent'] . '</div>';
//            }

//            if (tep_not_null($pi['htmlcontent'])) {
//              $pi_html[] = '<div id="piGalDiv_' . $pi_counter . '">' . $pi['htmlcontent'] . '</div>';
//				  $pi_html[] = '<div id="piGalDivpi_counter' . $pi['htmlcontent'] . '</div>';//
//				  $pi_html[] = '<div id="piGalDivpi_counter' . $pi['htmlcontent'] . '</div>';//
//            }
$irgendwas = $pi['htmlcontent'] . ',' . htmlspecialchars($product_info['products_name']);//

            $pi_output .= tep_image('images/' . $pi['image'],  $irgendwas , '', '', 'id="piGalImg_' . $pi_counter . '"');


//            $pi_output .= tep_image('images/' . $pi['image'], . $pi['htmlcontent']. ' '', '','id="piGalImg_' . $pi_counter . '"');
          }          
          $pi_output .= '</div>';
          
          if ( !empty($pi_html) ) {
            $pi_output .= '<div hidden>' . implode('', $pi_html) . '</div>';
            $pi_output .= '<div>' . implode('', $pi_html) . '</div>';
          }          
        }
        else {
          $pi_output .= '<div class="piGal">';
          $pi_output .= tep_image('images/' . $product_info['products_image'], htmlspecialchars($product_info['products_name']));
          $pi_output .= '</div>';          
        }

changes in cm_pi_gallery.php

only to use htmlcontent for alt and title and avoid image collapse

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×