by HowNow » 28 Sep 2017, 20:15
The following tutorial will show how to increase the topic subject maximum characters length in PhpBB-driven discussion website or forum.
phpbb-topic-subject-line.jpg
phpbb-topic-subject-line.jpg (48.89 KiB) Viewed 1932 times
By default, the subject line maximum character length is 60 in PhpBB 3.0 and so the system truncates anything longer than that. But with this guide, you can increase the length from 60 to 100 characters. This guide is based on Prosilver template. We do not need to touch SQL tables if we do not plan to exceed 100 character, which I think is decent enough.

STEPS TO INCREASE PHPBB TOPIC SUBJECT LINE MAXIMUM CHARACTERS LENGTH TO 100
1. Open: includes/functions_posting.php
Find:

Code: Select all

$subject = truncate_string($subject, 60);
$data['topic_title'] = truncate_string($data['topic_title'], 60);
Replace with:

Code: Select all

$subject = truncate_string($subject, 100);
$data['topic_title'] = truncate_string($data['topic_title'], 100);
Save the file.

2. Open: styles/prosilver/template/posting_editor.html
Find:

Code: Select all

<dd><input type="text" name="subject" id="subject" size="45" maxlength="<!-- IF S_NEW_MESSAGE -->60<!-- ELSE -->64<!-- ENDIF -->" tabindex="2" value="{SUBJECT}{DRAFT_SUBJECT}" class="inputbox autowidth" /></dd>
Replace with:

Code: Select all

<dd><input type="text" name="subject" id="subject" size="45" maxlength="<!-- IF S_NEW_MESSAGE -->100<!-- ELSE -->104<!-- ENDIF -->" tabindex="2" value="{SUBJECT}{DRAFT_SUBJECT}" class="inputbox autowidth" /></dd>
Save the file.

And that's it. You have successfully increased the subject line maximum characters limit from 60 to 100 in PhpBB.

Share and comment below.