Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2006
    Location
    Montreal, Canada
    Posts
    2,279
    Plugin Contributions
    0

    Default help with zc image function

    I need to add ajax zoom effect to my image .. however, i have a bit of problem doing so , due to lack of understanding zc function .

    need to add additional element called longdesc to <img> tag.
    this element should contain path to large image.

    currently trying to add this zoom effect to product all listing .
    code that needed to be modified is :

    PHP Code:
        $display_products_image '<a href="' zen_href_link(zen_get_info_page($products_all->fields['products_id']), 'cPath=' zen_get_generated_category_path_rev($products_all->fields['master_categories_id']) . '&products_id=' $products_all->fields['products_id']) . '">' zen_image(DIR_WS_IMAGES $products_all->fields['products_image'], $products_all->fields['products_name'], IMAGE_PRODUCT_ALL_LISTING_WIDTHIMAGE_PRODUCT_ALL_LISTING_HEIGHT) . '</a>' str_repeat('<br clear="all" />'substr(PRODUCT_ALL_LIST_IMAGE31)); 
    so i need to add $parama=longdesc = zen_images() after IMAGE_PRODUCT_ALL_LISTING_HEIGHT . but i have no idea how . tried many ways but ended up with all kinda problems.

    any information would be appreciate.

    thanks.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,445
    Plugin Contributions
    81

    Default Re: help with zc image function

    You can add custom additional parameters by adding a 5th parameter to the zen_image() function call.
    However, keep in mind that it's unwise to disclose server-side path details to visitors ... so, if your ajax script is relying on you specifying complete paths, then you're engaging in unwise coding practices as far as security is concerned.

    Further, while I've not checked the w3c spec about this and I could be wrong in this thought, but isn't "longdesc" intended to be used for something of a useful meaning to the person viewing the page? Putting a "path" in there seems like it's contrary to the intent of that element's use.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Jul 2006
    Location
    Montreal, Canada
    Posts
    2,279
    Plugin Contributions
    0

    Default Re: help with zc image function

    thanks ..

    the idea is to have something like this ..

    <img src="smallimage.jpg" longdesc="largeimage.jpg" >

    I am not the author of this script but this script called fullsize and can be found pretty easy on the net and all the information regarding this is there ..

    so , how can i construct that ??

  4. #4
    Join Date
    Jan 2004
    Posts
    66,445
    Plugin Contributions
    81

    Default Re: help with zc image function

    add a 5th parameter:
    Code:
    , 'longdesc=" . $path_to_my_image . "'
    You'll have to build the right value for the $path_to_my_image variable, by writing custom code to look up the right details.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Jul 2006
    Location
    Montreal, Canada
    Posts
    2,279
    Plugin Contributions
    0

    Default Re: help with zc image function

    ouch ..
    Thanks. will try to come up with something

 

 

Similar Threads

  1. v150 Going crazy need help With option manger function!!
    By Darion in forum General Questions
    Replies: 5
    Last Post: 3 Oct 2012, 12:57 AM
  2. Replies: 3
    Last Post: 11 Jan 2011, 02:53 AM
  3. Please help, problem with function
    By ALISON MILLS in forum General Questions
    Replies: 4
    Last Post: 17 Dec 2009, 12:48 PM
  4. help with zen_draw_pull_down_menu function
    By keithstric in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 4 Aug 2009, 09:17 PM
  5. Please could I have help with a function
    By setter in forum General Questions
    Replies: 2
    Last Post: 16 Jun 2009, 10:49 PM

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