Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2007-01-10 12:23:23
- hilary
- Member
- Registered: 2006-09-11
- Posts: 37
altering comment form field
This is a bit of an obscure one, but I’ve been trying all day and I keep breaking the comment form..
Basically Im using the web address input on the form, to get phone numbers, but textpattern cuts everything off the end if there is a blank space in it..
eg: 333444 gets through
but 333 444 will be recieved on our end as just 333
I presume this is something to do with preg replace, some kind of a ‘ ‘ that I need to find, can anyone tell me where I can get rid of this validation on the web field at all??
many thanks to all,
Hilary
Offline
#2 2007-01-12 10:37:18
- hilary
- Member
- Registered: 2006-09-11
- Posts: 37
Re: altering comment form field
Anyone?!
(it would be great to know!!!!)
Offline
#3 2007-01-13 02:08:18
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: altering comment form field
Commenters’ emails get validated with the clean_url() function, on lines 93 and 317 of textpattern/publish/comment.php. You should probably create some sort of function to validate this field to replace this.
Offline
#4 2007-01-15 10:07:04
- hilary
- Member
- Registered: 2006-09-11
- Posts: 37
Re: altering comment form field
Thanks for the reply Mary! I couldnt find anything on those lines, but I did find the clean_url function..
there seems to be three lines for clean url for the web field
line 77: $web = clean_url(pcs(‘web’));
line 91: $web = clean_url(ps(‘web’));
line: 274: $web = doSlash(clean_url(strip_tags(deEntBrackets($web))));
For some reason, if I get rid of the clean_url preview line, the entire comment form fails.. and if I get rid of the rest, it still cuts off at a blank space.. I cant seem to get it!
Offline
Pages: 1