Your ultimate PunBB resource!
You are not logged in.
## ## Mod title: punbb_smilies ## ## Mod version: 1 ## Works on PunBB: 1.2.6 ## Release date: 2005-07-28 ## Original Author: Gilou ## ## Description: Smilies management ## ## Affected files: parser.php ## base.css if easy_bbcode installed ## mod_easy_bbcode.php if easy_bbcode installed ## ## Affects DB: No ## ## Notes: This is a beta version, so it is not perfect yet. ## And sorry for my poor english ! ## ## Upgrading: Not yet ## ## DISCLAIMER: Please note that "mods" are not officially supported by ## PunBB. Installation of this modification is done at your ## own risk. Backup your forum database and any and all ## applicable files before proceeding.
Offline
install.txt for V2
install.txt
Name a file "lol.gif", upload it in the /punbb/img/smilies dir and go to AP_Smilies.php page in adminsection. There is nothing to validate, juste dislay the page.
Now, if you put :lol: in a post, it is replaced by the image lol.gif
chars permitted in smilies codes : letters and numbers, underscore (_), minus (-), [, ], (, ) ands slahes ( \ and / )
All others are ignored
AP_Smilies.php let you rename the files.
Install :
0 - Uploader Ap_Smileys.php to /plugins
1 - create a new empty named smiley.inc.php in / with chmod 777
2 - In /punbb/include/parser.php , comment lines 31 and 32. Add the following line after :Code:
include_once("smiley.inc.php");3 and 4 : if you have mod easy_bbcode ( http://www.punres.org/desc.php?pid=50 )
3 - in mod_easy_bbcode.php, look forCode:
<?php // Display the smiley set require_once PUN_ROOT.'include/parser.php';and put this line before :
Code:
<div id="smileys" class="punbbSmilies">Close the </div> tag on the last line
4 - Add this line in base.cssCode:
.punbbSmilies { style="padding-top: 4px;width:99%;height:80px;overflow:auto; }
Screenshots :

-------------------------
install.txt for V1 :
Name a file "lol.gif", upload it in the /punbb/img/smilies dir and go to AP_Smilies.php page in adminsection. There is nothing to validate, juste dislay the page.
Now, if you put :lol: in a post, it is replaced by the image lol.gif
For special chars like : or / just replace them by [dblpt] or [slash] so that :D will be [dblpt]D.gif or :/ will be [dblpt][slash].gif
AP_Smilies.php let you rename the files.
Install :
1 - create a new empty named smiley.inc.php in /punbb/plugins with chmod 777
2 - In /punbb/include/parser.php , comment lines 31 and 32. Add the following line after :Code:
include_once("smiley.inc.php");3 and 4 : if you have mod easy_bbcode ( http://www.punres.org/desc.php?pid=50 )
3 - in mod_easy_bbcode.php, look forCode:
<table cellpadding="0" cellspacing="0"><tr> <?php // Display the smiley set require_once PUN_ROOT.'include/parser.php';and put this line before :
Code:
<div id="smileys" class="punbbSmilies">Close the </div> tag on the last line (after </tr></table>)
4 - Add this line in base.cssCode:
.punbbSmilies { style="padding-top: 4px;width:99%;height:80px;overflow:auto; }
Last edited by Gilou (2005-12-15 08:15:32)
Offline
i'm getting this error i dont know why
Warning: fopen(smiley.inc.php): failed to open stream: Permission denied in /home2/www/pro-hatch.net/public_html/forum/plugins/AP_Smileys.php on line 245
i'm such a noob ![]()
where should the smileys.inc.php be? and what do you mean by chmod777?
thanks in advance ! ![]()
Offline
the error you get is because of the chmod 777
you must apply a 777 chmod on your file. thuis means that you allow the script to modify the file. ie in Filezilla, right click on the file :
and then 
and tcha tching !
Offline
I forgot to say thaht in parser.php, you must look for the following expression
witdh="15" haight="15"
and delete it.
if you leave it, emoticons will be resized to 15x15 pixels and you don't want that ![]()
Offline
i have installed the Easy_BBCode_1.0.1.zip and when i am trying to install your mod
the problem is that my mod_easy_bbcode.php is not like the one you have inte the
install mess? i have not change the file in any way so
what can i do???
Offline
Excellent job it rules !
Oh putaing cong c'est du bon boulot té !
About the size of preview I suggest the following modifications to keep the height and width :
if (!in_array($smiley_img[$i], $smiley_dups)) {
$info_smili = getimagesize('img/smilies/'.$smiley_img[$i]);
// $info_smili[3] will display width="X" height="Y"
echo "\t\t\t\t\t\t\t".'<a href="javascript:insert_text(\''.$smiley_text[$i].'\', \'\');"><img src="img/smilies/'.$smiley_img[$i].'" '. $info_smili[3] .' alt="'.$smiley_text[$i].'" /></a>'."\n";
}Last edited by Sgt Taliesin (2005-08-30 04:02:39)
Offline
ouch, one getimagesize for erach picture... it is too much. if you have lot of smilies, it will be too much no ?
Offline