Last change
on this file since 17483 was
17483,
checked in by mistic100, 12 years ago
|
entirely rewrite the plugin
- send mail in html format (configurable to plain)
- fully configurable email list
- more...
|
File size:
1.2 KB
|
Line | |
---|
1 | <?php |
---|
2 | /* |
---|
3 | Plugin Name: Contact Form |
---|
4 | Version: auto |
---|
5 | Description: Add a "Contact" item in the Menu block to offer a contact form to users |
---|
6 | Plugin URI: http://piwigo.org/ext/extension_view.php?eid=304 |
---|
7 | Author: Piwigo Team |
---|
8 | Author URI: http://piwigo.org |
---|
9 | */ |
---|
10 | |
---|
11 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
12 | |
---|
13 | define('CONTACT_FORM_PATH', PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/'); |
---|
14 | define('CONTACT_FORM_ADMIN', get_root_url() . 'admin.php?page=plugin-' . basename(dirname(__FILE__))); |
---|
15 | |
---|
16 | |
---|
17 | add_event_handler('init', 'contact_form_init'); |
---|
18 | add_event_handler('loc_end_section_init', 'contact_form_section_init'); |
---|
19 | add_event_handler('loc_end_index', 'contact_form_page'); |
---|
20 | add_event_handler('blockmanager_apply', 'contact_form_applymenu', EVENT_HANDLER_PRIORITY_NEUTRAL+10); |
---|
21 | if (defined('IN_ADMIN')) |
---|
22 | { |
---|
23 | add_event_handler('get_admin_plugin_menu_links', 'contact_form_admin_menu'); |
---|
24 | } |
---|
25 | |
---|
26 | include(CONTACT_FORM_PATH . 'include/functions.inc.php'); |
---|
27 | |
---|
28 | |
---|
29 | function contact_form_init() |
---|
30 | { |
---|
31 | global $conf; |
---|
32 | $conf['ContactForm'] = unserialize($conf['ContactForm']); |
---|
33 | |
---|
34 | load_language('plugin.lang', CONTACT_FORM_PATH); |
---|
35 | |
---|
36 | if ($conf['ContactForm']['cf_must_initialize']) |
---|
37 | { |
---|
38 | contact_form_initialize_emails(); |
---|
39 | } |
---|
40 | } |
---|
41 | |
---|
42 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.