• Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership from 10$ a month today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

IMG Cacher - SSL Keeper

Admin

Well-Known Member
Staff member
Administrator
This is something I made awhile back,
Pretty much you use this when you want to keep the SSL certificete working on pages that people may use tag's without [url]https://.[/url]


When you use SSL on your forum, and somebody embeds an image from a non-ssl host, lots of browsers will give you a warning and say the website is unsafe(which is untrue) - this is a solution to that problem.


Upload the files into your root directory, and that's it.


Then you need to create a plugin (admincp -> plugins & products -> add new plugin)
Hook location: bbcode_img_match
Title: SSL IMG Cacher
Execution order: 5
Plugin PHP Code:
[code]
$link_parsed = parse_url($link);
if ($link_parsed['host'] != '[LINK_TO_YOUR_WEBSITE]')
{
$link = $this->registry->options['bburl'] . '/cache.php?img=' . urlencode($link);
$retval = ($fullsize ? '<div class="size_fullsize">' : '') . '<img src="' . $link . '" border="0" alt="" />' . ($fullsize ? '</div>' : '');
}
[/code]
Plugin is active: Yes




edit "[LINK_TO_YOUR_WEBSITE]" - Without http, example: [url]www.dragonbyte-tech.com[/url] or [url]www.internot.info[/url] etc. etc.


Then you are done.


It should be secure as the actual directory for the images is not available.(deny from all in htaccess)




I would also suggest adding this to robots.txt
[code]
User-agent: *
Disallow: /cache.php
[/code]


Also I suggest you add something like this to .htaccess:
[code]
<FilesMatch "cache\.php$">
Header set Cache-Control "max-age=86400, public"
</FilesMatch>
[/code]


======
I only give support to people who have pressed 'installed' this.
======

[DOWN] [b][url="http://www.mediafire.com/?nvgkkezlkfx0ktg"]img_cache2.zip[/url][/b][/DOWN]
 

Facebook Comments

New posts New threads New resources

Back
Top