NOTE TO UPGRADERS:
Always make backups....always; backup up your database and your rakim-dev/
directory....make backups.
If you are upgrading RAKIM from the 0.8 version, you can likely use the
following ALTER statements to change your database schema:
ALTER TABLE lib2lib ADD COLUMN greeting int;
ALTER TABLE lib2lib ALTER COLUMN greeting SET default '0';
ALTER TABLE lib2lib ADD COLUMN farewell int;
ALTER TABLE lib2lib ALTER COLUMN farewell SET default '0';
ALTER TABLE lib_survey ADD COLUMN when_surveyed timestamp without time zone;
ALTER TABLE lib_survey ALTER COLUMN when_surveyed SET default NULL;
ALTER TABLE librarians ADD COLUMN large_input boolean;
ALTER TABLE librarians ALTER COLUMN large_input SET default 'f';
ALTER TABLE messages ADD COLUMN startcobrowse boolean;
ALTER TABLE messages ALTER COLUMN startcobrowse SET default 'f';
ALTER TABLE messages ADD COLUMN endcobrowse boolean;
ALTER TABLE messages ALTER COLUMN endcobrowse SET default 'f';
ALTER TABLE patron_survey ADD COLUMN when_surveyed timestamp without time zone;
ALTER TABLE patron_survey ALTER COLUMN when_surveyed SET default NULL;
CREATE INDEX queues_patron_status_idx ON queues(patron_status);
CREATE INDEX messages_patron_id_idx ON messages(patron_id);
INSERT INTO librarians VALUES (1,NULL,NULL,NULL,'administrator',NULL,'200ceb26807d6bf99fd6f4f0d1ca54d4',0,'',NULL,'http://www.google.com/',NULL,NULL,'on',NULL,'yes','f',NULL,NULL,'t','t','f');
If these run successfully, your database will be upgraded, but the directory
will still need to be updated; I'd suggest moving your existing rakim-dev
directory, untarring the new one, and proceed from there....
Since your database already exists, you can skip to step #4.
I've only done a test upgrade, so YMMV; mail if you
have any questions/troubles.
-------------------------------------------------------------------------
Installing RAKIM-dev with PostgreSQL:
1. Create a database to use:
createdb rakim_dev
2. Create the tables to use; you may have to become the postgres
(super)user for the next couple of commands:
psql rakim_dev < schema/rakim_dev.pgsql
Grant the appropriate rights to the appropriate user:
grant all on database rakim_test to theUser;
3. Edit rakim-dev/config.php to reflect the database name and user above
$dbType = "pgsql";
if ($dbType == "pgsql") {
$port = ":5432";
}
$dbUser = "theUser";
$dbPassword = "thePassword";
$dbHost = "localhost";
$dbName = "rakim_dev";
There are other things to configure in this file, like email
addresses, refresh rates, what HTML tags to allow in messages,
etc....take a look....
4. You can also change almost every piece of text in RAKIM (except the
admin area, cuz i'm lazy) by modifying the provided
rakim-dev/english.php or rakim-dev/german.php files. If you'd like
to translate into another language, that would be great....send it
to rob@styro.lib.muohio.edu
5. In a browser, visit rakim-dev/admin/, providing the following:
username: administrator
password: administrator
You will be forced to change this password upon login, so be ready;
you can't proceed without changing the password.
6. Choose "edit an institution", and proceed to do so.
7. Then "add a librarian", and proceed to do so.
8. In a browser, visit rakim-dev/librarian/, supplying the librarian
name and password you just added. You're now logged in, and can
begin answering calls.
9. Open a new browser window, and connect to rakim-dev/patron/, and log in
as a patron....answer the call as the librarian, and chat away...
10. If you want auto-logoff of patrons and librarians, take a look at
admin/checkRakim.php
you should place a line similar to the following in your crontab:
* * * * * /path/to/checkRakim.php
this will have it run every minute, checking for negligent types ;)
this needs to run as a user that can delete sess_* files (usually
stored in /tmp/), so you might want to run this as root, or something...
PLEASE read the notes in checkRakim.php before you turn it on...2
minutes of reading and php.ini tweaking might save you some headaches.
----------------------------------------------------------------------
I haven't looked at the email stuff in a LONG time, so your mileage may vary.
We're not currently using it, so it could probably use a good look/rewrite,
but if you're brave, and run into problems, I'll try to help.....
----------------------------------------------------------------------
11. If you want to use the email module, you don't need to do much; there
is another cron job at admin/checkEmail.php that will email any admins
that an email question has gone unanswered for a set period of time;
its all configurable in that file itself.
you should place a line similar to the following in your crontab:
00 2 * * * /path/to/checkEmail.php
the same caveats apply to checkEmail.php as checkRakim.php...read the
notes.
I haven't looked at the email stuff in a LONG time, so I may not be
much help....just a warning....
12. Emails sent from rakim's email module will come from a user account;
i've created a .forward file, and a PHP commandline script, that can
be used in case customers/patrons reply to that email...they're in
rakim-dev/email/auto....the procedure is this:
1. create the user (eg., ref) to receive that email
2. cp rakim-dev/email/auto/dot-forward /home/ref/.forward
3. cp rakim-dev/email/auto/*.php /home/ref/
4. edit /home/ref/config.php and /home/ref/handleEmail.php
to reflect the absolute paths of the appropriate files
once its all set up correctly, any mail sent to ref@yourhost.com
should get inserted into the database, and automatically claimed
by the librarian who answered.
this behavior might change, as this email stuff is VERY rough....
it should facilitate a LOT more, but i threw this together one
afternoon, and have been patching it since ;)....prolly needs a
rewrite....