Post a longer subject length?

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Ideas Centre
yhelp
Registered User
Posts: 31
Joined: Fri Nov 16, 2007 10:20 pm
Contact:

Post a longer subject length?

Post 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?
Y! Help - Our fresh approach is friendly and informative but above all we work at your pace your level of computer knowledge and take nothing for granted.
yhelp
Registered User
Posts: 31
Joined: Fri Nov 16, 2007 10:20 pm
Contact:

Re: Post a longer subject length?

Post 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);
Y! Help - Our fresh approach is friendly and informative but above all we work at your pace your level of computer knowledge and take nothing for granted.
furman
Registered User
Posts: 24
Joined: Tue May 28, 2002 10:54 pm

Re: Post a longer subject length?

Post 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.
mr.beery
Registered User
Posts: 51
Joined: Fri Oct 28, 2005 1:30 pm
Location: Bangkok , Thailand
Contact:

Re: Post a longer subject length?

Post 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
furman
Registered User
Posts: 24
Joined: Tue May 28, 2002 10:54 pm

Re: Post a longer subject length?

Post by furman »

Thanks, I think thad did the trick - must remember that for future reference.
User avatar
guardog
Registered User
Posts: 61
Joined: Sun Aug 03, 2008 2:19 pm

Re: Post a longer subject length?

Post by guardog »

I do think this is an important setting which should have been in the ACP. Or maybe not :P
Dream and reality...
What's the difference?...
Peter77sx
Registered User
Posts: 3260
Joined: Wed Nov 09, 2005 2:51 pm

Re: Post a longer subject length?

Post by Peter77sx »

Wow, thanks for this. I had something similiar in phpbb2. much appreciated. :)
JohnLaSala
Registered User
Posts: 5
Joined: Mon Nov 10, 2008 6:44 pm

Re: Post a longer subject length?

Post 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.)
dan filipi
Registered User
Posts: 82
Joined: Fri Dec 21, 2007 6:36 pm

Re: Post a longer subject length?

Post 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.
JohnLaSala
Registered User
Posts: 5
Joined: Mon Nov 10, 2008 6:44 pm

Re: Post a longer subject length?

Post 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
dan filipi
Registered User
Posts: 82
Joined: Fri Dec 21, 2007 6:36 pm

Re: Post a longer subject length?

Post 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.
JohnLaSala
Registered User
Posts: 5
Joined: Mon Nov 10, 2008 6:44 pm

Re: Post a longer subject length?

Post 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
User avatar
RiTz21
Registered User
Posts: 208
Joined: Tue May 31, 2005 5:20 pm

Re: Post a longer subject length?

Post 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
Image
Ather
Registered User
Posts: 1032
Joined: Fri May 08, 2009 9:42 am
Location: Kingdom of Bahrain
Name: Ather Akber

Re: Post a longer subject length?

Post by Ather »

I posted this here to control from the ACP
http://www.phpbb.com/community/viewtopi ... #p12905254
CPL Syed Ather Akbar
Regional Command Southwest
Camp Leatherneck, Afghanistan

My Mods/Snippets
True Cures
Registered User
Posts: 134
Joined: Wed Dec 29, 2010 8:41 pm
Name: David Flowers
Contact:

Re: Post a longer subject length?

Post 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?
Locked

Return to “[3.0.x] MOD Requests”