Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - New subject topic length - Is there a way to make
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

New subject topic length - Is there a way to make

 Post Reply Post Reply
Author
Landor View Drop Down
Newbie
Newbie


Joined: 11 June 2007
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote Landor Quote  Post ReplyReply Direct Link To This Post Topic: New subject topic length - Is there a way to make
    Posted: 24 July 2007 at 5:18pm
Is there a way to make it so the subject line can take more charters so it does not get cut off.
Back to Top
macspudster View Drop Down
Newbie
Newbie
Avatar

Joined: 24 July 2007
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote macspudster Quote  Post ReplyReply Direct Link To This Post Posted: 24 July 2007 at 6:05pm

Yes, there is.  These are how to change it in SQL Server version:

FYI ~ you can only change code if you license permits it. Although, even in the free version, I would submit to WWF that this type of change should be deemed "acceptable" as long as adverts and copyrights are in place.
 
1) Determine the new length; current default is 70

2) Set the TYPE of the column Subject in the table tblTopic to nvarchar(NNN); where NNN is the new length.

NOTE: In SQL Server, when changing a database column type (or length), a dialog box will be presented noting that other tables will be affected.  Click OK.

3) Make a copy of the file {forumRoot}/includes/message_form_inc.asp, then change the orig file message_form_inc.asp at line 139 by changing the maxlength value to the new length; and changing the size value:

<input type="text" name="subject" id="subject" size="75" maxlength="NNN"<% If strMode="editTopic" OR strMode = "editPoll" OR strMode="PM" Then Response.Write(" value=""" & strTopicSubject & """") %> tabindex="2" /><%

Note the green NNN above.  Change the NNN to the new length MINUS 20.  So, if you chose 150 as the new SQL table length, then set maxlength to 130.  This will ensure that whatever is typed in by the user will fit into the database column.

Also note the red 75, this is changed from 30, as this is the size of the text field to display to the user. 
 
Finally:
In all these files below, change the "41" and "50" to the new length.
 
  {forumRoot}\edit_post.asp(137):strSubject = Trim(Mid(Request.Form("subject"), 1, 50))
  {forumRoot}\email_messenger.asp(154): strSubject = Request.Form("subject")
  {forumRoot}\move_post.asp(115): strNewTopicSubject = Request.Form("subject")
  {forumRoot}\new_post.asp(150):strSubject = Trim(Mid(Request.Form("subject"), 1, 50))
  {forumRoot}\pm_new_message.asp(125):strSubject = Trim(Mid(Request.Form("subject"), 1, 41))
  {forumRoot}\pm_new_message_form.asp(131): strTopicSubject = Trim(Mid(Request.Form("subject"), 1, 41))
  {forumRoot}\pop_up_topic_admin.asp(140): strSubject = Trim(Mid(Request.Form("subject"), 1, 50))
  {forumRoot}\RTE_popup_link.asp(74): strSubject = Request.Form("subject")

MacSpudster



Edited by macspudster - 24 July 2007 at 6:29pm
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.