source: extensions/ContactForm/main.inc.php @ 17483

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/*
3Plugin Name: Contact Form
4Version: auto
5Description: Add a "Contact" item in the Menu block to offer a contact form to users
6Plugin URI: http://piwigo.org/ext/extension_view.php?eid=304
7Author: Piwigo Team
8Author URI: http://piwigo.org
9*/
10
11if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
12
13define('CONTACT_FORM_PATH',  PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');
14define('CONTACT_FORM_ADMIN', get_root_url() . 'admin.php?page=plugin-' . basename(dirname(__FILE__)));
15
16
17add_event_handler('init', 'contact_form_init');
18add_event_handler('loc_end_section_init', 'contact_form_section_init');
19add_event_handler('loc_end_index', 'contact_form_page');
20add_event_handler('blockmanager_apply', 'contact_form_applymenu', EVENT_HANDLER_PRIORITY_NEUTRAL+10);
21if (defined('IN_ADMIN'))
22{
23  add_event_handler('get_admin_plugin_menu_links', 'contact_form_admin_menu');
24}
25
26include(CONTACT_FORM_PATH . 'include/functions.inc.php');
27
28
29function 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.