WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: NextGEN Gallery] https - problem (12 posts)

  1. cdpapoulias
    Member
    Posted 5 years ago #

    Hi! Great plugin...amazing functionality. One little thing is causing a problem: on a few of my site pages (I'm using WP more of a CMS than blog) I use https instead of http. The things the script includes always stay http, I believe because it takes the siteurl variable the WP settings.

    How can I change this so that on https browsers don't ask "do you want to include secure and non-secure content"?

    I'm almost-okay editing the code - but figured you would be able to tell faster how to modify it.

    Thank you!

    Dinos

  2. Alex Rabe
    Member
    Posted 5 years ago #

    Try version 1.0.0 beta please

  3. danny.hafner
    Member
    Posted 4 years ago #

    I'm also having an issue with NextGen and SSL. I'm using NextGEN Gallery 1.2.1 with WordPress 2.7.1. I haven't upgraded these because last time I had a number of negative things happen, including Thick box JS conflicting with WP. Anyway, the minute I switch to https:// within my site, IE gives me the "this page contains both secure and nonsecure items." I traced it back to NextGen after disabling it, and finding that the error message goes away. So, any fixes for this? Thanks!!

  4. Alex Rabe
    Member
    Posted 4 years ago #

    should be fixed in the currenty version, check the html output, maybe a script or css file are not using the "https://", give me a note I will fix that

  5. danny.hafner
    Member
    Posted 4 years ago #

    Yep, I did find <link rel='stylesheet' href='http://www.mydomainname.com/wp-content/plugins/nextgen-gallery/css/nggallery.css?ver=1.0.0' type='text/css' media='screen' />. Could this be the issue? Is so, how can I change it? Thanks so much for your help!

  6. danny.hafner
    Member
    Posted 4 years ago #

    Hey Alex. I was wondering if you thought the style sheet was the culprit. And, if so, where can I hardcode the stylesheet reference with the https:// prefix? I believe that would do the trick, right?

  7. Alex Rabe
    Member
    Posted 4 years ago #

    I didn't remember that I load the global stylesheet in the admin backend. On which page do you receive the output ?

  8. danny.hafner
    Member
    Posted 4 years ago #

    If I understand you correctly. Here is one page in question. https://www.fdsdisposalinc.com/shop/checkout/

  9. pgoldrbx
    Member
    Posted 4 years ago #

    I am having the same issue with the current version of NextGen Gallery. If I access a page via https, the nextgen links (css, js, etc) are the only ones that are stubbornly printed as http. I'm also using the HTTP for WordPress plugin.

    Any progress on this?

  10. jeremysawesome
    Member
    Posted 4 years ago #

    Hello All,

    I also ran into the "do you want to include secure and non-secure content" issue and was able to fix it. I am using HTTPS for WordPress.

    You will need to change two files in order to make the https work.

    First file: nextgen-gallery/nggallery.php
    On or around line 210 you will see the definition for "NGGALLERY_URLPATH".
    Change this line:
    define('NGGALLERY_URLPATH', WP_PLUGIN_URL . '/' . plugin_basename( dirname(__FILE__) ) . '/' );

    To:

    if(!empty($_SERVER['HTTPS']))
          {define('NGGALLERY_URLPATH', str_replace('http://', 'https://', WP_PLUGIN_URL) . '/' . plugin_basename( dirname(__FILE__) ) . '/' );}
          else
          {define('NGGALLERY_URLPATH', WP_PLUGIN_URL . '/' . plugin_basename( dirname(__FILE__) ) . '/' );}

    That should take care of all of the NextGen css and js files. The next change you will have to make is to the media-rss.php file in the "Cool Iris" support section.

    Second File: nextgen-gallery/lib/media-rss.php
    Find line 21, you should see an HTML comment being echoed out that says '<!-- NextGeEN Gallery CoolIris/PicLens support -->'.

    Change line 22 From:
    echo "\n" . '<script type="text/javascript" src="http://lite.piclens.com/current/piclens_optimized.js"></script>';

    To:

    if(!empty($_SERVER['HTTPS']))
          {echo "\n" . '<script type="text/javascript" src="https://lite.piclens.com/current/piclens_optimized.js"></script>';}
          else
          {echo "\n" . '<script type="text/javascript" src="http://lite.piclens.com/current/piclens_optimized.js"></script>';}

    That's it - your page should no longer display those pesky "unauthenticated" content errors.

  11. Josh Leuze
    Member
    Posted 4 years ago #

    Thanks Jeremy, that fix worked perfectly, you truly are awesome!

    I hope this gets added into the NextGen plugin in a future version...

  12. abirchler
    Member
    Posted 4 years ago #

    Might it be better to add a copy of the piclens javascript to the plugin directory and then include it using wp_enqueue_script(...)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.