Changeset 1648
- Timestamp:
- Dec 10, 2006, 11:48:32 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/category_cats.inc.php
r1643 r1648 55 55 ON id = cat_id and user_id = '.$user['id'].' 56 56 WHERE id_uppercat '. 57 (!isset($page['category']) ? 'is NULL' : '= '.$page['category']).' 57 (!isset($page['category']) ? 'is NULL' : '= '.$page['category']); 58 if ($page['filter_mode']) 59 { 60 $query.= ' 61 AND max_date_last > SUBDATE( 62 CURRENT_DATE,INTERVAL '.$user['recent_period'].' DAY)'; 63 } 64 $query.= ' 58 65 ORDER BY rank 59 66 ;'; … … 78 85 SELECT image_id 79 86 FROM '.CATEGORIES_TABLE.' AS c INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic 80 ON ic.category_id = c.id 87 ON ic.category_id = c.id'; 88 if ($page['filter_mode']) 89 { 90 $query.= ' 91 INNER JOIN '.IMAGES_TABLE.' AS i on ic.image_id = i.id '; 92 } 93 $query.= ' 81 94 WHERE uppercats REGEXP \'(^|,)'.$row['id'].'(,|$)\' 82 AND c.id NOT IN ('.$user['forbidden_categories'].') 95 AND c.id NOT IN ('.$user['forbidden_categories'].')'; 96 if ($page['filter_mode']) 97 { 98 $query.= ' 99 AND i.date_available > SUBDATE( 100 CURRENT_DATE,INTERVAL '.$user['recent_period'].' DAY)'; 101 } 102 $query.= ' 83 103 ORDER BY RAND() 84 104 LIMIT 0,1 … … 94 114 $query = ' 95 115 SELECT representative_picture_id 96 FROM '.CATEGORIES_TABLE.' 116 FROM '.CATEGORIES_TABLE.' INNER JOIN '.USER_CACHE_CATEGORIES_TABLE.' 117 ON id = cat_id and user_id = '.$user['id'].' 97 118 WHERE uppercats REGEXP \'(^|,)'.$row['id'].'(,|$)\' 98 AND id NOT IN ('.$user['forbidden_categories'].') 99 AND representative_picture_id IS NOT NULL 119 AND representative_picture_id IS NOT NULL'; 120 if ($page['filter_mode']) 121 { 122 $query.= ' 123 AND max_date_last > SUBDATE( 124 CURRENT_DATE,INTERVAL '.$user['recent_period'].' DAY)'; 125 } 126 $query.= ' 100 127 ORDER BY RAND() 101 128 LIMIT 0,1 -
trunk/include/category_default.inc.php
r1596 r1648 47 47 SELECT * 48 48 FROM '.IMAGES_TABLE.' 49 WHERE id IN ('.implode(',', $selection).') 50 ;'; 49 WHERE id IN ('.implode(',', $selection).')'; 50 if ($page['filter_mode']) 51 { 52 $query.= ' 53 AND date_available > SUBDATE( 54 CURRENT_DATE,INTERVAL '.$user['recent_period'].' DAY)'; 55 } 56 $query.= ';'; 51 57 $result = pwg_query($query); 52 58 while ($row = mysql_fetch_assoc($result)) -
trunk/include/functions_category.inc.php
r1641 r1648 68 68 FROM '.CATEGORIES_TABLE.' INNER JOIN '.USER_CACHE_CATEGORIES_TABLE.' 69 69 ON id = cat_id and user_id = '.$user['id']; 70 if ( !$user['expand'])70 if ($page['filter_mode']) 71 71 { 72 72 $query.= ' 73 WHERE (id_uppercat is NULL'; 74 if (isset($page['category'])) 75 { 76 $query.= ' OR id_uppercat IN ('.$page['uppercats'].')'; 77 } 78 $query.= ')'; 73 where max_date_last > SUBDATE( 74 CURRENT_DATE,INTERVAL '.$user['recent_period'].' DAY)'; 75 } 76 else 77 { 78 // Always expand when filter_mode is activated 79 if (!$user['expand']) 80 { 81 $query.= ' 82 WHERE (id_uppercat is NULL'; 83 if (isset($page['category'])) 84 { 85 $query.= ' OR id_uppercat IN ('.$page['uppercats'].')'; 86 } 87 $query.= ')'; 88 } 79 89 } 80 90 $query.= ' -
trunk/include/menubar.inc.php
r1636 r1648 168 168 'NAME' => $lang['random_cat'] 169 169 )); 170 // recent pics 171 $template->assign_block_vars( 172 'special_cat', 173 array( 174 'URL' => make_index_url(array('section' => 'recent_pics')), 175 'TITLE' => $lang['recent_pics_cat_hint'], 176 'NAME' => $lang['recent_pics_cat'] 177 )); 178 // recent cats 179 $template->assign_block_vars( 180 'special_cat', 181 array( 182 'URL' => make_index_url(array('section' => 'recent_cats')), 183 'TITLE' => $lang['recent_cats_cat_hint'], 184 'NAME' => $lang['recent_cats_cat'] 185 )); 170 171 // Not recent menu when filter is activated 172 if (!$page['filter_mode']) 173 { 174 // recent pics 175 $template->assign_block_vars( 176 'special_cat', 177 array( 178 'URL' => make_index_url(array('section' => 'recent_pics')), 179 'TITLE' => $lang['recent_pics_cat_hint'], 180 'NAME' => $lang['recent_pics_cat'] 181 )); 182 // recent cats 183 $template->assign_block_vars( 184 'special_cat', 185 array( 186 'URL' => make_index_url(array('section' => 'recent_cats')), 187 'TITLE' => $lang['recent_cats_cat_hint'], 188 'NAME' => $lang['recent_cats_cat'] 189 )); 190 } 186 191 187 192 // calendar -
trunk/index.php
r1627 r1648 105 105 { 106 106 $template_title.= ' ['.$page['cat_nb_images'].']'; 107 } 108 109 if (isset($_GET['filter_mode'])) 110 { 111 $page['filter_mode'] = ($_GET['filter_mode'] == 'start'); 112 pwg_set_session_var('filter_mode', $page['filter_mode']); 113 } 114 else 115 { 116 $page['filter_mode'] = pwg_get_session_var('filter_mode', false); 117 } 118 119 if ($page['filter_mode']) 120 { 121 $template->assign_block_vars( 122 'stop_filter_mode', 123 array( 124 'URL' => add_url_params(duplicate_index_url(array(), array('start')), array('filter_mode' => 'stop')) 125 ) 126 ); 127 } 128 else 129 { 130 $template->assign_block_vars( 131 'start_filter_mode', 132 array( 133 'URL' => add_url_params(duplicate_index_url(array(), array('start')), array('filter_mode' => 'start')) 134 ) 135 ); 107 136 } 108 137 -
trunk/language/en_UK.iso-8859-1/common.lang.php
r1637 r1648 491 491 $lang['maxwidth'] = 'Maximum width of the pictures'; 492 492 $lang['maxwidth_error'] = 'Maximum width must be a number superior to 50'; 493 $lang['start_filter_mode_hint'] = 'displays only recent elements'; 494 $lang['stop_filter_mode_hint'] = 'return to display all elements'; 493 495 $lang['mode_created_hint'] = 'displays a calendar by creation date'; 494 496 $lang['mode_normal_hint'] = 'return to normal view mode'; -
trunk/language/fr_FR.iso-8859-1/common.lang.php
r1637 r1648 492 492 $lang['maxwidth_error'] = 'La largeur des images doit être supérieure à 50'; 493 493 $lang['mode_created_hint'] = 'afficher un calendrier par date de création'; 494 $lang['mode_normal_hint'] = 'retourne à la vue normale'; 494 $lang['start_filter_mode_hint'] = 'afficher que les éléments récents'; 495 $lang['stop_filter_mode_hint'] = 'retourner à l\'affichage de tous les éléments'; 496 $lang['mode_normal_hint'] = 'retourner à la vue normale'; 495 497 $lang['mode_posted_hint'] = 'afficher un calendrier par date d\'ajout'; 496 498 $lang['month'][10] = 'Octobre'; -
trunk/plugins/event_tracer
-
Property
svn:ignore
set to
*.dat
-
Property
svn:ignore
set to
-
trunk/template/yoga/index.tpl
r1537 r1648 27 27 <li><a href="{search_rules.URL}" style="border:none;" onclick="popuphelp(this.href); return false;" title="{lang:Search rules}"><img src="{pwg_root}{themeconf:icon_dir}/search_rules.png" class="button" alt="(?)"></a></li> 28 28 <!-- END search_rules --> 29 30 <!-- BEGIN start_filter_mode --> 31 <li><a href="{start_filter_mode.URL}" title="{lang:start_filter_mode_hint}"><img src="{pwg_root}{themeconf:icon_dir}/start_filter_mode.png" class="button" alt="{lang:start_filter_mode_hint}"></a></li> 32 <!-- END start_filter_mode --> 33 <!-- BEGIN stop_filter_mode --> 34 <li><a href="{stop_filter_mode.URL}" title="{lang:stop_filter_mode_hint}"><img src="{pwg_root}{themeconf:icon_dir}/stop_filter_mode.png" class="button" alt="{lang:stop_filter_mode_hint}"></a></li> 35 <!-- END stop_filter_mode --> 29 36 30 37 <!-- BEGIN mode_normal -->
Note: See TracChangeset
for help on using the changeset viewer.