Wikka Change Notifier
This script will email user of changes in a wikka wiki via cron job. It uses the
SimplePie library∞ to read the Wikka
RecentChanges XML page and
PHPMailer library∞ to email the notice. It is packaged with both under terms of the
GPL∞.
download here∞
Documentation
installation
Because of the wikka .htaccess settings, you can't put it in the wikka directory (as far as I know). I usually upload to the web root directory.
To test, set $_SET['call_directly'] = 1 and call page in browser.
configuration
I've tried to minimize changes needed to configure. There are two sections marked setting: Path Settings and Script Settings:
// * Path Settings
$_DIR['super'] =
dirname($_SERVER['DOCUMENT_ROOT']) . _DS;
$_DIR['this_root'] =
dirname(__FILE__) . _DS;
$_DIR['wikka_root'] =
$_SERVER['DOCUMENT_ROOT'] . _DS .
'wikka' . _DS;
$_DIR['simplepie'] =
$_DIR['this_root'] .
'SimplePie' . _DS;
$_DIR['phpmailer'] =
$_DIR['this_root'] .
'phpmailer' . _DS;
$_PATH['simplepie_cache'] =
$_DIR['this_root'] .
'cache' . _DS;
// * Script Settings
$_SET['update_period'] =
6;
// hours
$_SET['wikka_xml_feed'] =
'http://DOMAIN.com/wikka' .
'/RecentChanges/recentchanges.xml';
$_SET['email_to'] =
'YOUR_EMAIL@gmail.com';
$_SET['email_to_name'] =
'Wikka Admin';
$_SET['email_from_name'] =
'Wikka Update Notifier';
$_SET['email_from'] =
$_SERVER['SERVER_ADMIN'];
$_SET['email_subject'] =
'Wikka Changes Update : ' .
date('r');
$_SET['call_directly'] =
0;
// for testing, set to 0 to run as cron exclusively
Coordinate cron tab with
$_SET['update_period'] -- i.e., if it is set to 6 (hours), run your cron every 6 hours. With my cPanel accounts, I use the following command:
lynx -dump 'http://yourdomain.com/wikka_changemail/cron.changemail.php'
result
When successfully run, the script will send an email that looks like this:
SUBJECT: Wikka Changes Update : Fri, 16 Mar 2007 18:30:01 -0500
2 changes to http://www.klenwell.net/is/ in last 6 hours
KlenwellAdmin (2007-03-16 14:30:52 by KlenwellAdmin)
http://www.klenwell.net/is/KlenwellAdmin
updated 0 days 3 hours 59 mins 9 secs ago
HostingAdminCron (2007-03-16 12:42:10 by KlenwellAdmin)
http://www.klenwell.net/is/HostingAdminCron
updated 0 days 5 hours 47 mins 51 secs ago
Reference
Other Wikka Notification Scripts
Page Watches (db-based email script)∞
Events Notification (db-based email script)∞
Notify on Change (simple email script)∞
There are no comments on this page. [Add comment]