• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ Contributions (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

Multiline input

Post a bug fix, a new feature, a theme ...

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
2 posts • Page 1 of 1

Postby olabri » Wed Feb 18, 2009 1:14 pm

Here is code to use multiline input of single line

in chat.html.tpl, change
Code: Select all
     <input type="text"
               id="pfc_words"
               title="<?php echo _pfc("Enter your message here"); ?>"
               maxlength="<?php echo $max_text_len; ?>"/>

to
Code: Select all
<textarea rows=1 cols=120
               id="pfc_words"
               title="<?php echo _pfc("Enter your message here"); ?>"
           maxlength="<?php echo $max_text_len; ?>"/></textarea>

in pfcommand.class.php add the following to first lines of function ParseCommand($cmd_str, $one_parameter = false)

Code: Select all
if (strstr ($cmd_str,"/send"))
    {
        $cmd_str= str_replace(array("n","t"),array("[br]","[tab]"), $cmd_str);
    }

in data/public/js/pfclient.js
in parseMessage: function(msg) before

Code: Select all
 // try to parse smileys
    var smileys = this.res.getSmileyHash();

(around line 1500) add

Code: Select all
 
msg = msg.replace(/[br]/g, '<br>');
msg = msg.replace(/[tab]/g, ' ');
olabri
Member
 
Posts: 14
Joined: Tue Jan 13, 2009 2:17 pm
Top

Postby rick001 » Wed Nov 09, 2011 11:07 pm

works gr8 though u might want to increase the row to 2 and decrease the cols to 65 if u are using the theme green but again one can easlily increase or decrese that to make sure that the input box doesnt overshoots the chat container. Thanks though :)

I was wondering if there was a way to add a drop down menu frm which an user can choose fonts and text size
Last edited by rick001 on Wed Nov 09, 2011 11:11 pm, edited 1 time in total.
rick001
Member
 
Posts: 35
Joined: Sun Oct 16, 2011 1:28 pm
Top


Post a reply
2 posts • Page 1 of 1

Return to Contributions (v1.x)

Who is online

Users browsing this forum: No registered users and 13 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
cron
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub