Yeah ive been reading up on it but im hopeless with javascript atm lol, just need to read up more on it and i should be able to work it out. The avatars though aren't looking as simple as the avatars use a variable with a query.
PHP Code:
if ($CURUSER["avatars"] == "yes")
$avatar = htmlspecialchars($row["avatar"]);
elseif ($CURUSER["avatars"] == "safe" AND $row["offensive"] == "no")
$avatar = htmlspecialchars($row["avatar"]);
elseif ($CURUSER["avatars"] == "safe" AND $row["offensive"] == "yes")
$avatar = "/pic/offensive.gif";
// $avatar = ($CURUSER["avatars"] == "yes" ? htmlspecialchars($row["avatar"]) : "");
if (!$avatar)
$avatar = "/pic/default_avatar.gif";
Bump: I'm trying to use an external image proxy server to load http images over https. For example, a user uses the image tag on the forums of http://images2.imagebam.com/2f/9d/32/b55ec21038500004.png
By adding https://images.weserv.nl/?url=ssl: to the start of the url and stripping the http:// the embeded link becomes https://images.weserv.nl/?url=ssl:images2.imagebam.com/2f/9d/32/b55ec21038500004.png but I'm struggling to get it working in globalstar..
This..
PHP Code:
[img]http://www/image.gif[/img]
$s = preg_replace("/\[img\](http:\/\/[^\s'\"<>]+(\.gif|\.jpg|\.png))\[\/img\]/", "<img border=0 src=\"\\1\">", $s);
To this..
PHP Code:
[img]http://www/image.gif[/img]
$s = preg_replace("/\[img\](http:\/\/[^\s'\"<>]+(\.gif|\.jpg|\.png))\[\/img\]/", "<img border=0 src=\"\\https://images.weserv.nl/?url=ssl:\1\" >", $s);
Is outputting https://images.weserv.nl/?url=ssl:" width="150" height="150" alt=""> I'm not getting the image url inserted and I know I need to strip the http:// from it but wanted to try atleast getting the http link added to the end of the image proxy link first. The src=\"\\1\" appears to be the user inputted url but I've formatted it wrong in the modded version..
Any help would be great and much appreciated.
Bump: [QUOTE=Tedmorris;53047]Yeah ive been reading up on it but im hopeless with javascript atm lol, just need to read up more on it and i should be able to work it out. The avatars though aren't looking as simple as the avatars use a variable with a query.
PHP Code:
if ($CURUSER["avatars"] == "yes")
$avatar = htmlspecialchars($row["avatar"]);
elseif ($CURUSER["avatars"] == "safe" AND $row["offensive"] == "no")
$avatar = htmlspecialchars($row["avatar"]);
elseif ($CURUSER["avatars"] == "safe" AND $row["offensive"] == "yes")
$avatar = "/pic/offensive.gif";
// $avatar = ($CURUSER["avatars"] == "yes" ? htmlspecialchars($row["avatar"]) : "");
if (!$avatar)
$avatar = "/pic/default_avatar.gif";