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

\"max_text_len\" related question

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

Post a reply
4 posts • Page 1 of 1

Postby vlzvl » Thu Dec 22, 2011 12:22 am

hello and tx for your work :)

just a quick question,
I need to have specific rules/permissions by user types in my chat and one of
the restrictions is to -not- allow him to to type more than eg. 5 characters.
I find out that "max_text_len" might do the trick but i found this is "global"
variable so anyone would type <5 characters.

Is there a nice pfc way to sort this or need to do a special session check
(by user type) to change the <input> message bar 'maxlength's value via JS?

thank you.
PS. sorry for my freaky english :)
vlzvl
New member
 
Posts: 9
Joined: Sat Dec 17, 2011 2:24 pm
Top

Postby re*s.t.a.r.s.*2 » Thu Dec 22, 2011 1:32 am

Hi,

I think is possible to do it with the parameter $params['dyn_params'],

You need to set $params['max_text_len'] to be dynamic and not be cached anymore for everybody..

I would do something like so:

Code: Select all
$params['dyn_params'] = 'max_text_len';

if($this->user_writeLength <= 5)$params['max_text_len'] = 5;

something along those line, see if that works..

Make sure you rehash the chat..

best regards
Free Singles Chat Rooms No Registration Required
Text and Chat Singles no need to register or app required
Sala De Bate Papo Online Grátis E Sem Cadastro
re*s.t.a.r.s.*2
Support Team
 
Posts: 612
Joined: Wed Sep 24, 2008 4:04 pm
Location: los angeles CA
  • Website
Top

Postby vlzvl » Thu Dec 22, 2011 2:01 am

dyn_params:
Most of the chat parameters are stored in a internal cache for performances issues. It means that for all the clients the chat will have the same parameters...

dang :)
i should read more thoroughly the params!
great help as usual, thank you
vlzvl
New member
 
Posts: 9
Joined: Sat Dec 17, 2011 2:24 pm
Top

Postby marcuseward » Mon Jan 23, 2012 2:48 am

I would also want to say thanks! You have done a great job!
Useful info about health insurance that covers pre existing conditions&ohio state life insurance.
marcuseward
New member
 
Posts: 1
Joined: Mon Jan 23, 2012 2:39 am
Top


Post a reply
4 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 19 guests

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