PunBB Resource

Your ultimate PunBB resource!

Keywords:

    (Extended)

You are not logged in.


Login to move these ads to the bottom of the page

#1 2005-07-29 06:09:01

Gilou
Member
Registered: 2005-07-29
Posts: 23

punbb_smilies v1

Code:

##
##        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.

Download here


"j'aurais pas pu tomber sur une plančte ŕ la cool moi... pas mon style"

Offline

 

#2 2005-07-29 06:13:15

Gilou
Member
Registered: 2005-07-29
Posts: 23

Re: punbb_smilies v1

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 for

Code:

                <?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.css

Code:

                .punbbSmilies { style="padding-top: 4px;width:99%;height:80px;overflow:auto; }

Screenshots :

http://popopopo.org/punbb_smilies/SC2.jpg

http://popopopo.org/punbb_smilies/SC.jpg

-------------------------
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 for

Code:

                <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.css

Code:

                .punbbSmilies { style="padding-top: 4px;width:99%;height:80px;overflow:auto; }

Screenshots :

http://popopopo.org/punbb_smilies/SC2.jpg

http://popopopo.org/punbb_smilies/SC.jpg

Last edited by Gilou (2005-12-15 08:15:32)


"j'aurais pas pu tomber sur une plančte ŕ la cool moi... pas mon style"

Offline

 

#3 2005-08-01 11:26:12

-ArChAng3L-
New member
Registered: 2005-07-26
Posts: 7

Re: punbb_smilies v1

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 tongue

where should the smileys.inc.php be? and what do you mean by chmod777?

thanks in advance ! smile

Offline

 

#4 2005-08-03 07:05:20

Gilou
Member
Registered: 2005-07-29
Posts: 23

Re: punbb_smilies v1

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 :

http://images.popopopo.org/CHMOD_1.png

and then

http://images.popopopo.org/CHMOD_2.png

and tcha tching !


"j'aurais pas pu tomber sur une plančte ŕ la cool moi... pas mon style"

Offline

 

#5 2005-08-03 07:07:26

Gilou
Member
Registered: 2005-07-29
Posts: 23

Re: punbb_smilies v1

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 wink


"j'aurais pas pu tomber sur une plančte ŕ la cool moi... pas mon style"

Offline

 

#6 2005-08-20 12:04:54

Skippy
New member
Registered: 2005-08-20
Posts: 6

Re: punbb_smilies v1

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

 

#7 2005-08-27 18:11:23

Sgt Taliesin
New member
Registered: 2005-08-27
Posts: 3

Re: punbb_smilies v1

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 :

Code:

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

 

#8 2005-12-15 08:09:31

Gilou
Member
Registered: 2005-07-29
Posts: 23

Re: punbb_smilies v1

ouch, one getimagesize for erach picture... it is too much. if you have lot of smilies, it will be too much no ?


"j'aurais pas pu tomber sur une plančte ŕ la cool moi... pas mon style"

Offline

 

Board footer

Based on PunBB
© Copyright 2002–2005 Rickard Andersson

© Copyright 2004–2006 Kristoffer Jansson

User contributed files are property of their respective owners.