Skip to:
Content
Pages
Categories
Search
Top
Bottom

smiles in the bbpress

  • @selenii

    Participant

    How can I use smiles in the bbpress. I will insert it in my reply form.

    For example with:

    <script type="text/javascript">
    function addsmile($smile){
    document.getElementById('comment').value=document.getElementById('comment').value+' '+$smile+' ';
    }
    </script>
    <?php
    global $wpsmiliestrans;
    $dm_showsmiles = '';
    $dm_smiled = array();
    foreach ($wpsmiliestrans as $tag => $dm_smile) {
     if (!in_array($dm_smile,$dm_smiled)) {
     $dm_smiled[] = $dm_smile;
     $tag = str_replace(' ', '', $tag);
     $dm_showsmiles .= '<img src="'.get_bloginfo('wpurl').'/wp-includes/images/smilies/'.$dm_smile.'" alt="'.$tag.'" onclick="addsmile(\''.$tag.'\');"/> ';
     }
    }
    echo '<div style="width:100%; margin-left:0px; margin-right:0px;">'.$dm_showsmiles.'</div>';
    ?>

    But it did not works. Have anybode idea why?

Viewing 8 replies - 1 through 8 (of 8 total)
  • @casiepa

    Moderator

    Hi,

    If you want custom smilies or stickers, then check for plugins like ‘wp-Monalisa’ or ‘Font Emoticons’, however bbPress can use WordPress’s supplied smilies, see https://codex.wordpress.org/Using_Smilies and https://codex.wordpress.org/Emoji
    πŸ˜› πŸ’€ πŸ‘» πŸ‘½ 😺 😸 😹 😻 😼 😽 πŸ™€ 😿 😾 πŸ™Œ πŸ‘ πŸ‘‹ πŸ‘ πŸ‘Š

    Pascal.

    @selenii

    Participant

    Can I make that withot plugin?

    @casiepa

    Moderator

    As said, the basic ones are already in WordPress (Dashboard: Settings > Writing > Formatting).

    If you want more, but no full plugin, check the code of the above plugins to see how they did it.

    Pascal.

    @selenii

    Participant

    I need basic. I have activated it in the WordPress, but how can I insert into my bbpress form?

    @casiepa

    Moderator

    As bbPress is using WordPress below, it supports the basic ones.
    When I type :-) or :-P, it automatically converts them to πŸ™‚ or πŸ˜›

    So if you have set that option, it comes automatically.

    Pascal.

    @selenii

    Participant

    Yes it works, but how can I insert it on my text tool as a bbcode for the choice. I will that my users have one option to choice some smile from the list.

    @casiepa

    Moderator

    @selenii

    Participant

    It does work.

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Skip to toolbar