Changeset 21551


Ignore:
Timestamp:
03/14/13 18:06:16 (6 years ago)
Author:
mistic100
Message:

overload nb_images_page everywhere (for "top" link in picture.php)

File:
1 edited

Legend:

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

    r18124 r21551  
    2626} 
    2727 
    28 add_event_handler('loc_begin_index', 'GThumb_init', 60); 
     28add_event_handler('init', 'GThumb_init'); 
     29add_event_handler('loc_begin_index', 'GThumb_index', 60); 
    2930add_event_handler('loc_end_index', 'GThumb_remove_thumb_size'); 
    3031add_event_handler('get_admin_plugin_menu_links', 'GThumb_admin_menu'); 
     
    3233function GThumb_init() 
    3334{ 
    34   global $conf, $user, $page, $template; 
     35  global $conf, $user, $page; 
    3536   
    3637  // new param in 2.4.c 
     
    4041    conf_update_param('GThumb', serialize($conf['GThumb'])); 
    4142  } 
    42    
    43  
    44   $template->set_prefilter('index', 'GThumb_prefilter'); 
    45  
    46   add_event_handler('loc_end_index_thumbnails', 'process_GThumb', 50, 2); 
    4743 
    4844  $user['nb_image_page'] = $conf['GThumb']['nb_image_page']; 
    4945  $page['nb_image_page'] = $conf['GThumb']['nb_image_page']; 
    5046  $conf['show_thumbnail_caption'] = $conf['GThumb']['show_thumbnail_caption']; 
     47} 
     48 
     49function GThumb_index() 
     50{ 
     51  global $template; 
     52   
     53  $template->set_prefilter('index', 'GThumb_prefilter'); 
     54 
     55  add_event_handler('loc_end_index_thumbnails', 'process_GThumb', 50, 2); 
    5156} 
    5257 
Note: See TracChangeset for help on using the changeset viewer.