Gossamer Forum
Home : Products : Links 2.0 : Customization :

A Recommendation

Quote Reply
A Recommendation
Hi,

Ok, I have a few things I need to change and would like some suggestions as to what the best way to go about doing this.

The first thing I need to do is:
Add three new fields
1) Address
2) City, State
3) Phone #

Currently, I have my links broken up into categories, however, in addition to this, instead of just allowing a search/link throughout the category, I would like to allow my customers to possibly select a state and search one state only, or maybe even just give them the option to view all of the listings in a particular state of their choice?? Right now you can find California and New York in the same category. I'm not quite sure how to go about this? Should I add widget's category mod and modify it somehow to be a dropdown for states? That probably wouldn't work. Or should I just add the three additional fields? I guess my dilema is, I'm not quite sure what the best way to go about doing this would be! Also, after adding the fields, what is the best way to modify the current listings/links to reflect the new fields? I'm thinking maybe to manually add the info in the database??

The next thing I need to do is to allow another site to query my database and give the results on there site, however the results must match the look of their site. I am using templates. Would this be possible?

Any suggestions or comments would be greatly appreciated!

Thank You
Quote Reply
Re: A Recommendation In reply to
1) Follow the instructions in the FAQ section of the Resource Center.

2) With regards with editing the search to allow people to search by State, the easiest thing to do would be to use the &build_select_field routine in the db_utils.pl to build a select field to search, like the following:

Code:
my $state = shift;
my $state = &build_select_field($state);

at the top of the category.html or another template page that you want to use this field.

Then define the tag like the following:

Code:
State => $state,

Then in your category.html template file, add the following codes to the search form codes:

Code:
State: <%State%>

3) This would be highly problematic in terms of CPU and Bandwidth use. There are couple things you can try:

a) Create an Affliates database that posts information, including:

* Userid
* Password (Use encrypt functions)
* Domain
* Header and Footer Files (link)

Then open the database in the search.cgi file and use conditional statements to print header and footer files.

Then create other sub-routine calls to an external search template file that you can use to post the header and footer files based on Domain.

b) Write a LWP script that people can use to connect to your search engine and let people customize it to include their own header and footer files.

Good luck.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------



Quote Reply
Re: A Recommendation In reply to
Hi Eliot,

Thank you for your reply. Adding fields isn't a problem...that's done. I think I am a little confused on allowing a search by state. Ok, I have added a field which is called state in the links.def file and have made it a selection/dropdown in the add form and also the admin section, but here is where I'm not sure what to do. I'm assuming I add the code you suggested right here:

sub build_select_field {
# --------------------------------------------------------
# Builds a SELECT field based on information found
# in the database definition.
#
my ($column, $value, $name, $mult) = @_; my ($size, %values);
my $state = shift;
my $state = &build_select_field($state);

$name &#0124; &#0124; ($name = $column);
$size &#0124; &#0124; ($size = 1);

When you say to define the tag (State => $state,) where would I define it? And where would I enter the states? I have already entered the states I wish to use in the links.def file for the additional field. By placing the State: <%State%> code in my template, will this be calling the states that I have entered?? I appologize for any confusion. Thanks for your time.
Quote Reply
Re: A Recommendation In reply to
You put the codes in specific sub-routines of the site_html_templates.pl file that you want to use this code for searching purposes, LIKE SUB SITE_HTML_CATEGORY!

"Experimentation is the key to success!"

I don't gaurantee these codes will work...just functioning on Perl logic!

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------



Quote Reply
Re: A Recommendation In reply to
I just posted more in-depth codes in another Thread that addresses this issue. Please search for it.

About using the altavista.cgi file to search your links database file....One question....

WHY?

What elements of the altavista.cgi script do you want to see in the search results of your links database?

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------






[This message has been edited by Eliot (edited January 11, 2000).]

[This message has been edited by Eliot (edited January 11, 2000).]

[This message has been edited by Eliot (edited January 11, 2000).]
Quote Reply
Re: A Recommendation In reply to
Eliot,

I tried as you suggested, but unfortunately it didn't work. :-( It's strange, because the <%State%> tag is recongized, (I don't get the unknown tag) but the drop down menu is not shown. Any ideas?

Also, just a thought. Wouldn't it be possible to query the links database much like the altavista.cgi does?

Thanks
Quote Reply
Re: A Recommendation In reply to
Well, the reason I was asking about the altavista.cgi file was because of a previous question I had.....allowing another site to search my database. After reading your response:
3) This would be highly problematic in terms of CPU and Bandwidth use. There are couple things you can try:
a) Create an Affliates database that posts information, including:
* Userid
* Password (Use encrypt functions)
* Domain
* Header and Footer Files (link)

....it just seemed like there might be an easier solution for what I am trying to accomplish. But, once again, it's just a thought and I have no idea if it is even a realistic one. Basically, there Does Not need to be a header or footer file, they can customize the output within a script themselves...I would just like to offer them my links (data) and nothing else. Does this make sense? Thanks again.
Quote Reply
Re: A Recommendation In reply to
Well for a simple Affliates Web Search Program, there are codes in a Mod in the Resource Center that allows people to specify their site title and URL in hidden fields in a public search form.

Go to the Resource Center and look for this Mod. I have this offered through my web sites. One example is the following:

vlib.anthrotech.com/search/searchform.shtml

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------




Quote Reply
Re: A Recommendation In reply to
Cool..thanks Eliot, I'll go check it out! Do you have someone using yours so I can see the results? Does it just pull up the results, or will it show your (website) information IE: your header and footer or templated page? Hopefully, it just pulls up the results (link information)!

Thanks
Quote Reply
Re: A Recommendation In reply to
Ok, the only mod I found was this:
http://www.christian-search.net/returnlink.html
however all this does is provides a link on the results pages...I believe they are still viewing the results from my page and not customized to theirs. Wouldn't it be possible to change the altavista.cgi script or a script similar that would search the links database and return only the links and not my site layout? BTW, Eliot, your past responses are greatly appreciated.