Skip to main content

http and https

Tagged: ,

This topic contains 3 replies, has 2 voices, and was last updated by  ClassiBase 8 months, 2 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #6642 Reply

    Phasellus
    Participant

    Hello,
    I’ve installed SSL certificates on server. Now domain link begins with https not http, but there is a problem. The site displays incorrectly – formatting style not followed.
    How can I fix it?

    #6810 Reply

    ClassiBase
    Keymaster

    Hello,

    Script has hard coded setting to use http:// you can change it. Main change is in config.php file.

    /sys/config.php line 51 change
    define('URL_PUBLIC', 'http://' . DOMAIN . '/');
    to
    if ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443)
    {
    define('URL_PROTOCOL', 'https://');
    }
    else
    {
    define('URL_PROTOCOL', 'http://');
    }
    define('URL_PUBLIC', URL_PROTOCOL . DOMAIN . '/');

    Other changes are optional. They are related to external javascript used for google amps and captcha.

    sys/app/modules/Ad.php line 1674 change
    return 'http://chart.apis.google.com/chart?chs=300x300&cht=qr&chld=L|2&chl=' . urlencode($info);
    to
    return '//chart.apis.google.com/chart?chs=300x300&cht=qr&chld=L|2&chl=' . urlencode($info);

    /sys/app/modules/AuthUser.php file line 87 change
    $rd = '?rd=' . urlencode('http://' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]);
    to
    $rd = '?rd=' . urlencode(URL_PROTOCOL . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]);

    /sys/app/modules/Captcha.php file line 143 change
    $.getScript("http://www.google.com/recaptcha/api/js/recaptcha_ajax.js",function(){
    to
    $.getScript("//www.google.com/recaptcha/api/js/recaptcha_ajax.js",function(){

    line 121 change
    $input = recaptcha_get_html($publickey) . Validation::getInstance()->{$name . '_error'};
    to
    $use_ssl = (URL_PROTOCOL === 'https://');
    $input = recaptcha_get_html($publickey, null, $use_ssl) . Validation::getInstance()->{$name . '_error'};

    /sys/app/modules/Map.php file line 192 change
    var script_src = "http://maps.googleapis.com/maps/api/js?sensor=false&callback=gm_initialize";
    to
    var script_src = "//maps.googleapis.com/maps/api/js?sensor=false&callback=gm_initialize";

    line 299 change
    script.src = "http://maps.googleapis.com/maps/api/js?sensor=false&callback=gm_initialize";
    to
    script.src = "//maps.googleapis.com/maps/api/js?sensor=false&callback=gm_initialize";

    /sys/app/modules/User.php file line 179 change
    return 'http://www.gravatar.com/avatar/' . md5($email) . '.jpg?s=' . $size . '&d=' . $type;
    to
    return '//www.gravatar.com/avatar/' . md5($email) . '.jpg?s=' . $size . '&d=' . $type;

    #6820 Reply

    Phasellus
    Participant

    Thank you very much!

    #6955 Reply

    ClassiBase
    Keymaster

    We released Classibase version 1.8 with HTTPS support. Read details here http://classibase.com/classibase-version-1-8-https-recaptcha2-ad-view-counter/

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: http and https
Your information:




  • Classifieds Business Newsletter

    Get discounts and tips about growing your classifieds website.

    Subscribe