Page 3 of 7 FirstFirst 12345 ... LastLast
Results 21 to 30 of 68
  1. #21
    Join Date
    Mar 2009
    Posts
    221
    Plugin Contributions
    1

    Default Re: Additional Image Titles support

    I am testing out this mod and have run into a snag and I think it's with my confusion over how to specify the folder and file path.

    My additional image exists here:
    /images/silks/silk-custom_01.jpg

    Can you tell me how this file should be referenced in the additional_image_titles_defines.php ? I am a bit confused over the use of underscores in the included examples in relation to the folder and filename. I've tried:

    ADDIMG_SILKS_SILK-CUSTOM_01_jpg
    ADDIMG_SILKS_SILK_CUSTOM_01_jpg
    ADDIMG_SILKS_SILK-CUSTOM_01.jpg

    Whatever I am doing wrong, it is disabling my entire site. After uploading the two files and I do a refresh on my site, it won't load and goes completely blank. When viewing page source, it's completely blank. Every page on the site exhibits this behavior until I delete the additional_image_titles_defines.php file.


    ---UPDATE---
    I just tested again, but didn't edit the additional_images_titles_defines.php file. I just uploaded the includes folder (and renamed modules\your_template to my custom template) with the included examples and it still disables my entire site.
    Last edited by Crunch; 16 Nov 2009 at 06:12 PM.

  2. #22
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Additional Image Titles support

    As the readme says, replace all / . and - characters with _ in the defines. I did not mention explicitly, though the example shows, that you need to use all upper case letters.

    ADDIMG_SILKS_SILK_CUSTOM_01_jpg
    will not work; it needs to be
    ADDIMG_SILKS_SILK_CUSTOM_01_JPG

    Do you know what version of PHP your host uses? There is no good reason that the unedited files should crash your site, except that the mod uses the PHP function ereg_replace(), which I understand is deprecated in PHP 5.3 and will cause a problem with any script that uses it.

    If that is the case, you may be able to change ereg_replace to preg_replace in the code; I have not yet checked on the syntax to see whether there is any difference in usage between the two functions. I will get back on this, and if necessary, release a new version of the mod to account for the PHP situation.

  3. #23
    Join Date
    Mar 2009
    Posts
    221
    Plugin Contributions
    1

    Default Re: Additional Image Titles support

    Zen Cart 1.3.8a (all security patches)
    PHP 5.2.11
    MySQL 5.0.81

    I just tried again with the corrected define (ADDIMG_SILKS_SILK_CUSTOM_01_JPG) and the site still goes completely blank on refresh.

    I also changed ereg_replace to preg_replace in additional_images.php.
    Last edited by Crunch; 17 Nov 2009 at 10:08 PM.

  4. #24
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Additional Image Titles support

    So it's not the PHP version... have you downloaded a new copy of the mod? Perhaps a file got corrupted when unzipping or something.

  5. #25
    Join Date
    Mar 2009
    Posts
    221
    Plugin Contributions
    1

    Default Re: Additional Image Titles support

    I just deleted my local copy of the mod and re-downloaded it.

    Same issue. I guess there must be something quirky then with my host provider setup.

  6. #26
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Additional Image Titles support

    Sorry you still have a problem, but I can't think of anything else that could be responsible...

    Re: the PHP 5.3 deprecated function issue, you can just change ereg_replace to preg_replace and it will work fine - in fact, faster than before by an amount only detectable in mass repetitions. Preg_replace is much more powerful and flexible as well, but can still be used in the same basic fashion.

  7. #27
    Join Date
    Mar 2009
    Posts
    221
    Plugin Contributions
    1

    Default Re: Additional Image Titles support

    I found the issue and fixed it.

    I installed the debug error logging utility and got these results:

    Code:
    PHP Parse error:  syntax error, unexpected '}' in /includes/languages/english/extra_definitions/additional_image_titles_defines.php on line 6

    I looked on line 6 and it's:

    Code:
    define ('ADDIMG_TEXT_TOP','true'};//change to false to put text below images
    In additional_image_titles_defines.php, I changed the } to a )

    The } was in the original file. So, anyone else that happens to run into the same problem as I did, change:

    Code:
    ('ADDIMG_TEXT_TOP','true'}
    to

    Code:
    ('ADDIMG_TEXT_TOP','true')
    Last edited by Crunch; 18 Nov 2009 at 06:28 AM.

  8. #28
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Additional Image Titles support

    This typo/bug is addressed in posts 12 & 13 above; I apparently never uploaded the fixed (v1.1) zip to Free Addons back in July. I am uploading it now (v1.2) along with a couple of other improvements.

  9. #29
    Join Date
    Mar 2009
    Posts
    221
    Plugin Contributions
    1

    Default Re: Additional Image Titles support

    Glenn, this is an excellent mod. Very cool. Thank you for putting this together.

  10. #30
    Join Date
    Mar 2009
    Posts
    221
    Plugin Contributions
    1

    Default Re: Additional Image Titles support

    I am back! ;) I downloaded your latest v1.2

    Question, this should work for pre-PHP 5.3 right?

    I don't receive any errors and my site appears to function normally (no blank pages), but there are no image titles on the images I defined using v1.2. If I copy over version 1.0 (with the bracket fix) back the image titles work.

 

 
Page 3 of 7 FirstFirst 12345 ... LastLast

Similar Threads

  1. Image Titles Support Thread
    By gjh42 in forum All Other Contributions/Addons
    Replies: 155
    Last Post: 9 Sep 2014, 04:51 AM
  2. Additional Image Titles vs Swap_images_mouseover
    By moesoap in forum General Questions
    Replies: 1
    Last Post: 11 May 2012, 04:06 PM
  3. Additional Image Titles mod not working
    By azwli in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 15 Nov 2010, 04:20 AM
  4. Problem integrating additional image titles addon and commercial addon
    By strugglingnovice in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 15 Aug 2010, 03:07 PM
  5. Changing Titles on Sidebox additional pages
    By SaMortensen in forum Addon Sideboxes
    Replies: 4
    Last Post: 7 Feb 2009, 01:34 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