Ignore:
Timestamp:
Aug 25, 2013, 12:36:50 PM (11 years ago)
Author:
mistic100
Message:

error with question_mark_in_urls=false, restore full language keys
+ de_DE for icons.lang.php

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/EasyCaptcha/main.inc.php

    r24233 r24234  
    3131else
    3232{
    33   add_event_handler('init', 'easycaptcha_document_init');
    34   add_event_handler('loc_end_section_init', 'easycaptcha_section_init', EVENT_HANDLER_PRIORITY_NEUTRAL+30);
     33  add_event_handler('loc_end_section_init', 'easycaptcha_document_init', EVENT_HANDLER_PRIORITY_NEUTRAL+30);
    3534}
    3635
     
    6766
    6867
    69 // modules : picture comment & register
     68// modules
    7069function easycaptcha_document_init()
    7170{
    72   global $conf, $user;
     71  global $conf, $pwg_loaded_plugins, $page;
    7372
    7473  if (!is_a_guest()) return;
     
    8483    include(EASYCAPTCHA_PATH . 'include/picture.inc.php');
    8584  }
    86 
    87 }
    88 
    89 // modules : album comment & contact & guestbook
    90 function easycaptcha_section_init()
    91 {
    92   global $conf, $pwg_loaded_plugins, $page;
    93 
    94   if (!is_a_guest() || !isset($page['section'])) return;
    95 
    96   if (
    97     script_basename() == 'index' &&
    98     $page['section'] == 'categories' && isset($page['category']) &&
    99     isset($pwg_loaded_plugins['Comments_on_Albums']) &&
    100     $conf['EasyCaptcha']['activate_on']['category']
    101     )
     85  else if (isset($page['section']))
    10286  {
    103     $conf['EasyCaptcha']['template'] = 'comment';
    104     include(EASYCAPTCHA_PATH . 'include/category.inc.php');
    105   }
    106   else if ( $page['section'] == 'contact' && $conf['EasyCaptcha']['activate_on']['contactform'] )
    107   {
    108     $conf['EasyCaptcha']['template'] = 'contactform';
    109     include(EASYCAPTCHA_PATH . 'include/contactform.inc.php');
    110   }
    111   else if ( $page['section'] == 'guestbook' && $conf['EasyCaptcha']['activate_on']['guestbook'] )
    112   {
    113     $conf['EasyCaptcha']['template'] = 'guestbook';
    114     include(EASYCAPTCHA_PATH . 'include/guestbook.inc.php');
     87    if (
     88      script_basename() == 'index' &&
     89      $page['section'] == 'categories' && isset($page['category']) &&
     90      isset($pwg_loaded_plugins['Comments_on_Albums']) &&
     91      $conf['EasyCaptcha']['activate_on']['category']
     92      )
     93    {
     94      $conf['EasyCaptcha']['template'] = 'comment';
     95      include(EASYCAPTCHA_PATH . 'include/category.inc.php');
     96    }
     97    else if ( $page['section'] == 'contact' && $conf['EasyCaptcha']['activate_on']['contactform'] )
     98    {
     99      $conf['EasyCaptcha']['template'] = 'contactform';
     100      include(EASYCAPTCHA_PATH . 'include/contactform.inc.php');
     101    }
     102    else if ( $page['section'] == 'guestbook' && $conf['EasyCaptcha']['activate_on']['guestbook'] )
     103    {
     104      $conf['EasyCaptcha']['template'] = 'guestbook';
     105      include(EASYCAPTCHA_PATH . 'include/guestbook.inc.php');
     106    }
    115107  }
    116108}
Note: See TracChangeset for help on using the changeset viewer.