Version 0.1.4: Download
The smilies list on post forms is now generated from the /img/smilies/ directory file list.
All images in that directory are now available in posts. The ASCII smiles ( ) are unchanged, and all named smiley codes ( ) are now the image file name, without the filetype extension: So, filename.png now has BBCode :filename: and otherfile.gif has :otherfile: and so on.
width="15" height="15" is found in PunBB 1.3.2 <img> tags, in /include/parser.php, function do_smilies($text), and can be modified to read:
/include/parser.php Line 767:
global $forum_config, $base_url, $smilies, $smilies_h, $smilies_w;
/include/parser.php Line 774:
$text = preg_replace("#(?<=[>\s])".preg_quote($smiley_text, '#')."(?=\W)#m", '<img src="'.$base_url.'/img/smilies/'.$smiley_img.'" width="'.$smilies_w[$smiley_img].'" height="'.$smilies_h[$smiley_img].'" alt="'.substr($smiley_img, 0, strrpos($smiley_img, '.')).'" />', $text);
Making the above changes to /include/parser.php will allow smilies <img> tags to have the real image width & height inside of posts, but still use 15x15 in the BBCode toolbar, as in the provided screenshot.
I used GD functions to measure the images, so check this page:
forum.domain/admin/index.php?action=phpinfo
For this info:
PHPInfo wrote:GD Support enabled
GD Version 2.0 or higher
[...]
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
Use the same GD version I have, and only upload images saved in file formats you have GD support enabled for.
Make the following modification in /extensions/pun_bbcode/bar.php:
Edit: Moved to it's own thread.
The combined result will be: