2006-12-29, 11:46 PM
Pages: 1 2
2006-12-31, 04:13 AM
Try this modification
In newreply.php, find:
In newreply.php, find:
// Set the thread data that came from the input to the $thread array.
Above it, add:if(empty($mybb->input['subject']))
{
$mybb->input['subject'] = substr($mybb->input['message'], 0, 30);
$mybb->input['subject'] .= (strlen($mybb->input['message']) > 30) ? '...' : '';
}
2006-12-31, 04:53 AM
DennisTT Wrote:Try this modification
In newreply.php, find:
Above it, add:// Set the thread data that came from the input to the $thread array.
if(empty($mybb->input['subject'])) { $mybb->input['subject'] = substr($mybb->input['message'], 0, 30); $mybb->input['subject'] .= (strlen($mybb->input['message']) > 30) ? '...' : ''; }
I'm sorry, I do not see that comment in newreply.php. The closest I see is // Set the post data that came from the input to the $post array.
2006-12-31, 05:06 AM
I meant newthread.php, please smack me.
2006-12-31, 05:35 AM
DennisTT Wrote:I meant newthread.php, please smack me.
thank you very very much
2006-12-31, 05:41 AM
How would I change the default length of the subject so that I can add more chars using this code?
2007-01-01, 10:22 PM
elodge4 Wrote:How would I change the default length of the subject so that I can add more chars using this code?
Change the two instances of the number 30 in the code modification
2007-01-02, 12:16 AM
DennisTT Wrote:elodge4 Wrote:How would I change the default length of the subject so that I can add more chars using this code?
Change the two instances of the number 30 in the code modification
right, I get that, but if I change them to a number, say 200, then 200 char's do not get displayed so there must be a limit set somewhere else
thanks
2007-01-02, 01:03 AM
thnks........
2007-01-02, 08:01 AM
elodge4 Wrote:DennisTT Wrote:elodge4 Wrote:How would I change the default length of the subject so that I can add more chars using this code?
Change the two instances of the number 30 in the code modification
right, I get that, but if I change them to a number, say 200, then 200 char's do not get displayed so there must be a limit set somewhere else
thanks
There's a hard limit to the length a subject can be (by default): 120 characters. If you want longer ones, you will need to run an SQL query
run this SQL code in phpMyAdmin?
ALTER TABLE `swcforums_threads` CHANGE `subject` `subject` VARCHAR( 120 ) NOT NULL
(Remember to replace any instance of mybb_ with your forum's database table prefix, if different)Pages: 1 2