Is there a way in which I can increase or abolish the character limit on shouts, so that people can use the shoutbox to post long comments?

Comments

plato1123’s picture

I would also like to see this

konse’s picture

Version: 5.x-1.2 » 6.x-1.0

Had the same problem but in Drupal 6.x and found out, that you have to add something to the file:
sites/all/modules/shoutbox/shoutbox.module

Find the following code in shoutbox.module:

$form['message'] = array(
    '#type' => 'textfield',
    '#default_value' => $default_msg,
    '#size' => 15,
  );
 

And change it to this code:

 $form['message'] = array(
    '#type' => 'textfield',
    '#default_value' => $default_msg,
    '#size' => 15,
    '#maxlength' => 1000,
  );

Where 1000 is the amount of characters permitted.

mstef’s picture

Get on version 2.0. Admin's can set the maxlength.

mstef’s picture

Version: 6.x-1.0 » 6.x-2.0

And konse, that won't work because the database field also has a maxlength.

The 2.0 version lets you change the maxlength via the admin interface, but right now, it can only go as high as 255.

Think it should be higher?

kaspertor’s picture

Yeah really should be higher - The lenght of messages should be 500. I use shoutbox on a hockey site. And whould love to let people debate in long sentences

ilfelice’s picture

Subscribe

mstef’s picture

I'll have this done on the next commit

plato1123’s picture

I really think you should let admins set this number to whatever they want... maybe make it default to a 255 or 500 limit but some people might want 1000 or 1500 characters for a specific implementation. I did a site where the shoutbox was styled to be full width and was used for the day's announcements for an organization. These could sometimes be quite lengthy.

mstef’s picture

Version: 6.x-2.0 » 6.x-2.x-dev

well the problem is that it's stored in a database field, and you have to declare a size of that field - varchar(255), etc. i could change the field to a long blob of text so there really isn't a limit. do we think that's the best way to go?

mstef’s picture

i'm not sure if that will cause data loss from changing the field type on active sites.

mstef’s picture

Status: Active » Fixed

Committed: http://drupal.org/cvs?commit=404630

No limit on shouts now. Admin can still set a limit, but it can be anything.

plato1123’s picture

Awesome, you win! =)

mstef’s picture

haha thanks..

keep the feature requests coming - even though i've overloaded myself with them.

I'm actually aiming to release a 2.2 soon. I extended and organized the API by a ton - which will make shoutbox additions much much easier. I also noticed a ton of coding, themeing, and especially, javascript issues left behind from 1.x that needed to be fixed. This is really shaping up to be an awesome module. Stay tuned!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

kenneth001’s picture

i have shout box on a test site and the problem i run into is that the text runs off the screen, that is if i use too long of text it doesn't wrap the text, is there anything that i can do to get the text to wrap?