2018-11-01 11:58:31 +00:00
|
|
|
# Kwotes
|
|
|
|
|
|
|
|
Kwotes Sourceode, migrated from https://sourceforge.net/p/kwotes/, which is dead nowadays.
|
|
|
|
|
|
|
|
# Install Instructions
|
|
|
|
|
|
|
|
These are the original install instructions:
|
|
|
|
|
|
|
|
## What you need
|
|
|
|
|
|
|
|
- CGI/Perl enabled web server
|
|
|
|
- Mysql
|
|
|
|
- DBI
|
|
|
|
- DBD::Mysql
|
|
|
|
|
|
|
|
## Installing DBI and DBD::MySql
|
|
|
|
|
|
|
|
At a console:
|
|
|
|
|
|
|
|
```
|
|
|
|
perl -MCPAN -eshell
|
|
|
|
```
|
|
|
|
|
|
|
|
In the CPAN console:
|
|
|
|
|
|
|
|
```
|
|
|
|
cpan> install Bundle::DBI
|
|
|
|
cpan> install DBD::mysql
|
|
|
|
```
|
|
|
|
|
|
|
|
## Extracting the tarball
|
|
|
|
|
|
|
|
```
|
|
|
|
tar -zxvf kwotes.tar.gz
|
|
|
|
```
|
|
|
|
|
|
|
|
## Setting up the Database
|
|
|
|
|
|
|
|
Add the required kwotes tables to the database (in the directory where you
|
|
|
|
extracted kwotes):
|
|
|
|
|
|
|
|
```
|
|
|
|
mysql -u database_user -D database_name -h database_host_name -p < kwotes.sql
|
|
|
|
```
|
|
|
|
|
|
|
|
## Configuring Kwotes
|
|
|
|
|
|
|
|
Open kwotes.conf.pl in your favorite text editor and modify as needed. The
|
|
|
|
only values that you MUST change are in the database section. They are:
|
|
|
|
|
|
|
|
> $DB_TYPE - the database type (Must be mysql for now)
|
|
|
|
> $DB_NAME - the name of the database on the database server
|
|
|
|
> $DB_HOST - the hostname or ip address of the database server
|
|
|
|
> $DB_USER - the username for connecting to the database
|
|
|
|
> $DB_PASS - the password for connecting to the database
|
|
|
|
|
|
|
|
Other options that are cool for tweaking the functionality of kwotes can be
|
|
|
|
found in the "GENERAL STUFF" section of the configuration file.
|
|
|
|
|
|
|
|
## Setting Permissions
|
|
|
|
|
|
|
|
Setting everything to 755 (rwxr-xr-x) doesn't hurt:
|
|
|
|
|
|
|
|
```
|
|
|
|
cd kwotes-directory;
|
|
|
|
chmod -R 755 *
|
|
|
|
```
|
|
|
|
|
|
|
|
You can come up with something more restrictive if you like.
|
|
|
|
|
|
|
|
## Cron Job
|
|
|
|
|
|
|
|
To facilite deleting "bad" quotes, kwotes uses cron. To enable this setup a
|
|
|
|
cron job to run once an hour, like so:
|
|
|
|
|
|
|
|
```
|
|
|
|
crontab -e
|
|
|
|
```
|
|
|
|
|
|
|
|
Add the following entry:
|
|
|
|
|
|
|
|
```
|
|
|
|
0 * * * * /path/to/perl /path/to/kwotes.pl cleanup
|
|
|
|
```
|
|
|
|
|
|
|
|
Of course you should put the real path to your perl program and to kwotes.pl
|
|
|
|
otherwise it wont work.
|
|
|
|
|
|
|
|
## Customizing
|
|
|
|
|
|
|
|
Kwotes can be easily customized by editing the files in the "html" directory
|
|
|
|
directly beneeth the kwotes directory. You can change the "site name" and
|
|
|
|
tagline (text that apears at the top of every page) by editing kwotes.conf.pl
|
2018-11-01 11:37:34 +00:00
|
|
|
|