How to remove topic title length limit?

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Get Involved
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
rezpekt
Registered User
Posts: 11
Joined: Sun May 02, 2004 2:43 pm

How to remove topic title length limit?

Post by rezpekt »

Hi!

I have edited template files, I have changed database settings but it still keeps cutting off topic titles after 60 characters. Anybody have any idea where the problem could be? (I'm trying to raise the limit to 150 chars)

Thanks!
ameeck
Former Team Member
Posts: 6559
Joined: Mon Mar 21, 2005 6:57 pm

Re: How to remove topic title length limit?

Post by ameeck »

Does it omit the subject, or wont let you enter more than 60 chars right at the input?

If you have edited the templates, have you cleared the cachce via the acp and refreshed the template?

Is the post_subject column in the database type varchar(150) ? (default is 100)
rezpekt
Registered User
Posts: 11
Joined: Sun May 02, 2004 2:43 pm

Re: How to remove topic title length limit?

Post by rezpekt »

I can enter up to 150 chars to the title field. I have edited templates, purged cache, refreshed template.
I have also changed field length in phpmyadmin - yes its varchar(150)
ToonArmy
Former Team Member
Posts: 4608
Joined: Sat Mar 06, 2004 5:29 pm
Location: Worcestershire, UK
Name: Chris Smith
Contact:

Re: How to remove topic title length limit?

Post by ToonArmy »

They topic title is trimmed down in the code somewhere.
Chris SmithGitHub
rezpekt
Registered User
Posts: 11
Joined: Sun May 02, 2004 2:43 pm

Re: How to remove topic title length limit?

Post by rezpekt »

So could anybody help me?
ToonArmy
Former Team Member
Posts: 4608
Joined: Sat Mar 06, 2004 5:29 pm
Location: Worcestershire, UK
Name: Chris Smith
Contact:

Re: How to remove topic title length limit?

Post by ToonArmy »

Code: Select all

$ grep -nRi truncate_string . | grep subject
./includes/functions_posting.php:1506:  $subject = truncate_string($subject);
truncate_string()

Code: Select all

$ grep -nRi truncate_string . | grep "function "
./includes/functions.php:3450:function truncate_string($string, $max_length = 60, $allow_reply = true, $append = '')
Chris SmithGitHub
rezpekt
Registered User
Posts: 11
Joined: Sun May 02, 2004 2:43 pm

Re: How to remove topic title length limit?

Post by rezpekt »

Thanks! Problem solved, case closed! 8-)
ToonArmy
Former Team Member
Posts: 4608
Joined: Sat Mar 06, 2004 5:29 pm
Location: Worcestershire, UK
Name: Chris Smith
Contact:

Re: How to remove topic title length limit?

Post by ToonArmy »

No problem :)
Chris SmithGitHub
bluejam
Registered User
Posts: 2
Joined: Tue Jul 31, 2007 3:58 am

Re: How to remove topic title length limit?

Post by bluejam »

HI,

I've done this - it doesn't seems to work - still limits to 60 chars.

Out of interest - why is there such a short limit on characters?

(i've amended functions.php - do i need to refresh anything to make it work perhaps?)

Regards
ElbertF
Registered User
Posts: 527
Joined: Thu Mar 11, 2004 9:41 pm
Location: Australia
Contact:

Re: How to remove topic title length limit?

Post by ElbertF »

You'll need to change it in the HTML (maxlength) and database aswell.
bluejam
Registered User
Posts: 2
Joined: Tue Jul 31, 2007 3:58 am

Re: How to remove topic title length limit?

Post by bluejam »

re. maxlength - would you happen to know the specific file?

cheers
User avatar
Marshalrusty
Project Manager
Project Manager
Posts: 29334
Joined: Mon Nov 22, 2004 10:45 pm
Location: New York City
Name: Yuriy Rusko
Contact:

Re: How to remove topic title length limit?

Post by Marshalrusty »

styles\{your style}\template\posting_editor.html

In prosilver, the code block you would want to edit is:

Code: Select all

	<dl style="clear: left;">
		<dt><label for="subject">{L_SUBJECT}:</label></dt>
		<dd><input type="text" name="subject" id="subject" size="45" maxlength="64" tabindex="2" value="{SUBJECT}{DRAFT_SUBJECT}" class="inputbox" /></dd>
	</dl>
🇺🇦 Made in Ukraine, exported to the USA 🇺🇸

Have comments/praise/complaints/suggestions? Please feel free to PM me.

Need private help? Hire me for all your phpBB and web development needs
Csicso
Registered User
Posts: 25
Joined: Sat Oct 04, 2003 12:02 pm
Location: Brno
Contact:

Re: How to remove topic title length limit?

Post by Csicso »

Hello.

And how is it now, in RC7?
mattpist
Registered User
Posts: 5
Joined: Thu Oct 11, 2007 9:52 pm

Re: How to remove topic title length limit?

Post by mattpist »

i can't seem to find varchar in the database. im using RC7. can someone tell me what table it's in?
ameeck
Former Team Member
Posts: 6559
Joined: Mon Mar 21, 2005 6:57 pm

Re: How to remove topic title length limit?

Post by ameeck »

VARCHAR is not data of any kind, it is a type of collumn for holding relatively small strings(text).

The collumn is called post_subject. It is in the phpbb_posts table. If you access it through an interface like phpMyAdmin, you should see the data type in the Structure tab of the table page.
Locked

Return to “[3.0.x] Support Forum”