phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

How extend the subject line?

Goto page 1, 2  Next
 
Search this topic... | Search phpBB2 Discussion... | Search Box
Register or Login to Post    Index » phpBB2 Discussion  Previous TopicPrint TopicNext Topic
Author Message
Holger
Board Member



Joined: 19 Jan 2009

Posts: 509
Location: Hanover


flag
PostPosted: Mon Aug 17, 2009 5:46 pm 
Post subject: How extend the subject line?

As I did not get any useful out of this:
http://www.phpbb2refugees.com/viewtopic.php?t=407 icon_redface.gif
I would like to ask a more common question.

How do I extend the number of characters I can use in the subject?

/Holger
Back to top
Acaria
Board Member



Joined: 20 Feb 2009

Posts: 238



PostPosted: Mon Aug 17, 2009 6:23 pm 
Post subject: Re: How extend the subject line?

Code:
ALTER TABLE `phpbb_posts_text` CHANGE `post_subject` `post_subject` VARCHAR( 200 )


Change the phpbb_ to match your database's table prefix and 200 to however many characters you want to allow in subjects.

Now all you have to do is go in and change the things that display the subject. Most of them (will likely) have been coded to specifically allow no more than 60 characters, just in case someone hacked/cheated/exploited/was lucky/failed at life.
Back to top
Holger
Board Member



Joined: 19 Jan 2009

Posts: 509
Location: Hanover


flag
PostPosted: Tue Aug 18, 2009 6:46 am 
Post subject: Re: How extend the subject line?

I have
post_subject varchar 100
right now.
Still I only get 60 characters in the field!
Where do I change the things to display?
Back to top
Acaria
Board Member



Joined: 20 Feb 2009

Posts: 238



PostPosted: Tue Aug 18, 2009 6:57 am 
Post subject: Re: How extend the subject line?

You now only have it set to allow up to 100 characters. However, like I said, the fields are all probably set to a maximum of 60.

The files you should aim for are:

templates/subSilver/posting_body.tpl
templates/subSilver/viewforum_body.tpl

Though there are probably more. I can't be sure without testing it out myself, and I simply don't have time at the moment.

I'll try to look into it further tomorrow, but no guarantees. Hopefully someone can come in behind me and pick this up.
Back to top
Holger
Board Member



Joined: 19 Jan 2009

Posts: 509
Location: Hanover


flag
PostPosted: Tue Aug 18, 2009 7:26 am 
Post subject: Re: How extend the subject line?

No problem! Thank you so far!
Back to top
Sylver Cheetah 53
Board Member



Joined: 17 Dec 2008

Posts: 426
Location: Milky Way


flag
PostPosted: Tue Aug 18, 2009 8:26 pm 
Post subject: Re: How extend the subject line?

OPEN
templates/subSilver/posting_body.tpl

FIND
<input type="text" name="subject" size="45" maxlength="60" style="width:450px" tabindex="2" class="post" value="{SUBJECT}" />

REPLACE
<input type="text" name="subject" size="45" maxlength="200" style="width:450px" tabindex="2" class="post" value="{SUBJECT}" />

_________________
Image link
My Forum || My Blog

phpBB2 forever! icon_smile.gif
Back to top
Holger
Board Member



Joined: 19 Jan 2009

Posts: 509
Location: Hanover


flag
PostPosted: Wed Aug 19, 2009 6:43 am 
Post subject: Re: How extend the subject line?

I already have:
Code:
<input type="text" name="subject" size="45" maxlength="100" style="width:450px" tabindex="2" class="post" value="{SUBJECT}" />
Back to top
Acaria
Board Member



Joined: 20 Feb 2009

Posts: 238



PostPosted: Wed Aug 19, 2009 7:54 am 
Post subject: Re: How extend the subject line?

Figured it out. You don't need to edit any more .tpl files. Instead, run this SQL:

Code:
ALTER TABLE `phpbb_topics` CHANGE `topic_title` `topic_title` CHAR( 100 )


I thought the 60 character limit would be hardcoded into the template files. When I looked at it, sure enough they weren't.

Looked at the database and, sure enough, the character limit was also set in another location.

Do that edit up there and you'll be set. icon_smile.gif
Back to top
Holger
Board Member



Joined: 19 Jan 2009

Posts: 509
Location: Hanover


flag
PostPosted: Wed Aug 19, 2009 7:58 am 
Post subject: Re: How extend the subject line?

Perfect! I will try that!
Back to top
Acaria
Board Member



Joined: 20 Feb 2009

Posts: 238



PostPosted: Wed Aug 19, 2009 8:02 am 
Post subject: Re: How extend the subject line?

It worked on my site, so I'm pretty sure you'll get your desired result. :D
Back to top
Acaria
Board Member



Joined: 20 Feb 2009

Posts: 238



PostPosted: Fri Aug 21, 2009 1:09 am 
Post subject: Re: How extend the subject line?

Did it work for you?
Back to top
Holger
Board Member



Joined: 19 Jan 2009

Posts: 509
Location: Hanover


flag
PostPosted: Fri Aug 21, 2009 6:54 am 
Post subject: Re: How extend the subject line?

Sorry for my late feedback.
Yes, it seems to work!
Back to top
Holger
Board Member



Joined: 19 Jan 2009

Posts: 509
Location: Hanover


flag
PostPosted: Thu Aug 27, 2009 9:15 am 
Post subject: Re: How extend the subject line?

AAAAAHHHH! No, it does not work. Now I got a subject line with cut off characters again!
Back to top
Acaria
Board Member



Joined: 20 Feb 2009

Posts: 238



PostPosted: Thu Aug 27, 2009 1:21 pm 
Post subject: Re: How extend the subject line?

Hmm... that's odd. Changing both of those should allow longer titles.

You've changed the code in the posting_body.tpl file to allow more than 60 characters, right?
Back to top
Holger
Board Member



Joined: 19 Jan 2009

Posts: 509
Location: Hanover


flag
PostPosted: Thu Aug 27, 2009 1:25 pm 
Post subject: Re: How extend the subject line?

Yup!
I noticed that this appears when importing a RSS-feed with the mod FIND INPUT.
Back to top
Display posts from previous:   
Register or Login to Post    Index » phpBB2 Discussion  Previous TopicPrint TopicNext Topic
Page 1 of 2 All times are GMT
Goto page 1, 2  Next
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0192 seconds using 15 queries. (SQL 0.0100 Parse 0.0006 Other 0.0086)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo