Page 2 of 7 FirstFirst 1234 ... LastLast
Results 11 to 20 of 68
  1. #11
    Join Date
    Jun 2009
    Posts
    1
    Plugin Contributions
    0

    help question Re: Additional Image Titles support

    Quote Originally Posted by gjh42 View Post
    PHP constants are typically written in uppercase, so the code looks for an uppercase version of the filename, as well as converting characters like / into _ so they don't break the constant name. So

    define ('ADDIMG_avondale_01_jpg','Avondale Cedar');

    would be

    define ('ADDIMG_AVONDALE_01_JPG','Avondale Cedar');

    except that the IH2 filename may be making this irrelevant.


    Smart Backgrounds lets you specify the styling for the element in a particular page/category, so you should be able to set the height that way. It may take some reconfiguring of your header output, or it might be straightforward - can't tell without looking into it.
    Hello Everyone,
    I am new to zen and I am fighting hard to make it work.
    I have additional images and added additional image title and got white page.
    I am not quite sure what to do with or what i should put in the last part of the instructions. I tried adding 1 2 3 4 and not just side but font and back using the text that i see in the php file. I dont have images installed on my site as yet just the ones that come with zen. I want to know if i would have to list all of my images in the file at all times. or can the code put them in the place where they should go based on the example text that is given with the file. If i have to add the image title that is a work for i have thousands of images to add. I really need this to work for it will make things much better for me due to my site carries items that has many images.

    I appreciate all the help I can get.

    also i would love to know if i can change the month from my featured and new product title on the front page and i would love to add a banner in my header and dont know how to or where to go to add it. i would love to be able to add my template in to an editor like coffeecup so i can drag and drop the boxes where i want them is there anything out there like that. or i am will to do the work if i just know how to add the template into an editor and change up the layout so it fits how i want it

    I thank you all for all the help you can give to me.
    hope to hear something soon.

    empress

  2. #12
    Join Date
    Dec 2006
    Location
    Northwest Connecticut
    Posts
    91
    Plugin Contributions
    0

    Default Re: Additional Image Titles support

    This is an update to my other posts in this string. I'm the one, hopefully not the only one, who needs to have the additional image titles from Glenn's mod appear with the larger images in Lightbox/Slimbox.

    I've made some progress, since I am using both the Additional Image Title add-on and the Slimbox add-on, both add-ons have modifications to additional_images.php. At first I could only have one or the other, I've now successfully meshed the modifications so that the additional image titles are appearing and also clicking on larger image brings up the Lightbox so that is working. Here is an example of it, still needs finishing touches but am happy it is working this much: http://peterfasano.com/zen/index.php...&products_id=2

    I still need to have the additional image titles appear with the larger image in the Lightbox instead of where you see the product name in the lower left hand corner. Here is the bottom part of additional_images.php where I have meshed the two modifications together:

    // Link Preparation:
    // bof Zen Lightbox v1.4 aclarke 2007-09-22
    if (ZEN_LIGHTBOX_STATUS == 'true' || FUAL_SLIMBOX == 'true') {

    $script_link = '<script language="javascript" type="text/javascript"><!--' . "\n" . 'document.write(\'' . ($flag_display_large ? '<a href="' . zen_lightbox($products_image_large, addslashes($products_name), LARGE_IMAGE_WIDTH, LARGE_IMAGE_HEIGHT) . '" rel="lightbox[gallery]" title="' . addslashes($products_name) . '">' . $thumb_slashes . '<br />' . TEXT_CLICK_TO_ENLARGE . '</a>' : $thumb_slashes) . '\');' . "\n" . '//--></script>';

    } else {

    $script_link = '<script language="javascript" type="text/javascript"><!--' . "\n" . 'document.write(\'' . ($flag_display_large ? '<a href="javascriptopupWindow(\\\'' . $large_link . '\\\')">' . $thumb_slashes . '<br />' . TEXT_CLICK_TO_ENLARGE . '</a>' : $thumb_slashes) . '\');' . "\n" . '//--></script>';

    }
    // eof Zen Lightbox v1.4 aclarke 2007-09-22

    $noscript_link = '<noscript>' . ($flag_display_large ? '<a href="' . zen_href_link(FILENAME_POPUP_IMAGE_ADDITIONAL, 'pID=' . $_GET['products_id'] . '&pic=' . $i . '&products_image_large_additional=' . $products_image_large) . '" target="_blank">' . $thumb_regular . '<br /><span class="imgLinkAdditional">' . TEXT_CLICK_TO_ENLARGE . '</span></a>' : $thumb_regular ) . '</noscript>';

    // $alternate_link = '<a href="' . $products_image_large . '" onclick="javascriptopupWindow(\''. $large_link . '\') return false;" title="' . $products_name . '" target="_blank">' . $thumb_regular . '<br />' . TEXT_CLICK_TO_ENLARGE . '</a>';

    $link = $script_link . "\n " . $noscript_link;
    // $link = $alternate_link;
    // additional image titles
    $add_img_constant = 'ADDIMG_' . strtoupper(ereg_replace('[/\\.-]','_',substr_replace($base_image,'',0,7)));// if any other characters could be used in filepath, add them to list [ ]
    if (defined($add_img_constant)) {//add text above or below images
    $link = (ADDIMG_TEXT_TOP)? '<h4 class="addImgTitle">' . constant($add_img_constant) . '</h4>' . $link: $link . '<h4 class="addImgTitle">' . constant($add_img_constant) . '</h4>';
    }
    // /additional image titles
    // List Box array generation:
    $list_box_contents[$row][$col] = array('params' => 'class="additionalImages centeredContent back"' . ' ' . 'style="width:' . $col_width . '%;"',
    'text' => "\n " . $link);
    $col ++;
    if ($col > (IMAGES_AUTO_ADDED -1)) {
    $col = 0;
    $row ++;
    }
    } // end for loop
    } // endif

    ?>

    Does anyone with more php coding experience than I have, have any suggestions? I've tried replacing the constant ($products_name) with the constant ($add_img_constant) but that does not work. (I also have a post in the Commercial Help Needed section but since I haven't gotten a reply resulting in help, I've been working or trying to work on it myself.

    Also in the additional_image_titles_define.php code I downloaded I got an error just after installing that I corrected in my own copy. The error was ..... unexpected } encountered on line #6 --- which is this line --- define ('ADDIMG_TEXT_TOP','true'};//change to false to put text below images

    I change the } to a ) to correct the error.

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

    Default Re: Additional Image Titles support

    Not sure how that one } got through - I must have fixed it in the live test copy and neglected to transfer it to the archive copy. I will correct the download as soon as I get time.

    The $add_img_constant is not defined before $products_name appears in the code as posted, so it will not show in the popup if swapped. You need to move the additional image titles code to above the script call, while keeping it inside the same loop as it is currently. You would be right to use
    constant($add_img_constant)
    in place of
    $products_name
    in that location, once the setup is in place.

  4. #14
    Join Date
    Dec 2006
    Location
    Northwest Connecticut
    Posts
    91
    Plugin Contributions
    0

    Default Re: Additional Image Titles support

    I've got the additional image titles from Glenn's mod appearring with the larger images in Lightbox/Slimbox! That is working great! I have a request to have the Additional Image Title appear below the image, not above it.... I thought "no problem", there is a switch i.e. this line --

    define ('ADDIMG_TEXT_TOP','false');//change to false to put text below images

    in additional_image_titles_defines.php.... but true is only working, changing to false does not put the text below the images.

    Has anyone else encountered this problem? I am wondering if it is because "larger image'" appears below the image?

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

    Default Re: Additional Image Titles support

    Apparently because ADDIMG_TEXT_TOP is defined as a string, the ternary operator needs to explicitly test for the literal string 'true' instead of the implied true condition.
    In /includes/modules/your_template/additional_images.php, line 106, replace
    $link = (ADDIMG_TEXT_TOP)?
    with
    $link = (ADDIMG_TEXT_TOP == 'true')?
    PHP Code:
        // additional image titles
        
    $add_img_constant 'ADDIMG_' strtoupper(ereg_replace('[/\\.-]','_',substr_replace($base_image,'',0,7)));// if any other characters could be used in filepath, add them to list [  ]
        
    if (defined($add_img_constant)) {//add text above or below images
          
    $link = (ADDIMG_TEXT_TOP == 'true')? '<h4 class="addImgTitle">' constant($add_img_constant) . '</h4>' $link$link '<h4 class="addImgTitle">' constant($add_img_constant) . '</h4>';
        }
        
    // /additional image titles 
    I have finished upgrading the mod to current ZC submission standards as well as fixing the bugs, and will be submitting it to Free Addons. This sometimes takes considerable time with the devs busy on v2.0, so for now you can fix your own copies with the two simple patches in this thread.

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

    Default Re: Additional Image Titles support

    Just for interest, when tested with the original code and ADDIMG_TEXT_TOP defined as simply false instead of 'false', the titles do appear below the images as they should.
    PHP Code:
    define ('ADDIMG_TEXT_TOP',false);//change to false to put text below images 

  7. #17
    Join Date
    Dec 2006
    Location
    Northwest Connecticut
    Posts
    91
    Plugin Contributions
    0

    Default Re: Additional Image Titles support

    Thanks Glenn! Changing $link = (ADDIMG_TEXT_TOP)?
    to $link = (ADDIMG_TEXT_TOP == 'true')? works with my version, I didn't try specifying false instead of false because this modification made it work. I appreciate your prompt responses and that you provided this ZC Free Add On, for this particular site it is very important that the additional images have titles. Thanks again!

  8. #18
    Join Date
    Nov 2009
    Posts
    25
    Plugin Contributions
    0

    Default Re: Additional Image Titles support

    Thanks, Glenn, for this addon. I've got everything working but one thing. If I have one additional image, the code I'm using is putting that image on the left side of the screen. But the text for the picture is centered, so they're not lined up.

    I have downloaded and am using the "additional images" addon and you've been helping me out on that thread as well. So, since I'm using that addon and have modified it slightly, I figure there is something in that code that is changing the spacing for my pictures. Any thoughts?

    Oh, and I downloaded this image title add on today and just a note, it still has that "{" error in the code. I was able to figure it out using the debugger (which worked great!).

    Thanks.

  9. #19
    Join Date
    Nov 2009
    Posts
    25
    Plugin Contributions
    0

    Default Re: Additional Image Titles support

    I guess never mind. I just decided to play around with it and guessed right. In the additional images stylesheet, I changed the margin to 0 under the additional image section and shazaam. Everything is now centered under the picture description. Thanks again for the mods. They really help juice up the shopping carts!

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

 

 
Page 2 of 7 FirstFirst 1234 ... 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. Replies: 3
    Last Post: 29 Oct 2009, 05:43 PM
  3. Text under Image, for additional attribute image
    By prim0pyr0 in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 3 Aug 2009, 12:42 AM
  4. Changing Titles on Sidebox additional pages
    By SaMortensen in forum Addon Sideboxes
    Replies: 4
    Last Post: 7 Feb 2009, 01:34 PM
  5. custom image popup script only work for main image, not for additional images
    By gems14k in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 4 Oct 2006, 05:19 AM

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
  •