View previous topic :: View next topic |
Author |
Message |
lune
Joined: 01 Oct 2003 Posts: 24
|
Posted: Wed Oct 29, 2003 12:24 am Post subject: inclure les smilies au dessous de la fenetre commentaire |
|
|
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 |
|
 |
archiguy
Joined: 05 Mar 2003 Posts: 47
|
Posted: Fri Oct 31, 2003 3:22 pm Post subject: |
|
|
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 |
|
 |
lune
Joined: 01 Oct 2003 Posts: 24
|
Posted: Fri Oct 31, 2003 7:26 pm Post subject: |
|
|
Merci Archiguy  |
|
Back to top |
|
 |
|