Gossamer Forum
Home : Products : Links 2.0 : Customization :

Hiding links

Quote Reply
Hiding links
Some time back I found a thread that gave detailed info on removing a link from all pages, category, search, and not counting it in the new, popular, etc. Now I can't seem to find the thread I am looking for. What I want to do is have a simple way to make a site's listing TOTALLY invisible in the links list pages without actually deleting it. Is there a way to easily move a link back from the links.db to validate.db so it can be reinstated when the problem is corrected.

Can someone point me in the right direction?

Charlie
Quote Reply
Re: [cvance] Hiding links In reply to
Yep, no problem. Three easy steps.

1) Add a field to your database called 'Public' with the options 'Yes/No'.
2) Define all records (and set Public by default).
3) Modify nph-build.cgi to only use 'Public' records.

....there must be more information/reference on this BB Wink
Quote Reply
Re: [cK] Hiding links In reply to
>>>3) Modify nph-build.cgi to only use 'Public' records. <<<

Or just define link.html to have something like;

<%if Public eq 'Yes'%>
show public thing
<%endif%>

Much easier than hacking nph-build.cgi Wink

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] Hiding links In reply to
Works like a charm, but I also need to figure out how, based on the Public field (Actually I called it Status, Active or Inactive) to not count it in the stats, new sites, popular sites, grand total, etc, so when it shows how many sites are in each category, they won't be counted.

I am sure it probably something simple in the NPH-Build script, but I am no Perl wiz.

I appreciate all the help so far, you are all great.

Thanks,

Charlie
Quote Reply
Re: [cvance] Hiding links In reply to
>>> to not count it in the stats, new sites, popular sites, grand total, etc, so when it shows how many sites are in each category, they won't be counted. <<<

In this case you'll need to modify nph-build.cgi for sure. Wink

I personally did the following: first make nph-build.cgi generate an Public Database "public.db" and then use this database to build the site. So I added one routine at the top and changed to path to the correct filenames in all other subs.

Hope this helps.......
Quote Reply
Re: [cvance] Hiding links In reply to
-OR-

You could simply use conditional statements in your link.html template file, like the following:

Quote:

<%if Status eq 'Active'%>
<a href="<%db_cgi_url%>/jump.cgi?ID=<%ID%>">
<%endif%>
<%if Status eq 'Inactive'%>
<a href="<%URL%>">
<%endif%>


You will need to install the Enhanced Template.pm code hack located in the "Resources" section of this web site (Support -> Resources).

AND to prevent those savvy web visitors from simply adding the ID in the query string for other links, you could add conditional statements in the JUMP.CGI script that would check the "Status" field/column.

BTW: You should HIGHLY consider renaming the "STATUS" column/field name, because it will conflict if you plan on upgrading to LINKS SQL, since there is already a STATUS column in the LINKS SQL DB schema in the Links table.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Stealth] Hiding links In reply to
I will change the field name, as I am definitely going to upgrade to the SQL version in the very near future. I hacked around in the nph-build so that it doesn't show up in any stats while it is inactive, go it working the way I want it, but I will change the jump.cgi too.

I do appreciate the reply and I thank all of you for all the help. I feel like some of my questions probably sound pretty silly to those of you who know perl. Hopefully soon, I can contribute some help instead of just asking for it all the time.

Charlie