News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

How to increase subject width in 2.0 RC1

Started by keltron, February 07, 2009, 05:05:31 PM

Previous topic - Next topic

keltron

Hi,

I just installed 2.0 RC1 and I can't find a way to increase the subject width in the subject field. It stops at about 82 characters and I cannot make it longer, to say over 100. I have searched all over these forums, and changed numbers in Sources/Post.php to 150 and in Sources/Subs-BoardIndex.php from 24 to 150 (Also tried setting 24 to 20 to see if it affected the subject length, but it did not).

I saw an old post that said change the 24 in Boardindex.php, but it appears to no longer be in there.

Is there any way to lengthen the subject line. I saw a mod for this but it was for older SMF versions.

Any help would be greatly appreciated.   

Kermit

Themes/default/Post.template.php

Code (find) Select

<td>
<input type="text" name="subject"', $context['subject'] == '' ? '' : ' value="' . $context['subject'] . '"', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="80" />
</td>


Code (replace with) Select

<td>
<input type="text" name="subject"', $context['subject'] == '' ? '' : ' value="' . $context['subject'] . '"', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="xx" />
</td>


and

Sources/Post.php

Code (find) Select

// At this point, we want to make sure the subject isn't too long.
if ($smcFunc['strlen']($_POST['subject']) > 100)
$_POST['subject'] = $smcFunc['substr']($_POST['subject'], 0, 100);



Code (replace with) Select

// At this point, we want to make sure the subject isn't too long.
if ($smcFunc['strlen']($_POST['subject']) > xx)
$_POST['subject'] = $smcFunc['substr']($_POST['subject'], 0, xx);

xx should be replaced with your wish maxlength for topic subject
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein


aldo

Just be aware that TINYTEXT is limited to the maximum length of 255... I don't think you would make it that big, but just a good idea to let you know :)

keltron


Kermit

Quote from: aldo on February 07, 2009, 05:25:34 PM
Just be aware that TINYTEXT is limited to the maximum length of 255... I don't think you would make it that big, but just a good idea to let you know :)

It won't be hard to increase that as well  :P
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

keltron

#6
Quote from: Duncan85 on February 07, 2009, 05:32:42 PM
Quote from: aldo on February 07, 2009, 05:25:34 PM
Just be aware that TINYTEXT is limited to the maximum length of 255... I don't think you would make it that big, but just a good idea to let you know :)

It won't be hard to increase that as well  :P

Good to know there's hope for some.  :)

One other question: Can the "Recent Posts" topic lengths be increased to reflect the increase in the Subject Field?

For example, instead of:

Joe's Forums - Recent Posts

City waiting, watching Westboro Baptist Church's lawsuit against sta (City Business )
    Today at 03:30:19 PM

This:

Joe's Forums - Recent Posts

City waiting, watching Westboro Baptist Church's lawsuit against state by Cindy Lou (City Business )

I tried changing the subject length in "Recent.php", but it didn't work.

Any way to correct this?

Thanks in advance for any suggestions.
    Today at 03:30:19 PM

Kermit

Sources/Recent.php

'short_subject' => shorten_subject($row['subject'], 24),


Have you already tried to increase that ? also the 24
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

keltron

Quote from: Duncan85 on February 07, 2009, 05:59:18 PM
Sources/Recent.php

'short_subject' => shorten_subject($row['subject'], 24),


Have you already tried to increase that ? also the 24

Yes,  but didn't lengthen the Recent Post. 

Kermit

Hmm weird,can you attach your BoardIndex.template.php file
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

keltron


Kermit

My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein


Kermit

Really weird,as per your BoardIndex.template.php the subject should not be showned as shorten_subject

Are you sure,that you've attached the right BoardIndex.template.php,i mean the BoardIndex.template.php of the theme,which you're using on your site
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

Advertisement: