Changeset 17491


Ignore:
Timestamp:
Aug 9, 2012, 3:31:15 PM (12 years ago)
Author:
mistic100
Message:
  • restaure contact link on footer
Location:
extensions/ContactForm
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/ContactForm/include/functions.inc.php

    r17483 r17491  
    99  global $tokens, $page, $conf;
    1010 
    11   define('CONTACT_FORM_PUBLIC', make_index_url(array('section' => 'contact')) . '/');
     11  if (!defined('CONTACT_FORM_PUBLIC')) define('CONTACT_FORM_PUBLIC', make_index_url(array('section' => 'contact')) . '/');
    1212
    1313  if ($tokens[0] == 'contact')
     
    4242  if ( !count(get_contact_emails()) ) return;
    4343 
    44   if (!defined('CONTACT_FORM_PUBLIC')) define('CONTACT_FORM_PUBLIC', make_index_url(array('section' => 'contact2')) . '/');
     44  if (!defined('CONTACT_FORM_PUBLIC')) define('CONTACT_FORM_PUBLIC', make_index_url(array('section' => 'contact')) . '/');
    4545
    4646  $menu = &$menu_ref_arr[0];
     
    6464  ));
    6565  return $menu;
     66}
     67
     68/**
     69 * change contact on link on footer
     70 */
     71function contact_form_footer_link($content, &$smarty)
     72{
     73  $search = '<a href="mailto:{$CONTACT_MAIL}?subject={\'A comment on your site\'|@translate|@escape:url}">';
     74  $replace = '<a href="'.CONTACT_FORM_PUBLIC.'">';
     75  return str_replace($search, $replace, $content);
    6676}
    6777
  • extensions/ContactForm/language/fr_FR/plugin.lang.php

    r17483 r17491  
    3333$lang['E-mail address is mandatory'] = 'Présence de l\'e-mail obligatoire';
    3434$lang['Name is mandatory'] = 'Présence du nom obligatoire';
    35 $lang['E-mail configuration'] = 'E-mail configuration';
     35$lang['E-mail configuration'] = 'Configuration des e-mails';
    3636$lang['E-mail format :'] = 'Format des e-mails :';
    3737$lang['Plain text'] = 'Texte brut';
  • extensions/ContactForm/main.inc.php

    r17483 r17491  
    2222{
    2323  add_event_handler('get_admin_plugin_menu_links', 'contact_form_admin_menu');
     24  define('CONTACT_FORM_PUBLIC', make_index_url(array('section' => 'contact')) . '/');
    2425}
    2526
     
    2930function contact_form_init()
    3031{
    31   global $conf;
     32  global $conf, $template;
    3233  $conf['ContactForm'] = unserialize($conf['ContactForm']);
    3334 
     
    3839    contact_form_initialize_emails();
    3940  }
     41 
     42  $template->set_prefilter('tail', 'contact_form_footer_link');
    4043}
    4144
Note: See TracChangeset for help on using the changeset viewer.