News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Increasing 'Subject' field length

Started by pittu, June 01, 2015, 01:42:52 PM

Previous topic - Next topic

pittu

smf_messages > 'subject' column > its 255 characters. Right?

But the subject is getting truncated and only having 80 characters. why?

thnx.

pittu


Kindred

no, the limit is 80 characters by default -- and should never be set to 255, even if you increase it - it should never be set higher than 240, I believe...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Steve

DO NOT pm me for support!

pittu

I just increased the 'maxlength' for Subject input field in Post.template.php

I didn't change any other source files or database.

That is fine?

Kindred

nope...   if you just increased them template, it will still be truncated -- and might even be truncated oddly, because of special characters.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

pittu

Quote from: Steve on June 01, 2015, 02:40:09 PM
http://www.simplemachines.org/community/index.php?topic=520075.0

I changed Post.template.php in Themes > Default directory to reflect maxlength as 150.

If I update Sources/Post.php (according to the thread mentioned above) to 180 to allow special characters , that is enough?

I don't mind different subject lines different length truncation etc.

thnx.

Kindred

yes, that would probably be ok...   although I fail to see why you would need such a long title...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

pittu

Where exactly I need to increase the subject characters in Sources/Post.php ?

Advertisement: