How to increase topic title length in 3.0.9[SOLVED]

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Anti-Spam Guide
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
M@verick
Registered User
Posts: 13
Joined: Thu Oct 29, 2009 4:35 pm

How to increase topic title length in 3.0.9[SOLVED]

Post by M@verick » Wed Jul 27, 2011 7:55 am

hello.

I have made the following changes but result is as it was before. I still couldnt post a lengthy topic title. please help

includes/functions_posting.php

Code: Select all

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

Code: Select all

	$subject = truncate_string($subject, 255);
	$data['topic_title'] = truncate_string($data['topic_title'], 255);
Last edited by Mick on Wed Jul 27, 2011 10:58 am, edited 2 times in total.
Reason: Topic icon changed

User avatar
Mick
Support Team Member
Support Team Member
Posts: 19589
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: How to increase topic title length in 3.0.9

Post by Mick » Wed Jul 27, 2011 9:01 am

Try this: (make backups of any files before you edit them)

Open: includes/functions_content.php and find:

Code: Select all

function truncate_string($string, $max_length = 100, $max_store_length = 255, $allow_reply = true, $append = '') 
Replace With:

Code: Select all

function truncate_string($string, $max_length = 200, $max_store_length = 255, $allow_reply = true, $append = '') 
$max_length = 100 this is the new limit change it to whatever you want eg.100 or 200.

Open: styles/prosilver/template/posting_editor.html and 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 60 and 64 with 100 respectively and don't forget to purge the cache.
"The more connected we get the more alone we become" - Kyle Broflovski

There are no ‘threads’ in phpBB, they are topics.

M@verick
Registered User
Posts: 13
Joined: Thu Oct 29, 2009 4:35 pm

Re: How to increase topic title length in 3.0.9[SOLVED]

Post by M@verick » Wed Jul 27, 2011 10:02 am

Thanks Mixstar :)

teou
Registered User
Posts: 14
Joined: Sat Nov 24, 2012 8:42 am

Re: How to increase topic title length in 3.0.9[SOLVED]

Post by teou » Tue Jan 01, 2013 10:09 am

Hi, i tried this on 3.0.11 and it works. Just some small notes:

1) function is changed a bit, so search for truncate_string only an you will find it.
2) In case you see for a second a red warning baloon on quickreply, also find in template file quickreply_editor

Code: Select all

<dd><input type="text" name="subject" id="subject-ns" size="45" maxlength="64" tabindex="2" value="{SUBJECT}" class="inputbox autowidth" /></dd>
and change 64 to your preferred value (remember, this is the max with Re: i.e. your value + 4 characters)
also in this file find

Code: Select all

						<dd><input type="text" name="subject" id="subject" size="45" maxlength="64" tabindex="2" value="{SUBJECT}" class="inputbox autowidth" /></dd>
and change there too.
Additionally, in file mcp_topic you can find

Code: Select all

		<dd><input type="text" name="subject" id="subject" size="45" maxlength="64" tabindex="2" value="{SPLIT_SUBJECT}" title="{L_SPLIT_SUBJECT}" class="inputbox" /></dd>
and change 64 there also.

PCTalk
Registered User
Posts: 259
Joined: Mon Jul 29, 2002 5:17 pm
Location: MD, USA
Contact:

Re: How to increase topic title length in 3.0.9[SOLVED]

Post by PCTalk » Fri Dec 06, 2013 7:48 pm

Sorry for Necro-posting, but this is just what I was looking for for v3.0.12. I have just made the changes and they appear to work well.

Thank you for this topic and thank you for a search function that works so well!
Visit PCTalk.info to see my teaching website.
Wildtangent has closed their forum. See my member created substitute at Wildtangent Fansite.
Support Request Template - Knowledge Base

User avatar
Dakoom
Registered User
Posts: 33
Joined: Sun Mar 08, 2015 12:24 pm

Re: How to increase topic title length in 3.0.9[SOLVED]

Post by Dakoom » Fri May 22, 2015 4:00 pm

Thank you guys!
currently working on Klayz.com. phpBB at klayz.com/community/

Locked

Return to “[3.0.x] Support Forum”

Who is online

Users browsing this forum: open-your-eyes, Yandex [Bot] and 71 guests