Created
May 4, 2017 03:09
-
-
Save shabbirbhimani/b5ee238b6455bdd92f07a846e60a4aae to your computer and use it in GitHub Desktop.
Hook bbcode_img_match and add the following code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Do NOT include the opening php tag above. Copy the code shown below. | |
$urlbits = parse_url($link); | |
$salt = 'XXXX'; | |
if ($urlbits['scheme']!='https') | |
$link = '/imgproxy.php?u='.urlencode($link).'&h='.md5($salt.$link.$salt); | |
$retval = ($fullsize ? '<div class="size_fullsize">' : '') . '<img src="' . $link . '" border="0" alt="" />' . ($fullsize ? '</div>' : ''); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment