Gossamer Forum
Quote Reply
Blank URL
I have searched and cannot find just the right process. I found where I can set the dbase to not requre URL's but is there more to it?

I believe there should be an "if" statement for the href so there is no hyperlink if URL is blank. What is the code for that? I used to know a couple of if statements, but I am drawing a blank.

Thanks!!

Chris
Quote Reply
Re: [jnjhost] Blank URL In reply to
Actually changing the database did nothing. Still stuck.

What do I need to edit to make a blank URL entry seamless?

Chris
Quote Reply
Re: [jnjhost] Blank URL In reply to
You will need to edit a couple of places (mainly link.html), and do something like;


Code:
<%if URL ne 'http://' and URL%>
.. normal linked code here
<%else%>
... title, without link to site...
<%endif%>

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Blank URL In reply to
No dice thus far. My changes are as follows:
1. Changed table lsql_Links to Null = Yes
2. Changed link.html to:
Code:
<%if URL ne 'http://' and URL%>
<ul>
<li><%body_font%><a class="category_links" target="_blank" href="<%db_cgi_url%>/jump.cgi?ID=<%ID%>"><%Title%></a></font>
<%else%>
<ul>
<li><%body_font%><%Title%></font>
<%endif%>

I still get the error: URL can not contain the value ''.

And now it seems as though "http://" will work (once I get it to stop checking for dupes), however even tho in mySQL I have it as the default, it does not show automatically as the default when I click Add a Site.

And by the way, THANK YOU for the help! I am a huge fan of Gossamer Threads because of people like you and the scripts that they have turned out.

Chris
Quote Reply
Re: [jnjhost] Blank URL In reply to
Should be the "regex" field you need to edit.

Database > Links > Properties > URL > regex (bottom of the page, just delete it all in that field).

Quote:
And by the way, THANK YOU for the help! I am a huge fan of Gossamer Threads because of people like you and the scripts that they have turned out

Cheers

No worries. Glad you like the scripts :)

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Blank URL In reply to
Do you mean in the Keys settings?

urlndx NO URL Drop

Chris
Quote Reply
Re: [jnjhost] Blank URL In reply to
No, there should be a "regex" textfield, at the very bottom of that page (think its something like ^http:// or similar).

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Blank URL In reply to
Found it! And it worked!!

Problem was, I could not see that field in mySQLman. I guess it is not available. I had to edit the table directly in LinksSQL. I had not done that before. A lot easier!

Thanks!!!!!!!

Chris
Quote Reply
Re: [Andy] Blank URL In reply to
I can't seem to make the system think that http:// is not a duplicate URL. I thought I had because I have 4 URL's entered with only http:// as the URL but now I cannot enter anything else. And I cannot figure out where to change this code. I cannot find a file "link.html".

In Reply To:
You will need to edit a couple of places (mainly link.html), and do something like;


Code:
<%if URL ne 'http://' and URL%>
.. normal linked code here
<%else%>
... title, without link to site...
<%endif%>

Hope that helps.

Cheers

Chris
Quote Reply
Re: [jnjhost] Blank URL In reply to
Quote:
And I cannot figure out where to change this code. I cannot find a file "link.html".

Its via Build > User Templates > link.html.

You *may* need to run this from MySQLMonitor too (please make a backup of your database first!);

UPDATE lsql_Links SET URL = '' WHERE URL = 'http://';

This should set all links that have http:// as the URL, to '' (null).

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!