Skip to:
Content
Pages
Categories
Search
Top
Bottom

smiles in the bbpress


  • selenii
    Participant

    @selenii

    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)
Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Skip to toolbar