Changeset 2135 for trunk/index.php
- Timestamp:
- Oct 12, 2007, 5:27:34 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/index.php
r2117 r2135 104 104 $template_title.= ' ['.count($page['items']).']'; 105 105 } 106 $template->assign_var('TITLE', $template_title); 106 107 107 108 if (isset($page['flat']) or isset($page['chronology_field'])) … … 170 171 include(PHPWG_ROOT_PATH.'include/menubar.inc.php'); 171 172 172 $template->assign_vars(173 array(174 'TITLE' => $template_title175 )176 );177 178 173 if ('search' == $page['section']) 179 174 { … … 200 195 if (is_admin() and !empty($page['items']) ) 201 196 { 202 $template->assign_block_vars( 203 'caddie', 204 array( 205 'URL' => 206 add_url_params(duplicate_index_url(), array('caddie'=>1) ) 207 ) 197 $template->assign_block_vars( 198 'caddie', 199 array( 200 'URL' => 201 add_url_params(duplicate_index_url(), array('caddie'=>1) ) 202 ) 203 ); 204 } 205 206 if ( $page['section']=='search' and $page['start']==0 and 207 !isset($page['chronology_field']) and isset($page['qsearch_details']) ) 208 { 209 $template->assign_var('QUERY_SEARCH', 210 htmlspecialchars($page['qsearch_details']['q']) ); 211 212 $found_cat_ids = array_merge( 213 (array)@$page['qsearch_details']['matching_cats_no_images'], 214 (array)@$page['qsearch_details']['matching_cats'] ); 215 if (count($found_cat_ids)) 216 { 217 $hints = array(); 218 $query = ' 219 SELECT id, name, permalink FROM '.CATEGORIES_TABLE.' 220 WHERE id IN ('.implode(',', $found_cat_ids).') 221 ORDER BY name 222 LIMIT 10'; 223 $result = pwg_query($query); 224 while ( $row = mysql_fetch_assoc($result) ) 225 { 226 $hints[] = get_cat_display_name( array($row) ); 227 } 228 $template->assign_block_vars( 'category_search_results', 229 array( 230 'CONTENT' => implode(' — ', $hints) 231 ) 208 232 ); 209 233 } 210 234 211 if ( $page['section']=='search' and $page['start']==0 ) 212 { 213 $tags = get_common_tags($page['items'], 214 $conf['content_tag_cloud_items_number'], null); 215 if ( count($tags)>1 ) 216 { 217 $template->assign_block_vars('related_tags', array() ); 218 219 $tags = add_level_to_tags($tags); 220 foreach ($tags as $tag) 235 $tags = find_tags( (array)@$page['qsearch_details']['matching_tags'] ); 236 if (count($tags)) 237 { 238 usort($tags, 'name_compare'); 239 $hints = array(); 240 foreach ( $tags as $tag ) 221 241 { 222 $template->assign_block_vars( 223 'related_tags.tag', array( 224 'URL' => make_index_url( 225 array( 226 'tags' => array($tag) 227 ) 228 ), 229 'NAME' => $tag['name'], 230 'TITLE' => l10n_dec( 231 '%d picture are also linked to current tags', 232 '%d pictures are also linked to current tags', 233 $tag['counter']), 234 'CLASS' => 'tagLevel'.$tag['level'] 235 ) 242 $hints[] = 243 '<a href="' . make_index_url(array('tags'=>array($tag))) . '">' 244 .$tag['name'] 245 .'</a>'; 246 } 247 $template->assign_block_vars( 'tag_search_results', 248 array( 249 'CONTENT' => implode(' — ', $hints) 250 ) 236 251 ); 237 }238 252 } 239 253 } … … 300 314 ) 301 315 ); 302 $header_infos['COMMENT'] = strip_tags($page['comment']);303 316 } 304 317 //------------------------------------------------------------ log informations
Note: See TracChangeset
for help on using the changeset viewer.