Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

To accept info with no URL

Quote Reply
To accept info with no URL
I was using this hack:
http://www.gossamer-threads.com/perl/gforum/gforum.cgi?post=142418#142418
to be able to accept information with no URL. It was working for me before and I was able to accept information with no website address, but now I cannot figure it out using the same code. I have error “Bad URL format.” And cannot figure out the way.
Is there any way I could modify something to make this work?

Thanks for any advice.

PS: I’m newbie
Quote Reply
Re: [modifier] To accept info with no URL In reply to
Remove the regex from the URL column in the database and also make sure the column 'not null' setting is removed.
Quote Reply
Re: [Alba] To accept info with no URL In reply to
Thanks, but I was not able to find the regex. Using MySql man I was not able to find it.
I went to lsql_Links --> Properties, than to URL and I didn’t figure out what next. I didn’t see any regex
Can someone please point me out with some detailed instructions?
Quote Reply
Re: [modifier] To accept info with no URL In reply to
Go to
Database
Links Properties
URL

Set Not Null as NO
Remove data from Form Regex
Quote Reply
Re: [Alba] To accept info with no URL In reply to
I did all this, (with some help http://www.gossamer-threads.com/...i?post=291074#291074)

but when I try to set the Not Null as no I have this error:

A column must be defined as not null if you want to index it.

and when I try the add form I see this error:

Bad URL format.

can anyone help little more?

Thanks

Last edited by:

domino: Apr 25, 2006, 4:21 AM
Quote Reply
Re: [domino] To accept info with no URL In reply to
I got it Sly

this helped:
http://www.gossamer-threads.com/...i?post=247789#247789
Cool
Quote Reply
Re: [Alba] To accept info with no URL In reply to
 Well I have another problem:
I need to be able to accept this:
http://
So I can use this:

<%if URL eq 'http://'%>
link to detail.html
<%else%>
use link to website
<%endif%>

But there is en error “Bad URL format.” When I try to submit the “http://” as the URL.
If I don’t have anything in the url, it works ok, but than I will not be able to use this:

<%if URL eq 'http://'%>
link to detail.html
<%else%>
use link to website
<%endif%>

Why I cannot accept the http:// as the URL?
My regex is empty, so what is costing the Bad URL format error?

Anyone?
Quote Reply
Re: [domino] To accept info with no URL In reply to
<%if URL ne 'http://'%>
because the URL contains only http:// if there is no link.
Quote Reply
Re: [Alba] To accept info with no URL In reply to
I tried it with http://none

Here is how I had it on the old lSql


<%if URL eq 'http://None'%>
<a class="category_links" target="_blank" href="<%rewrite_url($ID,$Title)%>"><%Title%></a>
<%else%>
<a class="category_links" target="_blank" href="<%db_cgi_url%>/jump.cgi?ID=<%ID%>"><%Title%></a>
<%endif%>

And it worked ok, and the regex was not empty(was default) and the “Not Null” was set to yes, and it worked fine. So why it is not working with the new gLinks with the same setting?

Last edited by:

domino: Apr 25, 2006, 12:34 PM
Quote Reply
Re: [domino] To accept info with no URL In reply to
Quote:
I tried it with http://none

So why it is not working with the new gLinks with the same setting?

I've no idea why it did work with this setting.

As I said, use <%if URL ne 'http://'%>