How to increase the Subject length in SMF 2.0.7
Never tried this... So, keep a copy of the file, as a backup, in case I'm wrong...
Post.template.php in the default theme's directory...
// Now show the subject box for this post.
echo '
<dt>
<span', isset($context['post_error']['no_subject']) ? ' class="error"' : '', ' id="caption_subject">', $txt['subject'], ':</span>
</dt>
<dd>
<input type="text" name="subject"', $context['subject'] == '' ? '' : ' value="' . $context['subject'] . '"', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="80" class="input_text" />
</dd>
Change " size="80" maxlength="80" class="input_text" /> to suit you. But, be prepared for things to look rather weird, if it does work. That maximum length's there for some good reasons. ;)
It is controlled in several places, actually.
In the database, the field type is VARCHAR(255) which means it can't store more than 255 characters.
In Post.template.php, the max lenght allowed for the input box is 80 characters.
In Post.php, the max lenght allowed is 100 characters (taking in consideration special characters)
So, as long as you don't want to use more than 255, the change is more or less easy to accomplish
edit: ninja'd :P
I've ever tried my way, Bruno. I may have typed a load of old bollox. :)
You did not. That's exactly what to change in my second point. But, there's a bit more to it ;)
I surprised myself, then. :)
Quote from: margarett on March 20, 2014, 02:56:12 PM
It is controlled in several places, actually.
In the database, the field type is VARCHAR(255) which means it can't store more than 255 characters.
In Post.template.php, the max lenght allowed for the input box is 80 characters.
In Post.php, the max lenght allowed is 100 characters (taking in consideration special characters)
So, as long as you don't want to use more than 255, the change is more or less easy to accomplish
edit: ninja'd :P
Hi, do you know if there is any mod to do it? I've been searching but find nothing. Thanks.
Nope. I don't think such a mod exists and I doubt it ever will, because doing such things can cause some pretty serious layout problems.
'course, someone might just go and prove me wrong. You never know. :)
there is no Post.php in the SMF 2.0.7
As for as the database tweak is neccessary, and the theme edit also, but depends on the layout you use, wide screens will do in most cases correct... responsive templates
for the rest there can be some theme tweaking in CSS and your Template files you USE !!
Quote from: arasahmed on March 20, 2014, 02:07:53 PM
How to increase the Subject length in SMF 2.0.7
/Sources/Post.php
FTP / SSH to your folder of SMF within find the /Sources folder... there it is :)
There has been a mod made for this.
Quote from: NekoJonez on April 05, 2014, 06:12:24 AM
There has been a mod made for this.
Can you give us the link of the MOD ?
http://custom.simplemachines.org/mods/index.php?mod=328
Well, it's not for 2.X :/