Page 1 of 2

Post a longer subject length?

Posted: Sun Jun 08, 2008 1:09 am
by yhelp
Can any one make one or tell me how to edit the code so users can post a longer title in a new topic?

Subject length limiting to 60 characters if first post...

I want it 2 be about 120?

Re: Post a longer subject length?

Posted: Sun Jun 08, 2008 2:19 am
by yhelp
Dose not matter i found the files i need to edit. If you a phpbb user and need to do the same thing all you need to do it this:

OPEN
styles/YOURTEMPLATE/template/posting_editor.html
FIND
<dd><input type="text" name="subject" id="subject" size="45" maxlength="64" tabindex="2" value="{SUBJECT}{DRAFT_SUBJECT}" class="inputbox" /></dd>
IN-LINE FIND
64
IN-LINE REPLACE WITH
250
OPEN

includes/functions_posting.php

IN-LINE FIND
$subject = truncate_string($subject);
IN-LINE REPLACE WITH
$subject = truncate_string($subject, 250);

Re: Post a longer subject length?

Posted: Fri Jun 13, 2008 3:16 pm
by furman
Hi,
I followed the instructions, my code was slightly different:

Code: Select all

	<!-- IF S_POST_ACTION or S_PRIVMSGS or S_EDIT_DRAFT -->
	<dl style="clear: left;">
		<dt><label for="subject">{L_SUBJECT}:</label></dt>
		<dd><input type="text" name="subject" id="subject" size="60" maxlength="<!-- IF S_NEW_MESSAGE -->120<!-- ELSE -->124<!-- ENDIF -->" tabindex="2" value="{SUBJECT}{DRAFT_SUBJECT}" class="inputbox autowidth" /></dd>
	</dl>
		<!-- IF S_CONFIRM_CODE -->
I still can't enter more than 60 characters.

Re: Post a longer subject length?

Posted: Fri Jun 13, 2008 4:16 pm
by mr.beery
furman wrote:Hi,
I followed the instructions, my code was slightly different:

Code: Select all

	<!-- IF S_POST_ACTION or S_PRIVMSGS or S_EDIT_DRAFT -->
	<dl style="clear: left;">
		<dt><label for="subject">{L_SUBJECT}:</label></dt>
		<dd><input type="text" name="subject" id="subject" size="60" maxlength="<!-- IF S_NEW_MESSAGE -->120<!-- ELSE -->124<!-- ENDIF -->" tabindex="2" value="{SUBJECT}{DRAFT_SUBJECT}" class="inputbox autowidth" /></dd>
	</dl>
		<!-- IF S_CONFIRM_CODE -->
I still can't enter more than 60 characters.
clean cache in ACP

Re: Post a longer subject length?

Posted: Tue Jun 17, 2008 1:36 pm
by furman
Thanks, I think thad did the trick - must remember that for future reference.

Re: Post a longer subject length?

Posted: Sun Aug 03, 2008 8:06 pm
by guardog
I do think this is an important setting which should have been in the ACP. Or maybe not :P

Re: Post a longer subject length?

Posted: Sun Apr 26, 2009 12:57 pm
by Peter77sx
Wow, thanks for this. I had something similiar in phpbb2. much appreciated. :)

Re: Post a longer subject length?

Posted: Fri Jan 22, 2010 4:53 pm
by JohnLaSala
Hey there. I'm here to resurrect this old thread.

I went to try this tweak on my board to allow a longer subject line, but in the theme I am using, there is no posting_editor.html. I can see that file exists in prosilver, but it doesn't the one I'm using: skymiles.

Any clue what I can do to make this tweak? (Besides switching to prosilver, that is.)

Re: Post a longer subject length?

Posted: Sat Jan 30, 2010 11:37 pm
by dan filipi
I went to try this tweak on my board to allow a longer subject line, but in the theme I am using, there is no posting_editor.html. I can see that file exists in prosilver, but it doesn't the one I'm using: skymiles.

Any clue what I can do to make this tweak? (Besides switching to prosilver, that is.)
I'm always asking questions and reading here so it's my pleasure to be able to help someone for a change. :D

I just made this tweak to my X-static style which is based on the subsilver2 template like yours is.

You need to open skymiles/template/posting_body.html

find:

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>
What I did was changed both the 60 and 64 to 100.
That allows longer subject length but the empty text box is still set to 450px wide so
I also changed "width:450px" to "width:650px". Now the entire 100 character subject line fits inside the text box. Very slick.

Re: Post a longer subject length?

Posted: Sun Jan 31, 2010 1:39 am
by JohnLaSala
Dan, thanks so much for your reply! Your willingness to help very much appreciated. :)

I tried out your fix but got mixed results. It did allow me to input more characters without getting an error message telling me I'm over the limit. However, now it simply cuts it off at 60 characters when the post is published. I even did a refresh on that template. I changed my numbers to be just like the ones you proposed, but it seems the board is still getting the number 60 from somewhere. Any clue?

Thanks in advance.

- John

Re: Post a longer subject length?

Posted: Sun Jan 31, 2010 1:51 am
by dan filipi
Did you do the edits to includes/functions_posting.php as in the above?

I purged the cache in General ACP. Maybe try that also.

Re: Post a longer subject length?

Posted: Sun Jan 31, 2010 2:31 am
by JohnLaSala
A-ha! I did not! But now I have. And all is right in the world (or at least on my board.) Thanks so much, Dan.

- John

Re: Post a longer subject length?

Posted: Tue Dec 07, 2010 7:14 pm
by RiTz21
guardog wrote:I do think this is an important setting which should have been in the ACP.
I am always bumping my head on the 64 character limit!!!
So yeah, I'd certainly say this should be part of the ACP!!!

RiTz21

Re: Post a longer subject length?

Posted: Wed Dec 08, 2010 6:39 am
by Ather
I posted this here to control from the ACP
http://www.phpbb.com/community/viewtopi ... #p12905254

Re: Post a longer subject length?

Posted: Fri Aug 26, 2011 1:08 am
by True Cures
yhelp wrote:Dose not matter i found the files i need to edit. If you a phpbb user and need to do the same thing all you need to do it this:

OPEN
styles/YOURTEMPLATE/template/posting_editor.html
FIND
<dd><input type="text" name="subject" id="subject" size="45" maxlength="64" tabindex="2" value="{SUBJECT}{DRAFT_SUBJECT}" class="inputbox" /></dd>
IN-LINE FIND
64
IN-LINE REPLACE WITH
250
OPEN

includes/functions_posting.php

IN-LINE FIND
$subject = truncate_string($subject);
IN-LINE REPLACE WITH
$subject = truncate_string($subject, 250);
I used this method to change my subject line. I had to use the same code followed up by another person who had different code. But I think I might have made some other changes I do not want. Now I cannot see all my forum page or my admin page. So if I want to change my group permissions for instance, I can choose all my forums but the submit button is off to the right in space out of site and no bar to slide to get it. I first followed this directions above for 250 and it didn't change anything but I think I might have made the change I described here that I do not want. I thought I would take it slow and get some feedback before I try to undo what i did and make sure it isn't some other issue.

Thanks.

EDIT, I just found out that it is because I changed one of my forum names to a very very long name and for whatever strange reason in admin and even in my forum it moves thing far right out of reach. Any easy fix so I can leave my long forum names?