1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.1 Error Please enter a message with no more than 140 characters??

Discussion in 'XenForo Questions and Support' started by nguyenhuuhung, Aug 24, 2013.

  1. nguyenhuuhung

    nguyenhuuhung Active Member

    I encountered a error and i want to get the help of you.

    When i Send a message profile.An error occurred

    Please enter a message with no more than 140 characters.

    I want my message more than 140 characters.

    How do i install?

  2. nguyenhuuhung

    nguyenhuuhung Active Member

  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    It's hard-coded:


    	protected function _messagePreSave()
    		if ($this->get('user_id') == $this->get('profile_user_id') && $this->isChanged('message'))
    			// statuses are more limited than other posts
    			$message = $this->get('message');
    			$maxLength = 140;
    			$message = preg_replace('/\r?\n/', ' ', $message);
    			if (utf8_strlen($message) > $maxLength)
    				$this->error(new XenForo_Phrase('please_enter_message_with_no_more_than_x_characters', array('count' => $maxLength)), 'message');
    			$this->set('message', $message);
    aiman.h.kallaf and nguyenhuuhung like this.
  4. nguyenhuuhung

    nguyenhuuhung Active Member

    @Jake Bunce
    I have one more question related to the profile page
    I want to Down the line message on the profile page


    Can you help me?
  5. MattW

    MattW Well-Known Member

    From @Jake Bunce 's previous code snippet, it looks like the new line characters are being replaced with a space

    $message = preg_replace('/\r?\n/', ' ', $message);
    Jake Bunce likes this.
  6. sayden

    sayden Member

    1500 set it and it works.
    But how do I get this back:

  7. Jeremy

    Jeremy XenForo Moderator Staff Member

    Open xenforo.js and find "this.charLimit" and update the 140 there as well.
    Jake Bunce and sayden like this.
  8. sayden

    sayden Member

    Thanks! It works!

Share This Page