The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
IMG Cacher - SSL Keeper - Mixed Content Block Solution Details »» | |||||||||||||||||||||||||||||
IMG Cacher - SSL Keeper - Mixed Content Block Solution
Developer Last Online: Dec 2016
Pretty much you use this when you want to keep the SSL certificete working on pages that people may use [IMG] tag's without https://.
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 ---this is a solution to that problem. Specifically, Mozilla has a 'Mixed Content Blocker', which makes it so if you are on an https:// website, it won't load any content on the same domain, using http://. NOTE: MAKE SURE THE .HTACCESS FILE IN cache-img/ IS WORKING! 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>' : ''); } edit "[LINK_TO_YOUR_WEBSITE]" - Without http, example: www.dragonbyte-tech.com or www.internot.info 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:
<FilesMatch "cache\.php$"> Header set Cache-Control "max-age=86400, public" </FilesMatch> I only give support to people who have pressed 'installed' this. ====== Source&stuff can be found here: https://github.com/MegaManSec/IMG For vB3.8 solution, go here: https://vborg.vbsupport.ru/showthrea...75#post2411575 (Thanks to Kh99) Download Now
Show Your Support
|
4 благодарности(ей) от: | ||
Andreasmax, Duke49th, seb5594, VBFguy |
Comments |
#22
|
|||
|
|||
Just change the bbcode to include cache.php?img=
|
#23
|
|||
|
|||
Looks great, but what's the difference to this mod?
https://vborg.vbsupport.ru/showthread.php?t=253309 Will there be a conflict when I use the Import External Images mod and yours at the same time? |
#24
|
|||
|
|||
I see you are using getimagesize to verify mime type, that's great.
Are there any other security considerations when using this? |
#25
|
||||
|
||||
Great mod. How would I alter the mod, to have a specific image from a website that does not support https to my site, so that I do not get mixed content? Does this mod handle ALL instances of images, including images in widgets, or just for posts? Thanks.
|
#26
|
||||
|
||||
this is useful
|
#27
|
|||
|
|||
Works perfect - just...I needed to set CHMOD to 777 for the cache_img folder. (755 when uploaded)
|
#28
|
||||
|
||||
Is there a way to get this mod to ignore caching a forums own urls and to only cache external images?
|
#29
|
|||
|
|||
It does that already. Look at the PHP code in the post of the author.
|
#30
|
||||
|
||||
.
The cache is filled with forum album/gallery sourced images from older thread/posts where the bbcode is posted sans https, it also 404s them. .htaccess issue maybe? |
#31
|
||||
|
||||
Sorted out the url problem. (SQL search and replace).
But, found a new issue. Whenever a poster edits a post in WYSIWYG mode all the image urls are saved with the cacher paths rather than the original image urls. ? |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|