I don't know if the devs are going to add an option to display a button in the future or not, but I needed a quick solution now.
So if anyone else needs a button, here is a patch for 0.9.3.
Disclaimer: this is a really ugly (and possibly not safe) hack of a lazy man who knows neither php nor javascript. So use at your own risk.
- Code: Select all
Index: themes/default/templates/chat.html.tpl.php
===================================================================
--- themes/default/templates/chat.html.tpl.php (revision 1333)
+++ themes/default/templates/chat.html.tpl.php (working copy)
@@ -18,7 +18,21 @@
</div>
<div id="<?php echo $prefix; ?>input_container">
- <input id="<?php echo $prefix; ?>words" type="text" title="<?php echo _pfc("Enter your message here"); ?>" maxlength="<?php echo $max_text_len-25; ?>" />
+ <input id="<?php echo $prefix; ?>words" type="text" title="<?php echo _pfc("Enter your message here"); ?>" maxlength="<?php echo $max_text_len-25; ?>" />
+
+ <script type="text/javascript">
+ function fakeKeyEvent(){
+ this.keyCode=13;
+ }
+ function fireFakeKeyEvent(){
+ var fakeKeyEvt=new fakeKeyEvent();
+ window.pfc.callbackWords_OnKeypress(fakeKeyEvt);
+ }
+ </script>
+ <input type="button" value="Send" style="border:black solid 1px; padding:0 4px 0 4px; color:black; background-color:#CCCCCC; text-align:center; margin-top:3px; margin-bottom:2px;" onclick="fireFakeKeyEvent();">
+
+
+
<div id="<?php echo $prefix; ?>cmd_container">
<input id="<?php echo $prefix; ?>handle" type="button" title="<?php echo _pfc("Enter your nickname here"); ?>" maxlength="<?php echo $max_nick_len; ?>" value="<?php echo $nick; ?>" onclick="if (!pfc.isconnected) return false; pfc.el_words.focus(); pfc.handleRequest('/asknick');" />
<div class="<?php echo $prefix; ?>btn"><img src="<?php echo $c->getFileUrlFromTheme('images/logout.gif'); ?>" alt="" title="" id="<?php echo $prefix; ?>loginlogout" onclick="pfc.connect_disconnect()" /></div>