Gossamer Forum
Home : Products : Links 2.0 : Discussions :

One database, multiple interfaces?

Quote Reply
One database, multiple interfaces?
Hello everybody ...

Has anyone attempted this before?

I would like -- if it is possible -- to maintain a single
Links database that could be used by two or more Links

Let me explain this clearly ... my Links database is
essentially a service for a small and clearly-defined
user niche. Although it has less than 500 entries, it
is probably 95% complete.

Several of our visitors have asked if they can use our
Links database on their own sites. They are mostly
technophobes who don't have servers on which to install
their own Links, and would not know how to do it even if
they did.

Of course, they could easily link to our pages, but we
would like to offer something more personal -- perhaps
a second copy of Links on our server that would use the
existing database to generate relatively simple pages
that could be displayed in a frameset.

Is this possible in principle?
How could it be done?

Alternatively, is it possible to modify our existing
script to generate a separate category tree using a
different set of templates?

t.i.a. ...


Quote Reply
Re: One database, multiple interfaces? In reply to
1) Regarding sharing your database....This has been discussed before...and there is a Mod in the Resource Center that creates an "affliate" search box. Basically, people's Title and URL will be printed in the search result pages.

You can add in other arguments to the query string like logo, bgcolor, etc. to show more personalized results....with the following steps....

1) Add the following codes in the search_results.html file:

<%if alogo%>

<%if bgcolor%>
<body bgcolor="<%bgcolor%>">

2) Then provide instructions for adding the following hidden fields:


<input type="hidden" name="logo" value="ENTER URL TO YOUR LOGO">
<input type="hidden" name="bgcolor" value="ENTER BGCOLOR CODES">

To see an example of this go to:


Try any of the search boxes...you will see at the bottom of the page, the following text link:


If you copy the codes in the above web page and then insert the appropriate information, then you will see a "live" link.


There are more complex solutions...like having the other webmasters use LWP to parse data from your database.

Now...in terms of creating web pages in their server utilizing your database file, they would have to use NET:FTP, which is for more savvy programmers.

In Reply To:
Alternatively, is it possible to modify our existing
script to generate a separate category tree using a
different set of templates?
Yep...Do the following:

1) Copy the sub site_html_category routine in the site_html_templates.pl file...This should be called something like sub site_html_category2. This sub should load the category2.html template file.

2) Then copy the sub build_category_pages in the nph-build.cgi and call this new sub sub build_category2_pages. In this new sub, replace all occurences of &site_html_category with &site_html_category2.

Good luck!

BTW: These types of questions (that relate to code hacks or add-ons) should be posted in the Links 2.0 Customization Forum).


Eliot Lee