Gossamer Forum
Home : Products : Links 2.0 : Customization :

50 States as Sub Categories

Quote Reply
50 States as Sub Categories
Hi,

I have several categories that I want to have the 50 states as the sub-categories. Is there a way to have these in a pop-up as opposed to listing all fifty states, or someting similar.

Any suggestions would be greatly appreciated..

Mark
Quote Reply
Re: 50 States as Sub Categories In reply to
in links.def where the code starts:

# Hash of column names to possible options. If you want to use a select form
# field, you can use &build_select_field in your HTML page. This routine will
# make a <SELECT> input tag using the following values:
%db_select_fields = (
isNew => 'Yes,No',
isPopular => 'Yes,No',
ReceiveMail => 'Yes,No',

add

'State / Province'=> 'Alabama,Alaska,Alberta,Arizona,Arkansas,British_Columbia,California,Colorado,Connecticut,Delaware,Florida,Georgia,Hawaii,Idaho,Illinois,Ind iana,Iowa,Kansas,Kentucky,Louisiana,Maine,Manitoba,Maryland,Massachusetts,Michigan,Minnesota,Mississippi,Missouri,Montana,Nebraska,Nevada,Ne w_Brunswick,New_Hampshire,New_Jersey,New_Mexico,New_York,Newfoundland,North_Carolina,North_Dakota,Northwest_Territories,Nova_Scotia,Ohio,Okl ahoma,Ontario,Oregon,Pennsylvania,Prince_Edward_Island,Puerto_Rico,Quebec,Rhode_Island,Saskatchewan,South_Carolina,South_Dakota,Tennessee,Te xas,Utah,Vermont,Virginia,Virgin_Islands,Washington_state,Washington_DC,West_Virginia,Wisconsin,Wyoming,Yukon'

before the last )

At the top where it has:

# Definition of your database file.

define the appropiate field like:

'State / Province'=> [5, 'alpha', 0, 65, 1, '', ''],

You can change the field name (in both places) to correspond to your own field names.

I don't recall if the site_html.pl had to be changed or not though. You'll have to work on it from there. And remember always back it up before trying to modify it!

Dan O.
Quote Reply
Re: 50 States as Sub Categories In reply to
 
Quote:
I want to have the 50 states as the sub-categories

I missed that the first time. You'll may have to change:

'State / Province'=> 'Alabama,Alaska,Alberta, etc.

to

'State / Province'=>
'North_America/Alabama,North_America/Alaska,North_America/Alberta,etc.

if using these as subcategories, I think. And if sub-categories in more than one category, you'll probably need to duplicate these for each????

Can you use them as categories and have sub-categories off them? It might make the data base a bit smaller. Either way it's going to be pretty big.

Dan O.
Quote Reply
Re: [DanO] 50 States as Sub Categories In reply to
I have the DB of 50 states and cities, ready to be imported into LinksSQL that I did for a client. I have the sql file ready, just import that in your database and do a build all and you are done :)

Anybody, who needs it, PM me.
>> Nakul Goyal (SEO, Link Building Expert)
Web Site Promotion
Tips 'n' Tricks
SEO News


Quote Reply
Re: [nakulgoyal] 50 States as Sub Categories In reply to
Anyone have the list of states in short format (CA, AZ, etc) I know . . . lazy.

Chris
Quote Reply
Re: [jnjhost] 50 States as Sub Categories In reply to
Like this?

Quote:
AL
MO
AK
MT
AZ
NE
AR
NV
CA
NH
CO
NJ
CT
NM
DE
NY
DC
NC
FL
ND
GA
OH
OK
OR
HI
PA
ID
RI
IL
SC
IN
SD
IA
TN
KS
TX
KY
UT
LA
VT
ME
VA
MD
WA
MA
WV
MI
WI
MN
WY
MS

http://www.itl.nist.gov/fipspubs/fip5-2.htm

Cheers

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] 50 States as Sub Categories In reply to
Perfect THANKS!

Chris
Quote Reply
Re: [jnjhost] 50 States as Sub Categories In reply to
I used it for DBMAN so I'll post it over there as well, THANKS!
Code:

%db_select_fields = ( state => 'CA,AK,AL,AR,AZ,CO,CT,DC,DE,FL,GA,HI,IA,ID,IL,
IN,KS,KY,LA,MA,MD,ME,MI,MN,MO,MS,MT,NC,ND,NE,NH,NJ,NM,
NV,NY,OH,OK,OR,PA,RI,SC,SD,TN,TX,UT,VA,VT,WA,WI,WV,WY'
);

Chris