• 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

Ryan Kent

Well-known member
#1
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
 

James

Well-known member
#4
Signatures are subject to this length:

Admin CP -> Home -> Options -> Messages -> Maximum Message Length
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:
 
R

ragtek

Guest
#5
The max length is set in the DW
PHP:
'signature'  => array('type' => self::TYPE_STRING, 'default' => '', 'maxLength' => 65535),
 
R

ragtek

Guest
#6
Signatures are subject to this length:

Admin CP -> Home -> Options -> Messages -> Maximum Message Length
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($inputName, XenForo_Input $input, $htmlCharacterLimit = -1)
if ($messageTextHtml !== '')
{

if ($htmlCharacterLimit < 0)
{
$htmlCharacterLimit = 4 * 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);
}
 

Ryan Kent

Well-known member
#7
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.
 

Ryan Kent

Well-known member
#9
Once you copy and paste the image, switch to the plaintext editor and report what you see (if anything). Just a hunch.
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.
 

James

Well-known member
#10
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]
 

Ryan Kent

Well-known member
#11
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]
noob question...that means I need to upload the image to a host and paste the link, correct? I can't just copy/paste?
 

Brogan

XenForo moderator
Staff member
#12
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.
 

James

Well-known member
#13
noob question...that means I need to upload the image to a host and paste the link, correct? I can't just copy/paste?
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 :)
 
#15
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($inputName, XenForo_Input $input, $htmlCharacterLimit = -1)
if ($messageTextHtml !== '')
{

if ($htmlCharacterLimit < 0)
{
$htmlCharacterLimit = 4 * 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);
}
Where put this code? Works to limit the signatures to 255 Characters?