Changeset 13194 for extensions/rv_tscroller/main.inc.php
- Timestamp:
- Feb 16, 2012, 8:51:48 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/rv_tscroller/main.inc.php
r12735 r13194 1 1 <?php /* 2 2 Plugin Name: RV Thumb Scroller 3 Version: 2. 3.d3 Version: 2.4.a 4 4 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=493 5 5 Description: Loads async using ajax thumbnails on index page as you scroll down the page … … 7 7 Author URI: http://www.modusoptimus.com 8 8 */ 9 define('RVTS_VERSION', '2 .3.d');9 define('RVTS_VERSION', '24a'); 10 10 11 11 class RVTS … … 14 14 { 15 15 global $page; 16 if (!@$page['start']) 16 $page['nb_image_page'] *= pwg_get_session_var('rvts_mult', 1); 17 if (count($page['items'])<$page['nb_image_page']+3) 17 18 { 18 if (script_basename()!='picture') 19 $page['nb_image_page'] *= pwg_get_session_var('rvts_mult', 1); 20 if (count($page['items'])<$page['nb_image_page']+3) 19 if (!@$page['start'] || script_basename()=='picture') 21 20 $page['nb_image_page'] = max($page['nb_image_page'], count($page['items'])); 22 21 } … … 30 29 if (!$is_ajax) 31 30 { 32 if (empty($page['items']) || @$page['start']>0)31 if (empty($page['items'])) 33 32 add_event_handler('loc_end_index', array('RVTS','on_end_index')); 34 33 else … … 63 62 return $thumbs; 64 63 } 65 $per_page = $page['nb_image_page'];66 64 $url_model = str_replace('123456789', '%start%', duplicate_index_url( array('start'=>123456789) ) ); 67 65 $ajax_url_model = add_url_params($url_model, array( 'rvts'=>'%per%' ) ); … … 84 82 'version' => RVTS_VERSION, 85 83 ), $template->smarty); 84 $start = (int)$page['start']; 85 $per_page = $page['nb_image_page']; 86 86 $moreMsg = 'See the remaining %d photos'; 87 87 if ('en' != $GLOBALS['lang_info']['code']) … … 95 95 "var RVTS = { 96 96 ajaxUrlModel: String.fromCharCode(".ord($ajax_url_model[0]).")+'".substr($ajax_url_model,1)."', 97 start: $per_page, 97 start: $start, 98 perPage: $per_page, 99 next: ".($start+$per_page).", 98 100 total: $total, 99 perPage: $per_page,100 101 moreUrlModel: String.fromCharCode(".ord($url_model[0]).")+'".substr($url_model,1)."', 101 102 moreMsg: '$moreMsg', 103 prevMsg: '".l10n("Previous")."', 102 104 ajaxLoaderImage: '$ajax_loader_image' 103 105 };", … … 140 142 141 143 add_event_handler('loc_end_section_init', array('RVTS','on_end_section_init')); 142 143 144 ?>
Note: See TracChangeset
for help on using the changeset viewer.