You can also try this modification: (I removed HEIGHT for easier use.
############################################################## ## MOD Title]http://www.robintown.nl[/url] ## MOD De.scription: With this mod you can set the weidth and height of an image via the BBcode ## MOD Version: 1.0.0## ## Installation Level: (Easy) ## Installation Time: 5 Minutes ## Files To Edit: bbcode.php, bbcode.tpl ## Included Files: (n/a)############################################################## ## For Security Purposes, Please Check: [url=http://www.phpbb.com/mods/]http://www.phpbb.com/mods/[/url] for the ## latest version of this MOD. Downloading this MOD from other sites could cause malicious code ## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered ## in our MOD-Database, located at: [url=http://www.phpbb.com/mods/]http://www.phpbb.com/mods/[/url] ############################################################## ## Author Notes: ## My first 'real' mod <img>############################################################## ## MOD History: ## ## 2005-02-15 - Version 1.0.0 ## - release## ############################################################## ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ############################################################## # #-----[ OPEN ]------------------------------------------ # includes/bbcode.php # #-----[ FIND ]------------------------------------------ # $bbcode_tpl['img'] = str_replace('{URL}', '\1', $bbcode_tpl['img']); # #-----[ AFTER, ADD ]------------------------------------------ # $bbcode_tpl['imgwh'] = str_replace('{URL}', '\2', $bbcode_tpl['imgwh']); $bbcode_tpl['imgwh'] = str_replace('{WIDTH}', '\1', $bbcode_tpl['imgwh']); # #-----[ FIND ]------------------------------------------ # // matches a [url]xxxx://www.phpbb.com[/url] code.. # #-----[ BEFORE, ADD ]------------------------------------------ # // [img width= height= ] and [/img] code.. $patterns[95] = "#[img width=([0-9]?[0-9]?[0-9]):$uid](.*?)[/img]#si"; $replacements[95] = $bbcode_tpl['imgwh']; # #-----[ FIND ]------------------------------------------ # // [flash=,:2e8cvjq5]image_url_here[/flash:2e8cvjq5] code.. $text = preg_replace("#[img]((http|ftp|https|ftps)://)([^ ?&=#"nrt<]*?(.(jpg|jpeg|gif|png)))[/img]#sie", "'[img]\1' . str_replace(' ', '%20', '\3') . '[/img]'", $text); # #-----[ AFTER, ADD ]------------------------------------------ # // [img width= heigth=] and [/img] code.. $text = preg_replace("#[img width=([0-9]?[0-9]?[0-9])](([a-z]+?)://([^, nr]+))[/img]#si","[img width=\1:$uid]\2[/img]", $text); # #-----[ OPEN ]------------------------------------------ # templates/********/bbcode.tpl # #-----[ FIND ]------------------------------------------ # <BEGIN><img><END> # #-----[ AFTER, ADD ]------------------------------------------ # <BEGIN><img></img><END> # #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ # # EoM
Now you can add a simple [img
width=mypx] to the post and the pic will resize, if you want it to.