how to increase post title characters length

Discussion forum for MOD Writers regarding MOD Development.
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17079
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: how to increase post title characters length

Post by DavidIQ » Wed Dec 02, 2009 1:51 pm

As I already said:
DavidIQ wrote:After doing a search (ctrl+F) for "Subject" in the code you posted above, the code you need to modify is:

Code: Select all

   <td class="row2" width="78%"><input class="post" style="width:450px" type="text" name="subject" size="45" maxlength="<!-- IF S_NEW_MESSAGE -->60<!-- ELSE -->64<!-- ENDIF -->" tabindex="2" value="{SUBJECT}" /></td>
Notice the assignment of 60 and 64 to maxlength. As SyntaxError90 already said though, the max you can set it to is 255.
Change the maxlength to be 255 and you should be good to go. Not sure how else to tell you this...
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.

D12Eminem989
Registered User
Posts: 38
Joined: Thu Feb 05, 2004 10:35 pm

....

Post by D12Eminem989 » Sun Dec 13, 2009 9:14 pm

....
Last edited by D12Eminem989 on Wed Oct 31, 2012 9:27 am, edited 1 time in total.
Hi

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17079
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: how to increase post title characters length

Post by DavidIQ » Sun Dec 13, 2009 9:30 pm

Open functions_posting.php. Find these guys:

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);
That should do it now.
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.

D12Eminem989
Registered User
Posts: 38
Joined: Thu Feb 05, 2004 10:35 pm

....

Post by D12Eminem989 » Mon Dec 14, 2009 3:17 am

....
Last edited by D12Eminem989 on Wed Oct 31, 2012 9:27 am, edited 1 time in total.
Hi

jugaad
Registered User
Posts: 3
Joined: Wed Dec 16, 2009 11:53 am

Re: how to increase post title characters length

Post by jugaad » Thu Dec 17, 2009 4:53 pm

i have done changes in posting_body.html

<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" />

i did these changes

<input type="text" name="subject" id="subject" size="45" maxlength="<!-- IF S_NEW_MESSAGE -->251<!-- ELSE -->255<!-- ENDIF -->" tabindex="2" value="{SUBJECT}{DRAFT_SUBJECT}" class="inputbox autowidth" />

I'm able to write long subject which earlier was not possible:-) but after submit when i see Post subject: its again short :-(

i'm not able to change find this in functions_posting.php

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

Please give any solution??

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17079
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: how to increase post title characters length

Post by DavidIQ » Thu Dec 17, 2009 9:10 pm

jugaad wrote:$subject = truncate_string($subject);
$data['topic_title'] = truncate_string($data['topic_title']);
You MUST have these in functions_posting.php. Otherwise you wouldn't have the truncating problem. Look again...maybe each individually. They're there. Trust me.
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.

jugaad
Registered User
Posts: 3
Joined: Wed Dec 16, 2009 11:53 am

Re: how to increase post title characters length

Post by jugaad » Fri Dec 18, 2009 4:16 am

i found that in functions_posting.php

Code: Select all

$subject = truncate_string($subject);
$data['topic_title'] = truncate_string($data['topic_title']);
and change that to

Code: Select all

$subject = truncate_string($subject);
$data['topic_title'] = truncate_string($data['topic_title'], 255);
but still its not coming full in Post subject: Desaaaaaa faa Waaa ia Usuaaaa Hidaaa - Visualizataaa Techaaa

only 60 words are coming?????

in URL its showing full desaaaaaa-faa-waaa-ia-usuaaaa-hidaaa-visualizatiaa-techniqaaa-faa-desiaa-oa-autonomoaa-medaa-agenaa-t184.html

why its not showing full in post subject and title of the page???

desaaaaaa-faa-waaa-ia-usuaaaa-hidaaa-visualizatiaa-techniqaaa-faa-desiaa-oa-autonomoaa-medaa-agenaa


i have changed this file also posting_body.html as told by some users

<input type="text" name="subject" id="subject" size="45" maxlength="<!-- IF S_NEW_MESSAGE -->251<!-- ELSE -->255<!-- ENDIF -->" tabindex="2" value="{SUBJECT}{DRAFT_SUBJECT}" class="inputbox autowidth" />

i have done 60 to 251 and 64 to 255.

should i change this to same again means 251 to 60 and 255 to 64????????

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17079
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: how to increase post title characters length

Post by DavidIQ » Fri Dec 18, 2009 4:21 am

jugaad wrote:i found that in functions_posting.php

Code: Select all

$subject = truncate_string($subject);
$data['topic_title'] = truncate_string($data['topic_title']);
and change that to

Code: Select all

$subject = truncate_string($subject);
$data['topic_title'] = truncate_string($data['topic_title'], 255);
You've not done the other edit I posted...
DavidIQ wrote:

Code: Select all

 $subject = truncate_string($subject, 255);
$data['topic_title'] = truncate_string($data['topic_title'], 255);
Both lines get the 255 not just the second one.
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.

jugaad
Registered User
Posts: 3
Joined: Wed Dec 16, 2009 11:53 am

Re: how to increase post title characters length

Post by jugaad » Fri Dec 18, 2009 6:02 am

thankyou so much for quick reply and easy solution:-)

working fine for me hope its done please check

http://forums.projectsjugaad.com/integr ... -t185.html

Don Vito
Registered User
Posts: 89
Joined: Mon Jul 04, 2011 1:18 am

Re: how to increase post title characters length

Post by Don Vito » Sun Dec 04, 2011 4:24 pm

- Removed -

ender78
Registered User
Posts: 1
Joined: Tue Oct 30, 2012 5:36 pm

Re: how to increase post title characters length

Post by ender78 » Tue Oct 30, 2012 5:51 pm

And there is a final step, or at least there was for me: after modifying posting_editor.html and functions_posting.php you need to clear the cache.
phpBB creates cache files the first time any forum page is viewed and these cache files are used instead of the original files until you manually delete them. So after making the changes above, you'll need to delete the cache files to actually see a difference. Go to the cache sub-directory in your forums directory and just delete all the ctpl and tpl files—it's easier than figuring out which ones need to be deleted individually!
Thanks to Erika @ http://erikastokes.com/web-design/how-t ... -phpbb.php

And of course, thanks to everyone else who contributed in this post. You made my life a little better :D

mykkal
Registered User
Posts: 38
Joined: Wed Aug 31, 2005 12:06 am

Re: how to increase post title characters length

Post by mykkal » Sun Mar 24, 2013 4:20 pm

No idea why phpbb doesn't make this configurable. I guess they assume only advanced people use the software.

This is just as annoying as not re-sizing avatar images.

User avatar
ViolaF
Registered User
Posts: 1458
Joined: Tue Aug 14, 2012 11:52 pm

Re: how to increase post title characters length

Post by ViolaF » Sun Mar 24, 2013 6:40 pm

Its because of older Internet Explorer Versions.

Locked

Return to “[3.0.x] MOD Writers Discussion”