Jump to content

Archived

This topic is now archived and is closed to further replies.

zpupster

,text on images

Recommended Posts

hello,

 

i use to add text to images in html box in admin section.

 

then you could not do that anymore. 

 

so i found this script :

<script type="text/javascript">
$(function() {
  $('#piGal').css({
    'visibility': 'hidden'
  });

  $('#piGal').photosetGrid({
    layout: '<?php echo $photoset_layout; ?>',
    width: '200px',
    highresLinks: true,
    rel: 'pigallery',
    onComplete: function() {
      $('#piGal').css({ 'visibility': 'visible'});

      $('#piGal a').colorbox({
        maxHeight: '90%',
        maxWidth: '90%',
		title: '<?php echo $product_info['products_name']; ?>',
        rel: 'pigallery'
      });

      $('#piGal img').each(function() {
        var imgid = $(this).attr('id').substring(9);

        if ( $('#piGalDiv_' + imgid).length ) {
          $(this).parent().colorbox({ inline: true, href: "#piGalDiv_" + imgid });
        }
      });
    }
  });
});
</script>

and that added the product name to image in colorbox, when added to product_info page

 

 

that script does not work in oscommerce 234 responsive(bootstrap).

 

How are people adding text to their images for bootstrap??

 

thanks..

Share this post


Link to post
Share on other sites

If you're talking about image captions, I have just developed an addon for this for a current project, but it relies on the work that's been done so far for Modular Product Info, which is currently in development.

 

My addon has some changes in admin/categories to input the text (in each language of the store), outputs these as a title attribute on the images, and has an amended version of the photogrid script which feeds them through to colorbox.

 

If you're comfortable with using github, you can get both the modular product info work and my addon from branches in my fork of the responsive osc repository: https://github.com/BrockleyJohn/Responsive-osCommerce

 

The whole thing is driven from the content module, so it wouldn't be easy to backport a version to bootstrap gold, but I suppose it would be possible: lift the admin side, take the content edits from the module and build the script changes into a header tags module instead.

 

This is the sort of thing it does:

 

post-220375-0-16155800-1432148146_thumb.jpg


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

Text as in alt tag (the text that appears when you hover over the image)?

 

That should only happen in Internet Explorer (and similar) browsers. The "alt" text should not be displayed when you hover over the image, but IE will do that (wrongly!) if there is no "title" text. All browsers display "title" text when hovered over. "alt" is only supposed to be displayed if the image is not displayed for some reason.

Share this post


Link to post
Share on other sites

I'm using the bs-version but I also experience the same problem: 

 

If the condition in product_info.php:

 

          if (tep_not_null($pi['htmlcontent'])) {
            $pi_html[] = '<div id="piGalDiv_' . $pi_counter . '">' . $pi['htmlcontent'] . '</div>';
          }
 
is fulfilled (that means, that $pi['htmlcontent'] is not empty and that there is a description), the image is not shown.
 
In short words: If there is a description of a image, it is not shown, otherwise it is.  
 
Is there a solution besides commenting the snippet?
 
best 
 
cupidare

Share this post


Link to post
Share on other sites

@@cupidare that is the correct behaviour and is used for embedding (eg) Youtube video.

See the Samsung Galaxy product on a standard install for an example of such.


Help shape the future of Phoenix; join the Phoenix Club

Share this post


Link to post
Share on other sites

×