I am using a plugin to proxy cache remote images for https.
This is my class_bbcode-
PHP Code:
function handle_bbcode_img_match($link)
{
$link = $this->strip_smilies(str_replace('\\"', '"', $link));
// remove double spaces -- fixes issues with wordwrap
$link = str_replace(array(' ', '"'), '', $link);
$retval = '<img src="' . $link . '" border="0" alt="" />';
($hook = vBulletinHook::fetch_hook('bbcode_img_match')) ? eval($hook) : false;
return $retval;
}
And this is the plugin I am using-
PHP Code:
$url = parse_url($link);
if ($url['scheme'] == 'https') {
$retval = ($fullsize ? '<div class="size_fullsize">' : '') . '<img src="' . $link .'" border="0" alt="" />' . ($fullsize ? '</div>' : '');
} elseif ($url['host'] == 'www.site.com') {
$retval = ($fullsize ? '<div class="size_fullsize">' : '') . '<img src="' . $link .'" border="0" alt="" />' . ($fullsize ? '</div>' : '');
} else {
$retval = ($fullsize ? '<div class="size_fullsize">' : '') . '<img src="cache.php?img=' . rawurlencode($link) .'" border="0" alt="" />' . ($fullsize ? '</div>' : '');
}
Kindly help.