Author |
Topic |
|
caxps
Starting Member
35 Posts |
Posted - 15 February 2005 : 08:22:17
|
Recieved this from one of my moderators..
Is an administrator able to add the a few lines of code to the "Submit Reply" script to make sure that all titles/subjects are uppercase and single i's are capitalised?
Peter Sampson CFCnet.co.uk
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 15 February 2005 : 08:29:24
|
Replies don't have titles; I assume you mean topics there? One way to do it would be to add this function to the end of post_info.asp and then, on lines 452 and 798 of the same file, find the following:
txtSubject = chkString(Request.Form("Subject"),"SQLString")
And replace it with:
txtSubject = PCase(chkString(Request.Form("Subject"),"SQLString"))
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
caxps
Starting Member
35 Posts |
Posted - 15 February 2005 : 08:52:33
|
Hi Shaggy. I'll try this at home also have you a remedy for messages that converts single lower case i in capital I |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 15 February 2005 : 09:14:27
|
Within the message body itself? Not without a sizeable performance hit that wouldn't really be worth it given the end result. It can probably be achieved with regular expressions but I ain't too hot with them.
Just had a look at the site you specified as your homepage and it looks like you want every character in topic titles to be upppercase rather than just the first character of each word. If this is the case then forget about adding that function to post_info.asp and, in the two line changes I gave you, use UCase instead of PCase.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
caxps
Starting Member
35 Posts |
Posted - 15 February 2005 : 17:48:23
|
Unfortunately the two line of code change didn't work :-( |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 16 February 2005 : 06:42:30
|
When you say it didn't work, what do you mean? Are you getting any error messages? Did you change both lines to look like the below?
txtSubject = UCase(chkString(Request.Form("Subject"),"SQLString"))
If you made that change to lines 452 and 798, it should work. If you've got a modified post_info.asp, those line refernces may be off somewhat.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
caxps
Starting Member
35 Posts |
Posted - 16 February 2005 : 17:33:04
|
do i have to change any code to display the changes on the site? |
|
|
|
Topic |
|