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 |
#12
|
||||
|
||||
This is AWESOME!
|
#13
|
|||
|
|||
Here is a version that just displays the image, and doesn't save it, to save server space
PHP Code:
|
#14
|
|||
|
|||
|
#15
|
|||
|
|||
Hiya, I installed the MOD. It's not working for me at the moment, the images are not saving in the cache directory do I need to CHMOD the folders to anything different from 755?
Regards Steve |
#16
|
|||
|
|||
I made a silly error with the uploading the whole folder instead of the contents of the folder. Now working very well cheers.
|
#17
|
|||
|
|||
I'm bumping this topic, as Mozilla is now blocking all webpages that isn't pure HTTPS. ( https://developer.mozilla.org/en-US/...ked_by_default )
|
#18
|
|||
|
|||
Quote:
It will not block "display content" like images, videos or audio. |
#19
|
|||
|
|||
It does now!
|
#20
|
||||
|
||||
I can't find the hook location "bbcode_img_match", its not listed in the Hook Locations. My vB version is 4.1.4.
However, when I open "class_bbcode.php" in Notepad++, I see this: Code:
/** * Handles a match of the [img] tag that will be displayed as an actual image. * * @param string The URL to the image. * * @return string HTML representation of the tag. */ function handle_bbcode_img_match($link, $fullsize = false) { $link = $this->strip_smilies(str_replace('\\"', '"', $link)); // remove double spaces -- fixes issues with wordwrap $link = str_replace(array(' ', '"'), '', $link); return ($fullsize ? '<div class="size_fullsize">' : '') . '<img src="' . $link . '" border="0" alt="" />' . ($fullsize ? '</div>' : ''); } /** Edit: I got it working by using this method: https://vborg.vbsupport.ru/showthrea...75#post2411575 (Thanks to Kh99), and I am on 4.1.4, it works great. *INSTALLED |
#21
|
||||
|
||||
Has anyone worked out how to expand this mod to cover custom bbcode which embeds images?
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|