root/dev/mods/mail_forward/init.php @ 181

Revision 181, 425 bytes (checked in by exi, 13 years ago)

Changed admin/options to show the actual page as page title.
admin_menu.php now also loads settings from mods.
Added event manager and the first 2 events (comment/killmail added).
Changed config to be in a separate file and modified it to be called static with config::get().
http_request now stores the socket status in $this->status.
Changed MapView? to store pictures based on KB_SITE so it doesnt show a map with wrong colors for the current killboard on a multi-site installation.
Changed options to handle element options (like 'edit:size:40').
Changed options to use the static calls to config.
Changed Page to use the static calls to config.
Changed Session to use session_name() to determine if it should start a session.
index.php now loads module-init-scripts.
Changed post.php to use config and it should now also use the mailserver configuration directive to send emails.
Added a mail_forward-mod to show how easy it can be to develop mods once there are enough events listed.
Fixed 2 typos in battle_overview.tpl.

Line 
1<?php
2event::register('killmail_added', 'post_forward::handler');
3
4class post_forward
5{
6    function handler($object)
7    {
8        require_once('common/class.http.php');
9
10        $req = new http_request(config::get('forward_site').'?a=post');
11
12        $req->set_postform('password', config::get('forward_pass'));
13        $req->set_postform('killmail', $_POST['killmail']);
14        $req->request();
15    }
16}
17?>
Note: See TracBrowser for help on using the browser.