Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14
  1. #11
    Join Date
    Feb 2004
    Posts
    1,774
    Plugin Contributions
    14

    Default Re: Best way to implement external image server?

    Thanks Dr. Byte.

    And I thought I had it all figured out till I found you can't redefine a constant in PHP .. which technically makes sense.. but I was trying to do:

    configure.php:
    define('DIR_WS_IMAGES', 'https://www.fonzanoon.com/raretv/images/');


    tpl_header.php:
    if ($request_type == 'SSL'){
    define('DIR_WS_IMAGES', 'https://www.fonzanoon.com/raretv/images/');
    }

    So I suppose I could use a variable for the image location all the same.. but I dont know that i can leave a variable without $DIR_WS_IMAGES.. which defeats the purpose since I'd have to change all references to DIR_WS_IMAGES

  2. #12
    Join Date
    Feb 2004
    Posts
    1,774
    Plugin Contributions
    14

    Default Re: Best way to implement external image server?

    DUH.. i figured it out.

    I just comment out the define from the configure.php file and do it at the top of the tpl_header.php file:

    Code:
    if ($request_type == 'SSL'){
      define('DIR_WS_IMAGES', 'https://www.myimageserver.com/images/');
    } else {
      define('DIR_WS_IMAGES', 'http://www.myimageserve.com/images/');
    }
    It works! :) Although it might belong in a better location.. like perhaps in the zen_redirect function that first checks the url.
    Last edited by qhome; 18 Jan 2007 at 08:24 PM.

  3. #13
    Join Date
    Feb 2004
    Posts
    1,774
    Plugin Contributions
    14

    Default Re: Best way to implement external image server?

    It's strange. According to the php site, URL support for "getimagesize" was added in PHP 4.0.5. Both my servers are PHP 4.4.2, but when I use the external image server as the image url, the calculate image size doesn't work.

  4. #14
    Join Date
    Mar 2008
    Location
    The Free South
    Posts
    175
    Plugin Contributions
    0

    Default Re: Best way to implement external image server?

    Quote Originally Posted by qhome View Post
    It's strange. According to the php site, URL support for "getimagesize" was added in PHP 4.0.5. Both my servers are PHP 4.4.2, but when I use the external image server as the image url, the calculate image size doesn't work.
    Hi, did you ever resolve this?
    www.theCableStation.com
    "If we restrict liberty to attain security we will lose them both."

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 1
    Last Post: 22 Aug 2010, 11:08 PM
  2. How to implement an external stylesheet for my menu?
    By zingslings in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 27 Apr 2009, 11:53 PM
  3. best way to implement captcha for contact-us form??
    By tlyczko in forum General Questions
    Replies: 2
    Last Post: 14 Apr 2008, 05:13 PM
  4. how to best implement a free sample?
    By eddierosenthal in forum Setting Up Specials and SaleMaker
    Replies: 2
    Last Post: 6 Sep 2007, 12:30 AM

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