boardom Forum Index boardom
b2 message board
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

inclure les smilies au dessous de la fenetre commentaire

 
Post new topic   Reply to topic    boardom Forum Index -> Aide en français
View previous topic :: View next topic  
Author Message
lune



Joined: 01 Oct 2003
Posts: 23

PostPosted: Wed Oct 29, 2003 12:24 am    Post subject: inclure les smilies au dessous de la fenetre commentaire Reply with quote

et pas dans une fenetre popup

j'ai commencé : http://clairdeluna.free.fr/blog

mais voila les smilies ne s'insèrent pas dans la fenetre de commentaires lorsque je clique dessus

( j'ai une version b2 assez bidouillée : le moins de fenetre possible )

si vous pouvez me dire ce qui cloche
le plus clairement possible svp car je suis nulllllllllllle

merci à vous
Back to top
View user's profile Send private message
archiguy



Joined: 05 Mar 2003
Posts: 47

PostPosted: Fri Oct 31, 2003 3:22 pm    Post subject: Reply with quote

voici ma version qui marche dans b2commentspopup.php
Code:

   <p class="commentfield">
   your comment<br />
   <textarea cols="40" rows="4" name="comment" tabindex="4" class="textarea">comment</textarea>
   
   <?php if ($use_smilies) { ?>
   <br />
   <script language="JavaScript" type="text/javascript">
   function emoticon(theSmilie) {
      theSmilie = ' ' + theSmilie + ' ';
      if (document.form.comment.createTextRange && document.form.comment.caretPos) {
         var caretPos = document.form.comment.caretPos;
         caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? theSmilie + ' ' : theSmilie;
      } else {
         document.form.comment.value  += theSmilie;
      }
      document.form.comment.focus();
      theSmilie = '';
   }
   </script>
   <?php
      $newrow = 0;
      $prev_val="";
      asort($b2smiliestrans);
      while (list ($key, $val) = each ($b2smiliestrans)) {
            if($prev_val and $val==$prev_val) { }
            else if(!$prev_val or ($prev_val and $val!=$prev_val)){
   ?>
   <img src="<?php echo "$smilies_directory/$val"; ?>" alt="<?php echo $key; ?>" border="0" onclick="emoticon('<?php echo $key; ?>')" onmouseover="style.cursor='hand'" />
   <?php
                        $newrow++;
                        if($newrow == 12) { //new row after specified number of smilies
                                    echo '<br />';
                                    $newrow = 0;
                        }
            }
            $prev_val = $val;
   }
   ?>
   <?php } ?>
   </p>

   <p class="commentfield">
   <input type="checkbox" name="comment_autobr" value="1" <?php
   if ($autobr)
   echo " checked=\"checked\"" ?> tabindex="6" /> Auto-BR (line-breaks become <br> tags)<br />
   <input type="submit" name="submit" class="buttonarea" value="ok" tabindex="5" />
   </p>

</form>

<!-- /form -->

si tu n'y arrive pas, envoie nous ta version de ton code php
_________________
Archiguy
http://www.archiguy.com
Mais qu'est ce qu'il m'arrive?
Back to top
View user's profile Send private message Visit poster's website
lune



Joined: 01 Oct 2003
Posts: 23

PostPosted: Fri Oct 31, 2003 7:26 pm    Post subject: Reply with quote

Merci Archiguy Very Happy Very Happy Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> Aide en français All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2 © 2001, 2002 phpBB Group