Gossamer Forum
Home : Products : Links 2.0 : Customization :

URL must not be a url!!

Quote Reply
URL must not be a url!!
Following the previous post I'd like to know.
How can I make the URL field be "received" by links 2.0 not with a "http://" or "mailto" in it.
Basicly I've made a lot of modifications but I'd like the URL not to be a database of addresses but only of domains as "yourname.com" and not "http://www.yourname.com".



IS IT POSSIBLE?



I've tried not to enter the "http://" but it gives me an error.

Thanks guys!!!
Andrea
Quote Reply
Re: [Andreaf] URL must not be a url!! In reply to
You'll hve to negate the regular expreession comparison in add.cgi and in the admin panel. Change =~ to !~.

Philip
------------------
Limecat is not pleased.
Quote Reply
Re: [Andreaf] URL must not be a url!! In reply to
Whoo! There are MANY places in Links that take the URL and split it out (remove the htpp://), so trying to enter it without that bit may be a problem. I think the part in links.def is what requires there to be something in front of the URL (http, htp, etc), not sure what effect of removing that would be. It might be better to add another field to links.def, where you could enter just the name 'yourdomain.com'.


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] URL must not be a url!! In reply to
I've tried to set another field just for the domain name, but it seemed that the program still required the URL field to be filled (I did erase it).

Before reading Andrew's post I added another field "Title" under the URL asking the customer to add again the domain name.

The first time (URL) the user must write the domain name after the "http:"
The second time "Title" the user must write the domain name after the "http:"

In this way I cam have a list of domain names (Title) to easily check under various categories as "registered, transferred..."

Am I smart?

Thanks guys!!
Quote Reply
Re: [Andreaf] URL must not be a url!! In reply to
if that's all you're wanting to do, then you can just make that field something that's handled from the script instead of making the users input it. run a regex on the url to pull out the domain name... you're bond to get some clown putting something else in that field other than what should be there.

Philip
------------------
Limecat is not pleased.