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

user unable to save signature

Discussion in 'XenForo Questions and Support' started by Ryan Kent, Mar 30, 2011.

  1. Ryan Kent

    Ryan Kent Well-Known Member

    While troubleshooting an issue, I tried to save a signature and received an error. I copied/pasted this sig into the signature message box. I have copied/pasted my sig and it worked fine. Another user is using this sig and it works fine as well. The sig is 16 kb.

    SigError.JPG
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Signatures are subject to this length:

    Admin CP -> Home -> Options -> Messages -> Maximum Message Length
     
  3. Ryan Kent

    Ryan Kent Well-Known Member

    I understand. My maximum message length is set to 15,000. But this is a copy/paste of a single image with no text typed.
     
  4. James

    James Well-Known Member

    I must say I haven't played with signatures but are you telling me that the signature maximum length has to be the same size as the message maximum length? That doesn't seem very ideal... I don't fancy 10-15,000 characters and I don't fancy 100 character posts... :confused:
     
    ragtek likes this.
  5. ragtek

    ragtek Guest

    The max length is set in the DW
    PHP:
    'signature'  => array('type' => self::TYPE_STRING'default' => '''maxLength' => 65535),
     
  6. ragtek

    ragtek Guest

    No, they aren't

    The signature doesn't have a htmlcharacterlimit, => so it gets the defaultvalue => -1
    Because of this, the limit is set to 4* messageMaxLenght;)

    PHP:
    public function getMessageText($inputNameXenForo_Input $input$htmlCharacterLimit = -1)
    if (
    $messageTextHtml !== '')
    {

    if (
    $htmlCharacterLimit 0)
    {
    $htmlCharacterLimit XenForo_Application::get('options')->messageMaxLength;
    // quadruple the limit as HTML can be a lot more verbose
    }

    if (
    $htmlCharacterLimit && utf8_strlen($messageTextHtml) > $htmlCharacterLimit)
    {
    throw new 
    XenForo_Exception(new XenForo_Phrase('submitted_message_is_too_long_to_be_processed'), true);
    }
     
  7. Ryan Kent

    Ryan Kent Well-Known Member

    I appreciate your replies. Does anyone know why that error message is appearing in this case when I copy/paste a single image? I have copied/pasted images before in the signature box and it has worked fine. Actually, my current sig of DrHouse below is an image copy/paste.
     
  8. James

    James Well-Known Member

    Once you copy and paste the image, switch to the plaintext editor and report what you see (if anything). Just a hunch.
     
    Oracle likes this.
  9. Ryan Kent

    Ryan Kent Well-Known Member

    very good call. It starts off with http://www.terapvp.com/community/data:image/png;base64

    then it continues with thousands of random characters. Not sure why it is doing that, but it is clearly the issue. I'll try a work around.
     
  10. James

    James Well-Known Member

    It's encoding the image as base64 instead of showing the actual link to the image. Your best bet is to use [IMG]linktoimage[/IMG]
     
  11. Ryan Kent

    Ryan Kent Well-Known Member

    noob question...that means I need to upload the image to a host and paste the link, correct? I can't just copy/paste?
     
  12. Brogan

    Brogan XenForo Moderator Staff Member

    Yes, to your own server would be best.
    Or you can attach it to a post, in your admin forum for example and embed it from there.
     
    Oracle likes this.
  13. James

    James Well-Known Member

    I take it you were copying the image from your local computer? That's why your limit is exceeding, because the image is base64 encoded and basically just created using codes (thousands upon thousands of them).

    Upload the image to your server and link to it from there :)
     
    Oracle likes this.
  14. Ryan Kent

    Ryan Kent Well-Known Member

    perfect, tested and it works, ty both
     
  15. Binari0

    Binari0 Member

    Where put this code? Works to limit the signatures to 255 Characters?
     

Share This Page