Is there a way to limit shoutbox text entry? That is, the actual number of characters entered -- like say a max of 200 or so characters... or something like that? Am I being clear? augh!
::)
If this has already been addressed then I apologize as I'm not finding the answer when I do a search and I'm finally just ending up frustrated.. but still have no answer...
TIA!
;)
Lori
EDIT: Well... I'm sorry but now that this is here I suspect I should've posted it in Support or maybe Resources... but I'm not finding any way to move it. Sorry.
:(
Some days...
:o
EDIT#2:
Not sure that this info will help, but... fwiw...
:D
What is your url? http://myfibrofriends.org
What error message do you get?
n/a ?? FWIW... Following are repeating errors...
/index.php?action=tpmod;sa=shoutbox
Apply Filter: Only show the errors with the same message
8: Undefined index: user_id
File:
/Themes/default/TPmodules.template.php (eval?)
Line: 24
/index.php?action=tpmod;sa=shoutbox
Apply Filter: Only show the errors with the same message
8: Undefined index: user_id
File:
/Themes/default/TPmodules.template.php (eval?)
Line: 25
8: Undefined index: user_id
/Themes/christmas2006_11_tp/BoardIndex.template.php (eval?)
Line: 24
8: Undefined index: user_id
/Themes/christmas2006_11_tp/BoardIndex.template.php (eval?)
Line: 25
What version of SMF? Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC
What version of TP? TinyPortal v0.9.8 © Bloc
Which themes are used?
Christmas2006 design by Bloc
Do you have other Mods installed? Yes. (Do you want a list? There are a lot... LOL)
Do you use another CMS? (Joomla or Mambo?) not with this site
If yes, which one? n/a
Is this a test site? no.
Moved it for you Lori. ;)
I did some searching on your question here and on SMF but don't have an answer for you at this point, sorry.
TY, Ken, for the move. Greatly appreciate it! Just HATE when I do stuff like that!
And TY also for the search. Not the answer I want but also nice to know I'm not just losing my mind!
:idiot2:
I've got a couple posters that talk on & on in the shoutbox and don't seem to even know about the Enter key. AUGH!
Anyway, thanks for the assist! Greatly appreciate it! ;)
Lori
There are ways to deal with folks who won't listen to your requests or rules... one example would be to create a member group with limited permissions. They could still use the shout box, but you could restrict other activities if you wish to do so.
Of course you may not wish to hurt their feelings, but if they don't listen to you then they are hurting yours. ;)
oh man. You got that right, Ken. New member; really ticks me off. Inconsiderate. States she "knows" things (prior-to-joining-this-forum knowledge) but asks the questions; (obviously) doesn't look at the FAQs when the answers are there, etc. grrr.
>:(
We try to keep the rules pretty loose for the group; they've got a lot of 'brain issues' so you pretty much have to do it that way so no one's set up to fail. But guess I'm just gonna have to deal with her directly. Not a good way to start out really. If she doesn't reel it in fast, I'll be more than happy to make a special group just for her! LOL
:o
Not all THAT concerned about hurting her feelings at this point. I don't want to chase her away; just play nicely with others! Don't want to be rude.. but.. firm I guess you could say.
Anyway, thanks for the words/encouragement, Ken. Really appreciate it. Any ideas on what other activities could I limit her on that would really matter though? She's already posted 42x & has only been a member 4 days now (augh); has an opinion on everything. LOL
::)
I'm still very new to SMF & TP so any ideas would be greatly appreciated there too!
Anyway, thank you so much, Ken!
Lori
Lori, let me just say this. I LOVE YOU! lol I cannot thank you enough for that first post. You followed the guidelines to a "T". I cannot tell you how much easier it is for me to help you when you do that. In fact, it floored me when I read your post. I actually asked myself, "How could I not help this person after that?". You've sparked an idea in me for the way we do support around here, so I'm going to suggest an idea to the team. :) So, now that I'm done making you blush I will answer your question. :D
This is not something that is built into TP so it would have to be custom coded. You would have to add some javascript to detect it as you type or something. If you really want this to work someone will have to custom code it for you. Here's a bit of information on how it can be done.
http://www.cs.tut.fi/~jkorpela/forms/textarea.html#realtime
Well, you're a darlin' too, IchBin! Hey -- I just posted it.. then it occurred to me that I hadn't read the posting directions recently and then I edited it to follow ya'll's directions! Was a tiny bit cumbersome but only because I had to shift my paradigm a tad! LOL Blushing complete!
:D
Hey -- I do not care what it takes honestly -- I'm just that frustrated! These folks in that forum are great but, they seriously have cognitive & other health issues. I've gotta save them from themselves and for the rest of us too (mostly for my sanity frankly!) LOL
I've PM'd her to pls reel it in and I'm gonna adapt our FAQs but it'd be easier if the coding limits her automatically. I've been trying to decide what's a reasonable length for a shout -- looks like it's somewhere around 22-30? characters per line (in a block) -- don't know how rigid or accurate that is... Guess that'd be variable by the width of the column/block it's in actually... hmmm...
In the PM I told her a shout should only be a couple lines or so; if longer, it should go in a post. I don't want to be rabid about it but... gee whiz! Guess I need to figure out a character limit to set to be accurate really... hmmm... Thing is, she's not the first & won't be the last to go past that imaginary (read: my self-imposed!) text limit.
Anyway, TY! I'll look over the link and see what I can figure out.
TY & take good care, IchBin!
;)
Lori
omapie... been looking at you site and scrolling through the entries in your shout box and I think that I spotted your 'offender'. ;)
This comment is JMHO but why worry?
To me it's seems OK and the fact that she (and others) are a bit long winded in the shout box is great because it gives you lots of activity.
Of course you may need to consider installing a Chat to give the shout box a break!
Encouraging her to do her posting in the boards would be a good thing, but I wouldn't try to reign her in, but again thats just me.
I agree with Ken, Omapie.. thing is, she is new to your site, and of course, just like (how the guys say ;) us fems like to ramble at times) eventually she will wind down, but yes keep encouraging her to post on the forum, i think things will be fine.. if not then you know you can do other options now.. :D
Hey Ken, Smoky!
Well THAT is a really good point isn't it! We have this recent one but have had a couple in the past also. But as you say -- a good thing re activity. That back & forth talk IS the point of a forum isn't it! LOL
:2funny:
Yes re chat. Been trying to do that very thing & been pretty buggered up with it for the most part (augh!)!
Thank you all for the extra perspective. I really appreciate it! And it's a really, really good point about the long-windedness! (no need to be too control-freakish about it is there OY!! LOL)
:idiot2:
Boy do I have a lot to learn about forums & their operation! It's been a real challenge because we've had just tremendous growth over the last month or 2 so it really, REALLY helps to get outside perspectives like this! Again, thank you! And thank you to TinyPortal for not only a fantastic product but, imho, a fantastic forum too with a great group of folks -- truly better than most of the more technically-oriented forums I've seen (or participated in) in the past!
:)
Hugs!
Lori
What do you want is to limit the no. of characters which can be posted in shoutbox? Something like 200?
I don't think so this should be hard.
That was my thought -- around 200 or so. I'd kinda thought it wouldn't be so hard at first but the more I looked at the link given earlier by IchBin, the more I decided maybe I should just talk to her for now and come back to that later! Little overwhelmed at the moment. OY!
:o
Yes. I was kinda thinking it wouldn't be so hard too .. but obviously (for my current skillset! LOL)... I'm just NOT quite there right now! LOL :2funny:
;)
Lori
OK here is a quick hack
in TPmodules.php
find
$shout=strip_tags(substr($_POST['tp-shout'],0,300),'<b><u><i>');
And add before
global $func;
if($func['strlen']($_REQUEST['to-shout']) > 200)
redirectexit($scripturl);
Didn't tested it though,
Found that line but not sure what this part means.
Quote
And add before
Code:
global $func;
if($func['strlen']($_REQUEST['to-shout']) > 200)
redirectexit($scripturl);
Does that mean to add that section of code before the line of code just found or ??? Sorry. Been up way too many hours running and my head is just ... being ... dense! LOL
There ya go -- an if statement is what was going through my head when I thought it might not be so hard to change...
Understand not tested... One way or the other, TY for trying. ;)
Lori
Yes, Add that code before that line of code.
cool. will try that right now.
;)
Okay. So if I understood correctly,
the line of code:
$shout=strip_tags(substr($_POST['tp-shout'],0,300),'<b><u><i>');
would change to:
global $func;
if($func['strlen']($_REQUEST['to-shout']) > 200)
redirectexit($scripturl);
$shout=strip_tags(substr($_POST['tp-shout'],0,300),'<b><u><i>');
Is that correct?
Yup
Okay. If I got that correct, then it may be close... LOL
1. I have a line of 20 characters. Can't remember if a hard return counts as a character in counting (LOL).
2. I entered that line 10x for a total of 200 char (w/hard return NOT counting as a character).
3. Then it allowed another 30, 2 more lines @20 and the final line before it cut me off was 3 char.
4. So let's see if I can count here! NOT counting hard returns, that's the original 200 + 73 = 273
--- I believe 13 hard returns if that matters. checking it again now...
Well just did it again -- a couple more times actually! Think it let me get something like 79 or so over. My eyes are crossing so I'm probably miscounting at this point! LOL
I think 270 on this last one. ugh.
Logic check though: Shouldn't it be the same number each time -- the same as: if you were counting some specific number of coins 5 different times, then should return the same quantity each time?
It let me keep typing -- just didn't put out in shoutbox more than that! Cool! I'm liking this! LOL
:2funny:
(control freak that I am huh!)
:laugh:
So that's where we're at! Making ANY sense here?
::)
Lori
It should be global $func;
if($func['strlen']($_REQUEST['tp-shout']) > 200)
redirectexit($scripturl);
Lol :P
yay 500th post! :P
OK. So I should eliminate the line:
$shout=strip_tags(substr($_POST['tp-shout'],0,300),'<b><u><i>');or am I just not seeing some character that I've missed in this code?
global $func;
if($func['strlen']($_REQUEST['tp-shout']) > 200)
redirectexit($scripturl);
Congrats on the 500th post, Dragoon! :up:
;D
Again, thank you!
Lori
LOL!
No no, Don't eliminate that line.
Just add that chunk of code before that line.
scared ya there, huh! LOL (sorry)
will try again now! ;)
ah ha!
Okay. So if it's under 200, it posts.
If it's over, it kicks you back to the front page.
That's what it should do... right? (that's what the "redirectexit" means -- yes?)
Nifty!
And now I know how/where to change it to more characters if it turns out that amount is a problem! LOL
coool!
:)
I just love it when things work!
Yup thats what it should do.
Glad I could help and sorry for less descriptive answers.
No, that was and you ARE phenomenal, Dragoon! Fantastic! No need to apologize -- sorry I couldn't "get it" faster!
Thank you so much -- I really appreciate it! Now I'm just debating on if I should set it for a longer amount! LOL
Ah well. You're great! Thank you so much for your time & effort (& patience! LOL) in this!
;D
Hugs!
Lori