Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Passing db= in page.cgi and search.cgi

Quote Reply
Passing db= in page.cgi and search.cgi
Hi There,

Is there anyway of passing db= paramaters in page.cgi and search.cgi as is done in the admin area, and as was originally done in the dbmanager?

the links database is not going to be my primary source of information, but it will be used for building. What I'm trying to do is pass something like db=artisans to page.cgi and search.cgi, have it look through that database and generate the pages. This was pretty easily implemented in links2.0 by parsing the form first and grabbing the specified .db and .def file. I've tried everything I can think of to do this manually and am coming up blank

Also, I now discover that we don't have the same control of file names and text in links SQL. For example, I was able to specify a the name of all my databases, and there was also the ability to specify the html_object, so if I didn't want everything called Links, I could change it to artists or something else. Is that ability gone? I notice the word Links is hardcoded into all the html pages.

I realize now that links SQL is still in it's infancy. What are the plans for upgrades? Both in terms of time frame and cost.

Thanks for your help. I see I have a lot of relearning to do.

Kyle


Quote Reply
Re: Passing db= in page.cgi and search.cgi In reply to
Okay,

I've managed to get it so I can manually type in the database I want to search by saying db=. Now I'm trying to pass that parameter in dynamic mode as is done with templates like t=snap or t=yahoo. I want to be able to say something like db=artisans or db=links

It looks like I need to be working in HTML_Templates.pm in in the sub clean_output area, but it looks really nasty down there. Anybody have any ideas how I can dynamically pass a variable from one page to the next in the url itself?

Thanks again.

Kyle
Quote Reply
Re: Passing db= in page.cgi and search.cgi In reply to
Hi,

Quote:
It looks like I need to be working in HTML_Templates.pm in in the sub clean_output area, but it looks really nasty down there. Anybody have any ideas how I can dynamically pass a variable from one page to the next in the url itself?

Look in Links.pm:

Quote:
# Preserve the following tags as you move throughout the pages. Please note,
# both the 't', 's' and 'd' options are required. The 't' option is used for
# passing the template set to use in page.cgi. The 'd' flag is for telling
# scripts that we are in dynamic mode. The 's' flag is for passing a session id in
# the url, remove it and the program will use cookies instead.
$LINKS{dynamic_preserve} = ['t', 'd', 's'];

Just add 'db' to the list and if you pass db=somevalue to any of the scripts while in dynamic mode, that will be carried throughout the program automatically.

Hope that helps, and love to see what you come up with!

Cheers,

Alex