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.
Suggested Hosts
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 »

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: 26551
Joined: Fri Aug 29, 2008 9:49 am

Re: How to increase topic title length in 3.0.9

Post by Mick »

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©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
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 »

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 »

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 »

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 »

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

Return to “[3.0.x] Support Forum”