Gossamer Forum
Home : Products : Links 2.0 : Customization :

2 Types of Categories On Homepage

Quote Reply
2 Types of Categories On Homepage
Hi

Is there a way to break out the db and show it 2 ways on the home page?

What I'd like to do is separatedly show 2 kinds of categories on my home page.

1. A list of cities
2. A list of services

Maybe it would be 2 jump boxes or maybe a list of cities could be shown above a horizontal line and a list of services below.

I've searched around, but I haven't found anything on this.

Thanks for your help.
Quote Reply
Re: 2 Types of Categories On Homepage In reply to
Dog Tags,

I wrote a SSI based records.cgi script used for DBMAN, but I think it can be modified to work with LINKS. Although many users cannot get this to work.

It shows a list of categories (can be any field in your category.def or links.def files) and number of records.

To see this in action, go to:

Code:
www.anthrotech.com/cgibin/career/ads/records.cgi

What you can do is download the script from the DBMAN Modification Section in the Resource Center, play around with the codes, and use two copies of this.

ONE: For the cities field
TWO: For the Services field

The Mod would have to be hacked quite a bit in order to work with LINKS in terms of linking and sorting, but I think this may be a useful hint.

BTW: Are these cites and services separate categories in your site??

Regards,




------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
----------------------







[This message has been edited by Eliot (edited January 20, 2000).]
Quote Reply
Re: 2 Types of Categories On Homepage In reply to
You know what? You're question about whether the cities and services are each categories is stumping me a bit.

Here's the category/subcategory structure that I have in mind:

Cities/Services_In_Those_Cities/Details

HORIZONTAL LINE

Services/Anybody_On_The_Net_With_These_Services/Details

So, a visitor could select Philadelphia/Restaurants/Listings

Or

Flowers/List_Of_Flower_Dealers_Netwide

I might even want to show the Flowers results as

Flowers/List_Of_Flower_Dealers/My_City

I think I'm creating a two-headed monster, but I like the idea of providing my visitors these choices. Some visitors might be looking for something that has to be geographical first (like a restaurant), and others would be looking for something that is the service first (like flowers), not dependent on location.

But, to have cross-listing, I could end up doubling my db, couldn't I?

Maybe the best thing would be to have just cities listed on the home page and allow searches by type of service on the Search page. I could have pre-made queries shown as links (like Flowers, Shoes, etc.) on the home page, maybe along the side bar.

But, the problem would be that when a link owner of a service like Flowers would sign up, they might not want to lock themselves into a city listing. They would want the top of their category to be Flowers, and they might want to pay for advertising and priority listing in the Flowers category, not a City category.

I suppose that what I really have in mind is a relational database type of thing with dynamically generated pages, keyword-called ads, and some kind of way to offer priority listing. Everything would work out easily with Links if it could be all Service or all City. But, I want both in the same system.

Am I clear about this thing? Get me some aspirin...



[This message has been edited by DogTags (edited January 20, 2000).]
Quote Reply
Re: 2 Types of Categories On Homepage In reply to
Hi oldmoney

Yeah, it's the build-on-the-fly stuff that has been going through my mind.

Do you think that it would eat up too much in resources? If I'm getting, say, 10-20k hits a day, with a db of, say 10,000 links, man-oh-man, this could be way too much for Links2 and any server. Would LinksSQL be better?

I've got the AltCat mod, but I'm not sure how to change things to get Altcats to build on-the-fly.

Also, I use Bobsie's Exclude Mod. Maybe I could have Location and Prods/Serv as the top categories, but exclude them, and allow adding to only the specific cities or services. I'd want to have link owners fill out a single AddURL form where they could indicate whether they wanted to be listed under a city, a service, or both. So, it would be one db, probably with all on-the-fly pages. Ouweee!!

Plus, by using widgetz' Yahoo subcat mod (which I already have...what a dummy!), I could show all the cities and services on the home page (Can Yahoo subcats show NumLinks? This would be important). Somehow, I'd like to have separate locations for each of the 2 top categories, with the subs underneath - like 2 columns or 2 tables. Not sure if this can be done.

What did you have in mind for the InterNet yes/no box? I'm not sure what it's purpose would be.

Does LinksSQL support the Exclude mod, Yahoo subcats, and AltCats? I'd hate to lose these.

I'm just trying to make it easier for my visitors to say, "Hey, I'm looking for flowers," or "Hey, I'm going to Philadelphia."

Right now, I'm going to the medicine cabinet.

You've certainly added way more than 2 cents!

Many thanks for your input.

[This message has been edited by DogTags (edited January 21, 2000).]
Quote Reply
Re: 2 Types of Categories On Homepage In reply to
If the DB is going to be that big, I would suggest you definitely look into switching over the SQL, and repost your question in that forum. I don't know how the inner workings of the SQL version difers from the flat file, so I'm afraid that any solution I might offer would probably not be helpful. If you are using the flat file, I would be happy to help you with the fairly simple regex for the auto Alt Category build, but it will be dependent on the category structure you choose. When you finalize the structure, email me privately with details of what you have decided...

As for the Internet yes/no... I was thinking that its probably not a category because don't want to exclude the likely possibility of both a bricks-and-mortar location and an Internet site. You could easily add ifInternet to the search form, as well as of course to the links.html. Also, I was just thinking that you should decide how (or if) you want to handle multiple locations, like for a chain, and handle multiple services, like "Flowers" and "Gardening"...

------------------
The Immuatable Order of Modding
-=-=-=-=-=-=-=-
1. Read the FAQ, 2. Search the board, 2a. Search the board again, 3. ask the question, 4. back-up, 5. experiment, 6. rephrase question (or better yet, post solution to original question)

[This message has been edited by oldmoney (edited January 21, 2000).]
Quote Reply
Re: 2 Types of Categories On Homepage In reply to
Okay, I think I have the simple answer:

Have Cities as the Top Categories and just include the term "InterNet" (or something like it) as one of the cities.

In effect, I'd be calling the InterNet a city with it's own subcats.

So, it would be City1 City2, City3, InterNet.

I think this solves it.

There's one problem: I'd want to pull the word "InterNet" out of the alphabetical listings of the other "Cities" and place it in its own spot on the home page.

Is this possible?

Thanks for your help.
Quote Reply
Re: 2 Types of Categories On Homepage In reply to
...the initial set up makes all the difference in the world... I would probably go with "Location" and "Product & Service" as my top categories and use the Alt category mod, which you can find in the Mod section. I would further build the AltCategories field on the fly in nph-build, so that I wouldn't have the nightmare of cross-checking listings. As for the DB size, you will still only have only one record. You will however double the number of category pages you build. Then you could have Joe's Flower Shop listed under...

Location: State: City: Product & Service: Flowers
and
Product & Service: Flowers: State: City

I would not make Internet a sub-category but its own yes/no field.

Just my $0.02...

------------------
The Immuatable Order of Modding
-=-=-=-=-=-=-=-
1. Read the FAQ, 2. Search the board, 2a. Search the board again, 3. ask the question, 4. back-up, 5. experiment, 6. rephrase question (or better yet, post solution to original question)

[This message has been edited by oldmoney (edited January 21, 2000).]