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

Last change on this file since 17491 was 17491, checked in by mistic100, 12 years ago
  • restaure contact link on footer
File size: 1.3 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  define('CONTACT_FORM_PUBLIC', make_index_url(array('section' => 'contact')) . '/');
25}
26
27include(CONTACT_FORM_PATH . 'include/functions.inc.php');
28
29
30function contact_form_init()
31{
32  global $conf, $template;
33  $conf['ContactForm'] = unserialize($conf['ContactForm']);
34 
35  load_language('plugin.lang', CONTACT_FORM_PATH);
36 
37  if ($conf['ContactForm']['cf_must_initialize'])
38  {
39    contact_form_initialize_emails();
40  }
41 
42  $template->set_prefilter('tail', 'contact_form_footer_link');
43}
44
45?>
Note: See TracBrowser for help on using the repository browser.