http:// in comment url field
Want your comment template to have "http://" as it's starting value when new commenters look at the form? This encourages them to type well formed urls, instead of urls starting with "www." which breaks some addons.
This is easily accomplished with a hack.
Open up your index.php file in Notepad, or a similar plain text editor (Wordpad or MS Word are not suitable).
Look for line 639. You should find the following:
What that line does is check to see if visitors have opted to save their details previously, and if they have, it uses the values they have stored in a cookie.
We want to alter it, so that if no cookie exists, we're filling in the form field with "http://", so lets do that.
Change the line to this:
What we're doing now is just adding a statement which says, if there's no cookie, use this value instead..
That's done the job, the form field will now have a default setting of "http://".
But there's a problem, now if someone doesn't fill in the field their url gets saved as "http://". We can't have that!
Further down the file we have a section for saving comments, which starts at line 914 (it was line 911 before you made the previous changes).
If you want, use the find function with the text "// $url".
You'll find this section:
And we're done!
By the way.. the reason this is a hack, not an addon, is because it will be included in 1.5 final ;)
BTW in 1.4.3 the code is near line 430 :)
moreover, the // $url section can't be found in 1.4.3
thank you anyway! :)
heh, sorry, i haven't used 1.4.3 in quite some time ;)
|All times are GMT. The time now is 03:18 PM.|
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.