Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

Img bbcode image resize

hey I got this code for [*img*][*/img*] so it opens with fancybox all my images

[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]add_to_head("<link rel='stylesheet' href='".THEME."fancybox.css' type='text/css' media='projection, screen' />"wink;
add_to_head("<script type='text/javascript' src='".INCLUDES."jquery/fancybox.js'></script>"wink;
add_to_head("<script type='text/javascript' src='".INCLUDES."jquery/fancybox_effects.js'></script>"wink;

if (!function_exists("img_bbcode_callback"wink) {
function img_bbcode_callback($matches) {
if (substr($matches[3], -1, 1) != "/"wink {
return "<span class='forum-img-wrapper'><a href='".$matches[1].str_replace(array("?","&amp;","&","="wink, "", $matches[3]).$matches[4]."' title='".$matches[3].$matches[4]."' rel='group'><img src='".$matches[1].str_replace(array("?","&amp;","&","="wink, "", $matches[3]).$matches[4]."' alt='".$matches[3].$matches[4]."' style='display:block; max-width:600px; max-height:250px;' class='forum-img' /></a></span>";
} else {
return $matches[0];

$text = preg_replace_callback("#\[img\]((http|ftp|https|ftps)://)(.*?)(\.(jpg|jpeg|gif|png|JPG|JPEG|GIF|PNG))\[/img\]#si", "img_bbcode_callback", $text);[/syntaxhighlighter]

is there anyway I can make it so only images bigger then 600x250px have a link to show the image with full size
Thread Information
1 post
2369 times
Last Post
Last updated on 9 years ago
You can view all discussion threads in this forum.
You cannot set up a bounty in this discussion thread.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
You cannot up or down-vote on the post in this discussion thread.
Users who participated in discussion: Bruno