Gossamer Forum
Home : Products : DBMan : Discussions :

Creating Categories

Quote Reply
Creating Categories
I use links 2. while my perl knowledge is very limited, I have done some programming in other languages.

My question is about categories in dbman. while I have done some searching and viewed the dbman sites of deni, I am not sure how to implement them in dbman. I don't see where they exist in the dbman files or code.

I don't see a mod in the resource section saying here is how to implement them.

I have seen many posts on using categories in dbman but not how to create them. I have obviously missed something.

So, if anyone can help point me in the right direction, I would be most appreciative.

I may want to use the categories I have set up in links 2 but I may want to do something apart from the links file.

Thanks


Gene
"The older I get, the more I admire competence, just simple competence in any field from adultery to zoology."
Quote Reply
Re: [esm] Creating Categories In reply to
Categories in DBMan would be considered select fields:

In the default.cfg you have as an example:

# Select fields. Field name => 'comma seperated list of drop down options'.
%db_select_fields = (
Category => 'General,Configuration Management,Project Management,Process Improvement,Standards,Testing & Quality Assurance',
Type => 'Web,Newsgroup,Mailing List,FTP,Gopher'
);

And the fields are defined as:

# Definition of your database. Format is
# field_name => ['position', 'field_type', 'form-length', 'maxlength', 'not_null', 'default', 'valid_expr']

Type => [3, 'alpha', 0, 60, 1, '', ''],
Category => [5, 'alpha', 0, 255, 1, '', ''],

As stated in the readme.txt file:

form-length= the length the form field should be. Set to 0 for select, checkbox or radio buttons,

Hope this helps

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Creating Categories In reply to
thanks for the info.

I was able to set uo dbman to use the links 2.0 links.db file.


Gene
"The older I get, the more I admire competence, just simple competence in any field from adultery to zoology."
Quote Reply
Re: [esm] Creating Categories In reply to
This is probably fairly obvious, but don't forget that Links 2 also uses a separate categories database.

You might find this page helpful as it explains about using DBMan as a relational database (just in case you decide to use DBMan as more than a Links search).
Quote Reply
Re: [wysardry] Creating Categories In reply to
yes, I know; that is the reason for the post: how to get it into dbman. I knew that dbman did not appear to have a separate file for the categories.


Gene
"The older I get, the more I admire competence, just simple competence in any field from adultery to zoology."
Quote Reply
Re: [esm] Creating Categories In reply to
You "get it into" DBMan in the same way as you did with the links.db files. i.e. By copying/moving the files across and changing the paths accordingly

If you want to access the data as if the links.db and categories.db files are connected to form a relational database (as Links 2 does), you need to read the page I gave the link for.

Hint: Look at the where the links in the Links 2 admin panel lead to. (They're in the form of db.cgi?db=links or db.cgi?db=categories which is similar to how you specify which database to use in DBMan.)

I haven't heard of anyone else using DBMan with the Links 2 databases in this way, because DBMan doesn't have the page build or extra user options. If you copy those across too, you have basically moved the whole of Links 2 (seeing as it's based on the DBMan engine).

If you're doing all this just because you prefer the DBMan search to the Links 2 user search, take a closer look at the search in the Links 2 admin panel. It's basically the same thing!

It would probably be easier to alter the behaviour of the search.cgi program instead (unless there are other parts of Links 2 you dislike).
Quote Reply
Re: [wysardry] Creating Categories In reply to
actually, I was just seeing if I could use dbman to access the links.db file. Once I fixed the path it was pretty easy. I can access the live links.db from dbman.

my purpose was to see if I could improve the links search by using the dbman search. I liked the dbman search but it showed all the fields from the links.db file. And as I indicated I don't know enough perl, and probably never will, to change that on my own.

yep, I looked at the search feature in the links admin panel which is similar but I would have to do much the same thing - limit which fields appear, again beyond my ability.

The code is amazingly similar ( well, maybe not so amazing ) between the two. I do like links and have no ideas about using dbman in any way except for maybe the search. But I will problably just add to/replace the links search.cgi


Gene
"The older I get, the more I admire competence, just simple competence in any field from adultery to zoology."

Last edited by:

esm: Feb 3, 2003, 3:26 PM