Jump to content
Latest News: (loading..)

KongoCat

Members
  • Content count

    2
  • Joined

  • Last visited

1 Follower

Profile Information

  • Real Name
    D Sof
  1. Hello All, Great contribution!!! I hope I have no mistakes here. One thing to fix if you need it to work in SSL: in function: function imageURL($path, $encode = FALSE) { global $HTTP_SERVER_VARS; // initialize context $url = (IMAGE_URL . $path); // if URL is to be encoded ... if($encode) { // ... encode the URL $url = rawurlencode($url); $url = str_replace("%2F", "/", $url); } // return the URL return ("http://" . $HTTP_SERVER_VARS["HTTP_HOST"] . $url); } chnge return line to: return ("https://" . $HTTP_SERVER_VARS["HTTP_HOST"] . $url); in: function scriptURL($path, $encode = FALSE) { global $HTTP_SERVER_VARS; // initialize context $url = (SCRIPT_URL . $path); // if URL is to be encoded ... if($encode) { // ... encode the URL $url = rawurlencode($url); $url = str_replace("%2F", "/", $url); } // return the URL return ("http://" . $HTTP_SERVER_VARS["HTTP_HOST"] . $url); } to return ("https://" . $HTTP_SERVER_VARS["HTTP_HOST"] . $url); look for another instance of "http" and change to "https". other wise it will not work. When updating the database replace all https: with http: and do exactly the oposit when reading from the database to the textarea for editing. The reason is that when you are in an SSL secured page, trying to add a picture from a nonsecured will have access denied because of security violation. This is a fast fix that can be implemented much smarter. DS
×