Changeset 20441


Ignore:
Timestamp:
Jan 28, 2013, 5:25:11 PM (8 years ago)
Author:
mistic100
Message:

change $BODY_ID

Location:
extensions/ContactForm
Files:
3 edited

Legend:

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

    r19180 r20441  
    101101  'KEY' => get_ephemeral_key(3),
    102102  'CONTACT_FORM_PATH' => CONTACT_FORM_PATH,
    103   'CONTACT_FORM_ABS_PATH'=> dirname(__FILE__).'/../',
     103  'CONTACT_FORM_ABS_PATH'=> realpath(CONTACT_FORM_PATH).'/',
    104104  'F_ACTION' => CONTACT_FORM_PUBLIC,
    105105  ));
  • extensions/ContactForm/include/functions.inc.php

    r19180 r20441  
    1313    $page['section'] = 'contact';
    1414    $page['title'] = $page['section_title'] = '<a href="'.get_absolute_root_url().'">'.l10n('Home').'</a>'.$conf['level_separator'].'<a href="'.CONTACT_FORM_PUBLIC.'">'.l10n('Contact').'</a>';
     15   
     16  }
     17}
     18function contact_form_header()
     19{
     20  global $page, $template;
     21 
     22  if (isset($page['section']) and $page['section'] == 'contact')
     23  {
     24    $page['body_id'] = 'theContactPage';
     25    $template->assign('BODY_ID', $page['body_id']);
    1526  }
    1627}
     
    352363function check_email_validity($mail_address)
    353364{
    354   if (version_compare(PHP_VERSION, '5.2.0') >= 0)
     365  if (function_exists('email_check_format'))
     366  {
     367    return email_check_format($mail_address); // Piwigo 2.5
     368  }
     369  else if (version_compare(PHP_VERSION, '5.2.0') >= 0)
    355370  {
    356371    return filter_var($mail_address, FILTER_VALIDATE_EMAIL)!==false;
  • extensions/ContactForm/main.inc.php

    r18891 r20441  
    3030{
    3131  add_event_handler('loc_end_section_init', 'contact_form_section_init');
     32  add_event_handler('loc_end_page_header', 'contact_form_header');
    3233  add_event_handler('loc_end_index', 'contact_form_page');
    3334  add_event_handler('blockmanager_apply', 'contact_form_applymenu', EVENT_HANDLER_PRIORITY_NEUTRAL+10);
Note: See TracChangeset for help on using the changeset viewer.