Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • jooservices Friend
    #171587

    In default JA Comments plugin ( content ) we have these line code

    if(!defined('JACOMMENT_GLOBAL_JS')){
    JHTML::script(JURI::root().'components/com_jacomment/asset/js/jquery-1.4.2.js');
    JHTML::script(JURI::root().'components/com_jacomment/asset/js/ja.comment.js');
    JHTML::script(JURI::root().'components/com_jacomment/asset/js/ja.popup.js');
    define('JACOMMENT_GLOBAL_JS', true);
    }

    By this way, it’s only load http://...
    But in somecase your site loaded under ssl ( https ) and you will have warning because have link to non secured .

    So this’s a patch.

    $scheme = str_replace ('http','',JURI::root());
    $scheme = str_replace ('https','',$scheme);

    $uri =& JURI::getInstance();
    $scheme = $uri->getScheme() . $scheme;

    JHTML::script($scheme.'components/com_jacomment/asset/js/jquery-1.4.2.js');
    JHTML::script($scheme.'components/com_jacomment/asset/js/ja.comment.js');
    JHTML::script($scheme.'components/com_jacomment/asset/js/ja.popup.js');

    at first we remove all kind of scheme and after that detect current scheme and add it back.

    Actually in your site if you are going w/ optimize i suggest to put your own site url here. So don’t waste time for calc / checking …
    A part of optimize .

    n6rej Friend
    #428580

    other then <blockquote>Actually in your site if you are going w/ optimize i suggest to put your own site url here. So don’t waste time for calc / checking </blockquote> thats a excellent fix joo

    jooservices Friend
    #428615

    lol . no one saw my mistake in code of str_replace 😀
    Updated.

Viewing 3 posts - 1 through 3 (of 3 total)

This topic contains 3 replies, has 2 voices, and was last updated by  jooservices 12 years, 11 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum