1 (edited by KANekT 2014-04-10 18:34)

Topic: [Release][Extension] Smiles

Allows you to easily add their own development smiles. In the archive: the extension developer + expansion with smiles.

Parametres

$Smiles, $src, $title, $width = NULL, $height = NULL

Example

        <hook id="k_add_smilies"><![CDATA[
          $ext_Smiles->add_Smile(array(
                'O:)' => array('title' => 'O:)', 'src' => $ext_info['url'].'/img/aa.gif')
          ));
        ]]></hook>

Smiles

Re: [Release][Extension] Smiles

Update 0.3.0

Re: [Release][Extension] Smiles

thanks

Re: [Release][Extension] Smiles

thanks alot, but could you please explain more on how to add the smily.

MyFootballCafe.com  is Now Online!

5 (edited by SuperMAG 2012-10-10 14:13)

Re: [Release][Extension] Smiles

This extension has a problem, it works in quick reply or making a new topic or even in PM.

But it doesn't work on advanced reply inside the topic, "Post reply" button to be exact.

Edit: Also it doesn't work when you edit the post.

MyFootballCafe.com  is Now Online!

Re: [Release][Extension] Smiles

New v0.4.0

Re: [Release][Extension] Smiles

Great, both problems are now fixed, thanks alot.

MyFootballCafe.com  is Now Online!

Re: [Release][Extension] Smiles

Nice extension. Thank you.

I've got it installed and it was not difficult to add my own smiles to Quiuck Answer form.
There is however minor issue.

I've got pun_pm v2.4.2 and pun_bbcode v1.4.18 installed as well.

Smiles button does appear in Compose message form in pun_bbcode bar as well.
It does not work however. sad

Any advise to make the Smiles button working in the compose Private Message form would be greatly appreciated.

9 (edited by podhane 2013-05-12 18:45)

Re: [Release][Extension] Smiles

i add my smilies in the manifet but don't appear in bbcode bar..

10

Re: [Release][Extension] Smiles

Have you refreshed hooks?

Re: [Release][Extension] Smiles

How i can refresh hook ?

12

Re: [Release][Extension] Smiles

@podhane,

Install: http://punbb.informer.com/extensions/1. … proved.zip

Re: [Release][Extension] Smiles

I've tried but nothing my news smilies don't appear hmm

14

Re: [Release][Extension] Smiles

Give us your manifest.xml. It may be possible that you are adding smilies in wrong way.

Re: [Release][Extension] Smiles

<?xml version="1.0" encoding="utf-8"?>
<!--
/*
 * manifest file
 *
 * @copyright Copyright (C) KANekT @ http://blog.kanekt.ru
 * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
 * Donate Web Money Z104136428007 R346491122688
*/
-->

<extension engine="1.0">
    <id>nya_smiles</id>
    <title>Smiles</title>
    <version>0.4.0</version>
    <description>KOLOBOK Smiles</description>
    <author>KANekT</author>
    <minversion>1.4.2</minversion>
    <maxtestedon>1.4.2</maxtestedon>

    <dependencies>
        <dependency>nya_smiles_dev</dependency>
    </dependencies>

    <hooks>
        <hook id="pun_bbcode_pre_buttons_output"><![CDATA[
            $this->add_button(array('name' => 'smiles', 'onclick' => 'showhide(\'pun_bbcode_smilies\');', 'image' => true));
        ]]></hook>

        <hook id="po_pre_post_contents, vt_quickpost_pre_message_box, ed_pre_message_box, pun_pm_fn_send_form_pre_textarea_output" priority="10"><![CDATA[
            global $ext_Smiles;
            $smilies = $ext_Smiles->Smiles;
            $text = '<div id="pun_bbcode_smilies">';
            foreach ($smilies as $smile => $prop)
            {
                if (!isset($prop['view'])){
                    $text .= '<a onclick="PUNBB.pun_bbcode.insert_text(\' '.$prop['title'].' \', \'\')"><img src="'.$prop['src'].'"'.((isset($prop['width'])) ? ' width="'.$prop['width'].'"' : '').((isset($prop['height'])) ? ' height="'.$prop['height'].'"' : '').' alt="'.$prop['title'].'" /></a>'."\n";
                }
            }
            $text .= '</div>';
            echo $text;
        ]]></hook>

        <hook id="pun_bbcode_styles_loaded"><![CDATA[
            if ($forum_user['pun_bbcode_enabled'] == '1')
            {
                if (!isset($smiles_styles_loaded )) {
                    $smiles_styles_loaded = TRUE;
                    if ($forum_user['style'] != 'Oxygen' && file_exists($ext_info['path'].'/css/'.$forum_user['style'].'/pun_bbcode_smiles.min.css')) {
                        $forum_loader->add_css($ext_info['url'].'/css/'.$forum_user['style'].'/pun_bbcode_smiles.min.css', array('type' => 'url', 'media' => 'screen'));
                    } else {
                        // Optimize: inline for Oxygen
                        $forum_loader->add_css('#pun_bbcode_bar #pun_bbcode_button_smiles.image{background:url("'.$ext_info['url'].'/css/Oxygen/img/smiles.png")  50% 50% no-repeat;}div#pun_bbcode_smilies{display:none;margin:0.5em 0 0 1em;padding: 0 0 0 17em;}', array('type' => 'inline'));
                    }
                }
                $forum_loader->add_js($ext_info['url'].'/js/pun_bbcode_smiles.min.js', array('type' => 'url'));
            }
        ]]></hook>

        <hook id="nya_add_smilies"><![CDATA[
            $ext_Smiles->add_Smile(array(
                ':)' => array('title' => ':)', 'src' => $ext_info['url'].'/img/smile.png'),
                '=)' => array('title' => '=)', 'src' => $ext_info['url'].'/img/smile.png', 'view' => 0),
                ':|' => array('title' => ':|', 'src' => $ext_info['url'].'/img/neutral.png'),
                '=|' => array('title' => '=|', 'src' => $ext_info['url'].'/img/neutral.png', 'view' => 0),
                ':(' => array('title' => ':(', 'src' => $ext_info['url'].'/img/sad.png'),
                '=(' => array('title' => '=(', 'src' => $ext_info['url'].'/img/sad.png', 'view' => 0),
                ':D' => array('title' => ':D', 'src' => $ext_info['url'].'/img/big_smile.png'),
                '=D' => array('title' => '=D', 'src' => $ext_info['url'].'/img/big_smile.png', 'view' => 0),
                ':o' => array('title' => ':o', 'src' => $ext_info['url'].'/img/ow.png'),
                ':O' => array('title' => ':O', 'src' => $ext_info['url'].'/img/ow.png', 'view' => 0),
                ';)' => array('title' => ';)', 'src' => $ext_info['url'].'/img/wink.png'),
                ':/' => array('title' => ':/', 'src' => $ext_info['url'].'/img/hmm.png'),
                ':p' => array('title' => ':p', 'src' => $ext_info['url'].'/img/tongue.png'),
                ':P' => array('title' => ':P', 'src' => $ext_info['url'].'/img/tongue.png', 'view' => 0),
                ':lol:' => array('title' => ':lol:', 'src' => $ext_info['url'].'/img/lol.png'),
                ':mad:' => array('title' => ':mad:', 'src' => $ext_info['url'].'/img/mad.png'),
                ':rolleyes:' => array('title' => ':rolleyes:', 'src' => $ext_info['url'].'/img/roll.png'),
                ':cool:' => array('title' => ':cool:', 'src' => $ext_info['url'].'/img/cool.png'),
                ':beer:' => array('title' => ':beer:', 'src' => $ext_info['url'].'/img/beer.gif'),
                ':blink:' => array('title' => ':blink:', 'src' => $ext_info['url'].'/img/blink.gif'),
                ':fuck:' => array('title' => ':fuck:', 'src' => $ext_info['url'].'/img/fuckyou.gif'),
                ':siffle:' => array('title' => ':siffle:', 'src' => $ext_info['url'].'/img/siffle.gif'),
                ':grrr:' => array('title' => ':grrr:', 'src' => $ext_info['url'].'/img/grrr.gif'),
                ':pouce:' => array('title' => ':pouce:', 'src' => $ext_info['url'].'/img/pouce.gif'),
                ':bienvenue:' => array('title' => ':bienvenue:', 'src' => $ext_info['url'].'/img/welcome.gif'),
            ));
        ]]></hook>
    </hooks>
</extension>

Re: [Release][Extension] Smiles

Link doesn't work !!

17

Re: [Release][Extension] Smiles

Updated to 0.5.0

18

Re: [Release][Extension] Smiles

KANekT wrote:

Allows you to easily add their own development smiles. In the archive: the extension developer + expansion with smiles.

Parametres

$Smiles, $src, $title, $width = NULL, $height = NULL

Example

        <hook id="k_add_smilies"><![CDATA[
          $ext_Smiles->add_Smile(array(
                'O:)' => array('title' => 'O:)', 'src' => $ext_info['url'].'/img/aa.gif')
          ));
        ]]></hook>

Smiles

I have just installed your ext, but dont know how to use it. Can you guide me in detail how to add smiles ?
Thanks!

19

Re: [Release][Extension] Smiles

D_comp wrote:

I have just installed your ext, but dont know how to use it. Can you guide me in detail how to add smiles ?
Thanks!

anyone guide me pls ?

20 (edited by PanBB.Ru 2016-05-27 14:24)

Re: [Release][Extension] Smiles

there is no control panel to add emoticons . Find an array of emoticons and follow the analogy of adding to the array. then refresh the hooks .

as hashtags better to use words:
*SMILE* => smile.gif

21

Re: [Release][Extension] Smiles

https://github.com/KANekT/PunBB.Extensi … r/k_smiles

Auto close the smiley panel after inserting a smiley into a message:

extensions/k_smiles/manifest.xml

            $text = '<div id="pun_bbcode_smilies">';

replace to

            $text = '<div id="pun_bbcode_smilies" onclick="this.style.display=\'none\';">';

and reinstall k_smiles

ForkBB
I speak only Russian  :P

Re: [Release][Extension] Smiles

That so fixed that annoying issue, I cannot tell you hoe much I appreciate that fix !!!!!!!!