Changeset 3843 for extensions/akBookStyle/trunk/include
- Timestamp:
- Sep 13, 2009, 8:00:47 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/akBookStyle/trunk/include/akContent.class.php
r3842 r3843 34 34 $this->next_picture = null; 35 35 $this->previous_picture = null; 36 $this->applicable = false; 36 37 } 37 38 38 public function user_force() { 39 $GLOBALS['user']['nb_image_page'] = $this->plugin_config->ak_by_page; 39 public function page_force() { 40 global $page; 41 if ( isset($page['category']) ) { 42 $cat_filter = $this->plugin_config->ak_categories; 43 $this->applicable = (stripos($page['category']['name'], $cat_filter) > 0) ? true:false; 44 if ( $this->applicable ) { 45 $page['nb_image_page'] = $this->plugin_config->ak_by_page; 46 } 47 } 40 48 } 41 49 42 50 public function loc_begin_index_thumbnails($images) { 43 51 global $template; 52 if ($this->applicable === false) return; 44 53 $this->category_url = make_index_url(array('section' => 'category', 45 54 'category' => $GLOBALS['page']['category'], … … 69 78 70 79 public function loc_end_index_thumbnails($tpl_vars, $images) { 80 if ($this->applicable === false) return $tpl_vars; 71 81 foreach ($tpl_vars as &$tpl_var) { 72 82 $tpl_var['AK_URL'] = $this->makeAkUrl($tpl_var);
Note: See TracChangeset
for help on using the changeset viewer.