Jul 14, 2000, 2:50 AM
Veteran / Moderator (1203 posts)
Jul 14, 2000, 2:50 AM
Post #6 of 24
Views: 6646
Yeah if anyone wants some instructions some could be posted. However I think most people would be surprised how easy it is to do, also really all of the necessary info on how to do this is given in the standard dbman installation instructions. Also although it can be used alongside links 2 it's not really a mod.
Here is how it's done:
1. Install dbman as it specifies in the instructions.
2. Edit the default.cfg giving the right paths etc….and alter the following:
# Database Definition
# --------------------------------------------------------
# Definition of your database. Format is
# field_name => ['position', 'field_type', 'form-length', 'maxlength', 'not_null', 'default', 'valid_expr']
%db_def = (
ID => [0, 'numer', 5, 8, 1, '', ''],
Title => [1, 'alpha', 40, 75, 1, '', ''],
URL => [2, 'alpha', 40, 75, 1, 'http://', '^http|news|mailto|ftp'],
Date => [3, 'date', 15, 15, 1, \&get_date, ''],
Category => [4, 'alpha', 0, 150, 1, '', ''],
Description => [5, 'alpha', '40x3', 500, 0, '', ''],
Etc……..
Alter the definition above to match the fields in yours links.def (ie copy and paste them across.)
# Select fields. Field name => 'comma seperated list of drop down options'.
%db_select_fields = (
Category =>………………………
Alter the above to include the category names you have in your database.
# Full Path and File name of the database file.
$db_file_name = $db_script_path . "data/links.db";
make sure you put the path to links.db
# Authorization Options
# --------------------------------------------------------
# No Authentication? (1 = "there is no authentication", 0 = "there is authentication")
# If you choose no authentication, then set the permissions of what
# people can do with: @auth_default_permissions below.
$auth_no_authentication = 1;
If using dbman purely as for the search options you'll probably want to turn the above off.
# Default permissions used if there is no authentication, or for a default
# user. (View, Add, Delete, Modify, Admin), 1 = enable, 0 = disable.
@auth_default_permissions = (1,0,0,0,0);
You'll also probably want to change the default permissions to the above. (Ie if you plan to not use the editing options in dbman.
Edit html.pl so that the pages created match your website. (Don't worry, it's no harder than altering templates or site_html.pl etc.. in links).
That's it!
Just change the searchboxes on your site to point to db.cgi instead of search.cgi
(you might need to include some hidden values to get it to work). I did it by just looking at the url output when running a search in the default dbman screen.
To display the links starting with a particular letter eg.A just add the following onto the link you've used to call the db.cgi:
&Title=^a&re=on
Or for links beginning with b:
&Title=^b&re=on
(I got the letter search code above by searching and finding a post in the dbman forum)
Any other questions about how to install, alter dbman etc… are purely dbman related and so should posted in the DBMAN forum.
Much of the code used in dbman is in a similar style to links 2. So ie. if you can alter links 2 you shouldn't find altering bits in dbman a problem.
Glenn