#28 General purpose database module

Next_Release
closed
Database (9)
7
2012-09-15
2003-05-08
No

Here's the alpha of the general purpose database
module. Zip file is attached below. Readme follows:

Directions to install the general-purpose database module:

1 - Untar the contents of the tar file into your
modules directory, e.g.
/your_apache_install_location/cgi-bin/YaWPS/modules

You should get a subdirectory called Objects:
/your_apache_install_location/cgi-bin/YaWPS/modules/Objects

It will contain the following files:

admin.cgi
index.cgi
Objects.dat
objectcats.dat
README.TXT

At this point you will see the Objects menu item appear
on your YaWPS page, but it will not be functional yet.

2 - Rename your Objects directory to whatever you want
to appear in your Objects menu. Alphabetic characters,
hyphens, and underscores are legal module names. E.g.

mv Objects Widgets

DO NOT CHANGE THE NAME OF THE Objects.dat OR
objectcats.dat FILES.

3 - Create a directory in
/your_apache_install_location/cgi-bin/YaWPS/db/modules
with the same name that you just used for your module.
CASE MATTERS. Make sure the directory is at least 755
and is owned by nobody or whatever uid your web server
runs as.

4 - Move the objectcats.dat file to the directory you
just created in the db area. Make sure the permissions
on the file are at least 644 and the file is owned by
nobody or whatever uid your web server runs as. DO NOT
CHANGE THE NAME OF THIS FILE. Then
create an empty "default.dat" file in the db directory.

5 - At this point you will be able to click on the
module link and view a default category which you will
probably want to change. You also need to create some
fields in your database. If you are logged in as Admin,
you should see above the category listing:

Edit Table Configuration
Edit Categories
Edit Objects

Alternatively, Use the Site Admin function. At the
bottom under "Module Admin" you will see "Configure
'<your object name>'". Click this link.

You have three options:
Edit Table Configuration
Categories (edit/create/remove)
Objects (edit/remove)

6 - Edit Table Configuration

Use this option to add fields to your table and adjust
permissions on fields and on the whole table. You need
to add at least one field to your table to make your
database useful. The first field has a special
configuration option. You can give it a number of
another field and it will use the contents of the other
field to build a URL to link to.

7 - Edit Categories/Categories (edit/create/remove)

You will probably want to rename the existing "Default"
category and possibly create additional categories.

8 - Edit Objects/Objects (edit/remove)
You can use this function to view all the objects in a
category and edit them, if you have sufficient
permissions according to the table definition. (At a
later time, this function may be integrated into the
regular object display.)

KNOWN DEFICIENCIES WITH THIS RELEASE:

1 - The code is badly organized and crammed into two
big files. It needs to be split up and broken into
reusable sub-files.

2 - "Creator" permissions are not yet implemented. You
can set them, but they never get checked. You'll
probably have to let all your "moderators" edit
everything if you want to let them edit their own entries.

TO DO:

Localize text strings
Reorganize code and recompartmentalize, dbs get own
dirs but not code
Have DB module build its own menu ("Features")
Add in longtext and comments code
Add support for bitflags
Add support for uploaded images
Create/adapt search mechanism
Look at how to implement User db using this
Adapt top10 & stats code
Build more examples: links, articles, banner, quotes
Think about reworking categories as pre-constructed
searches
Possibly port to DBI or XML
Theme display modes (reorganizing code will help here)
Subscription and criteria

Also coming up: a "Collections" module add-on which
will allow users to build collections of records from
the database, and transform them (probably with XML
and XSLT) into various useful forms. In particular, I
plan to use this to build standalone quizzes which can
be emailed to people and which can send email of
results back to the server. It would also be useful to
build compound documents out of selected records.

Discussion

  • Elizabeth Dalton

    Logged In: YES
    user_id=666515

    The Books.tar.gz file attached below contains the following:

    Objects.dat
    objectcats.dat
    fiction.dat
    nonfiction.dat

    These files are used to configure a "bookstore" module which
    uses a partner code to sell books through Powell's. (It uses
    a real partner code, so if you experiment with this, be sure
    to change it to your own code or you'll be accidentally
    donating money to the NH Green Party.) The first file goes
    in your installed Objects module directory, which should be
    named Books (not Objects). The other three go in
    ...YaWPS/db/modules/Books.

    Comments welcome,

    e.d.

     
  • Elizabeth Dalton

    Books.tar.gz

     
  • Elizabeth Dalton

    Logged In: YES
    user_id=666515

    If I upload the latest version with the enhancements Stephen
    Gordon and I have made, can we get this put in the downloads
    section, where people can find it?

    e.d.

     
  • Stephen Gordon

    Stephen Gordon - 2003-11-14

    Logged In: YES
    user_id=843532

    Going to add e's latest version to CVS after I've tested it
    a bit.

     
  • Stephen Gordon

    Stephen Gordon - 2004-02-07

    Logged In: YES
    user_id=843532

    Added to CVS much modified.

     

Log in to post a comment.