Results 1 to 8 of 8
  1. #1
    Join Date
    Jun 2009
    Posts
    617
    Plugin Contributions
    0

    Default External Image Link

    Does anyone know how I can turn this code:

    PHP Code:
    <?php echo zen_image(DIR_WS_IMAGES 'tw.gif'); ?>
    into an external link *WITHOUT* breaking ssl?
    Thank you,
    autoace

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: External Image Link

    In what file is this snippet and exactly what is it you are attempting to do?
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: External Image Link

    Quote Originally Posted by autoace View Post
    Does anyone know how I can turn this code:

    PHP Code:
    <?php echo zen_image(DIR_WS_IMAGES 'tw.gif'); ?>
    into an external link *WITHOUT* breaking ssl?
    Simple answer: You can't.

    More complicated answer: You'd have to hard-code the URL and tell it to only display if $request_type is NONSSL.

    Either way, you can't use zen_image() to do that.
    .

    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.

  4. #4
    Join Date
    Jun 2009
    Posts
    617
    Plugin Contributions
    0

    Default Re: External Image Link

    Quote Originally Posted by DrByte View Post
    Simple answer: You can't.

    More complicated answer: You'd have to hard-code the URL and tell it to only display if $request_type is NONSSL.

    Either way, you can't use zen_image() to do that.
    That is what I figured, just needed confirmation.

    If I may, what I'm trying to do is to provide a link to my twitter page in my tpl_footer file and the external url is http *NOT* https.

    Is there way to hard-code an external url with http and not break my ssl on ssl enabled pages?
    Thank you,
    autoace

  5. #5
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: External Image Link

    If I may, what I'm trying to do is to provide a link to my twitter page in my tpl_footer file and the external url is http *NOT* https.

    Is there way to hard-code an external url with http and not break my ssl on ssl enabled pages?
    A link will be ok
    If you were fetching an image src= from off site with http then that would be an issue
    Zen-Venom Get Bitten

  6. #6
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: External Image Link

    Quote Originally Posted by autoace View Post
    Is there way to hard-code an external url with http and not break my ssl on ssl enabled pages?
    I already answered that in my last post.
    .

    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.

  7. #7
    Join Date
    Jun 2009
    Posts
    617
    Plugin Contributions
    0

    Default Re: External Image Link

    Quote Originally Posted by DrByte View Post
    I already answered that in my last post.
    Yes, thank you, however, I'd like the link to show up on all pages, ssl and non-ssl, is there a way to do that? Obviously I want the image to show up as the link.
    Thank you,
    autoace

  8. #8
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: External Image Link

    ya, just use $request_type to see whether it's SSL, and if it is, then output the https URL, otherwise the http URL
    .

    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.

 

 

Similar Threads

  1. External Link Opens Internal - Not External - Page
    By missTish! in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 20 Apr 2011, 01:18 AM
  2. External Image link and description formating
    By ccn1 in forum General Questions
    Replies: 0
    Last Post: 6 Apr 2009, 11:25 AM
  3. Adding external link to "sold out" image
    By turbowilson in forum General Questions
    Replies: 0
    Last Post: 25 Jul 2008, 01:52 AM
  4. help with external link for image in header
    By wysiwygmn in forum General Questions
    Replies: 0
    Last Post: 7 Aug 2007, 11:17 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