what are to codes to make [img]id[/img] works? I will fetch from gallery to preview it thanks so much.
help image preview bbcode
Collapse
X
-
What script you using.
1/ Always say the script your using.....
2/ Always say the script that is that your using...
3/ Did i make any sense ???
4/ All above ^^
Thank you and have a nice day.Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
Visit: WapMasterz Coming Back Soon!
_______
SCRIPTS FOR SALE BY SUBZERO
Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
_______
Info & Tips
php.net
w3schools.com
Comment
-
Its upto the gallary script your using now...
if each uploads are numbers 1 to 10290192382392
Not like mine site does
username / id
if number of ids only it can be done.
Mine same but more 40% will not drop right image lolVisit: Chat4u.mobi - The New Lay Of being a site of your dreams!
Visit: WapMasterz Coming Back Soon!
_______
SCRIPTS FOR SALE BY SUBZERO
Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
_______
Info & Tips
php.net
w3schools.com
Comment
-
Answer For Your Question
Originally posted by stratosphere View Postwhat are to codes to make [img]id[/img] works? I will fetch from gallery to preview it thanks so much.PHP Code:function getbbcode($text, $sid="", $filtered)
{
$text=preg_replace("/\[image\](.*?)\[\/image\]/is","<a href=\"$1\"><img src=\"$1\" height=\"100\" width=\"100\"></a>",$text);
$text = preg_replace("/\[img](.*?)\[\/img\]/is","<a href=\"gallery.php?a=preview&sid=$sid&gid=$1\">Image Preview</a>",$text);
$text = preg_replace("/\[user\=(.*?)\](.*?)\[\/user\]/is","<a href=\"index.php?a=viewuser&who=$1&sid=$sid\">$2</a>",$text);
$text = preg_replace("/\[url\=(.*?)\](.*?)\[\/url\]/is","<a href=\"$1\">$2</a>",$text);
return $text;
}
Last edited by Lovely Malinao; 15.06.12, 01:18.
Comment
Comment