Changeset 2118
- Timestamp:
- Oct 2, 2007, 7:42:22 AM (17 years ago)
- Location:
- branches/branch-1_7
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/branch-1_7/include/category_cats.inc.php
r2094 r2118 179 179 } 180 180 181 // add default event handler for rendering category literal description182 add_event_handler('render_category_literal_description',183 create_function('$d',184 'return strip_tags($d, \'<a><br><p><b><i><small><strong><font>\');'));185 186 181 trigger_action('loc_begin_index_category_thumbnails', $categories); 187 182 if ($conf['subcatify']) -
branches/branch-1_7/include/common.inc.php
r2112 r2118 173 173 174 174 // template instance 175 if 175 if 176 176 ( 177 defined('IN_ADMIN') and IN_ADMIN and 177 defined('IN_ADMIN') and IN_ADMIN and 178 178 isset($user['admin_template']) and 179 179 isset($user['admin_theme']) … … 262 262 263 263 // default event handlers 264 add_event_handler('render_category_literal_description', 'render_category_literal_description'); 265 add_event_handler('render_category_description', 'render_category_description'); 264 266 add_event_handler('render_comment_content', 'htmlspecialchars'); 265 267 add_event_handler('render_comment_content', 'parse_comment_content'); -
branches/branch-1_7/include/functions_category.inc.php
r2069 r2118 157 157 } 158 158 } 159 global $conf;160 if ( !( $conf['allow_html_descriptions'] and161 preg_match('/<(div|br|img|script).*>/i', $cat['comment']) ) )162 {163 $cat['comment'] = nl2br(@$cat['comment']);164 }165 159 166 160 $upper_ids = explode(',', $cat['uppercats']); … … 446 440 $cat_nb_images = 0; 447 441 } 448 442 449 443 //at least one image direct or indirect 450 444 $display_text.= l10n_dec('image_available', 'images_available', $cat_count_images); -
branches/branch-1_7/include/functions_html.inc.php
r2069 r2118 59 59 { 60 60 // Use MySql date in order to standardize all recent "actions/queries" 61 list($page['get_icon_cache']['unix_timestamp']) = 61 list($page['get_icon_cache']['unix_timestamp']) = 62 62 mysql_fetch_array(pwg_query('select UNIX_TIMESTAMP(CURRENT_DATE)')); 63 63 } … … 456 456 $menu.= "\n".'<span class="'; 457 457 // at least one image in this category -> class menuInfoCat 458 $menu.= ($category['nb_images'] > 0 ? "menuInfoCat" 458 $menu.= ($category['nb_images'] > 0 ? "menuInfoCat" 459 459 : "menuInfoCatByChild").'"'; 460 460 $menu.= ' title=" '.$title.'">'; … … 736 736 function set_span_class($count) 737 737 { 738 if ($count > 1) 739 { 738 if ($count > 1) 739 { 740 740 return 'plural'; 741 741 } 742 return ( $count == 0 ) ? 'zero':'one'; 742 return ( $count == 0 ) ? 'zero':'one'; 743 } 744 745 /** returns the category comment for rendering in html. 746 * this is an event handler. don't call directly 747 */ 748 function render_category_description($desc) 749 { 750 global $conf; 751 if ( !( $conf['allow_html_descriptions'] and 752 preg_match('/<(div|br|img|script).*>/i', $desc) ) ) 753 { 754 $desc = nl2br($desc); 755 } 756 return $desc; 757 } 758 759 /** returns the category comment for rendering in html textual mode (subcatify) 760 * this is an event handler. don't call directly 761 */ 762 function render_category_literal_description($desc) 763 { 764 return strip_tags($desc, '<span><p><a><br><b><i><small><big><strong><em>'); 743 765 } 744 766 ?> -
branches/branch-1_7/include/section_init.inc.php
r1997 r2118 205 205 $page, 206 206 array( 207 'comment' => $page['category']['comment'], 207 'comment' => 208 trigger_event( 209 'render_category_description', 210 $page['category']['comment'] 211 ), 208 212 'title' => 209 213 get_cat_display_name($page['category']['upper_names'], '', false), … … 332 336 $page, 333 337 array( 334 'title' => $lang['search_result'], 338 'title' => '<a href="'.duplicate_index_url(array('start'=>0)).'">' 339 .$lang['search_result'].'</a>', 335 340 ) 336 341 ); … … 386 391 $page, 387 392 array( 388 'title' => '<a href="'.duplicate_index_url( ).'">'393 'title' => '<a href="'.duplicate_index_url(array('start'=>0)).'">' 389 394 .$lang['recent_pics_cat'].'</a>', 390 395 'items' => array_from_query($query, 'id'), … … 424 429 $page, 425 430 array( 426 'title' => '<a href="'.duplicate_index_url( ).'">'431 'title' => '<a href="'.duplicate_index_url(array('start'=>0)).'">' 427 432 .$conf['top_number'].' '.$lang['most_visited_cat'].'</a>', 428 433 'items' => array_from_query($query, 'id'), … … 450 455 $page, 451 456 array( 452 'title' => '<a href="'.duplicate_index_url( ).'">'457 'title' => '<a href="'.duplicate_index_url(array('start'=>0)).'">' 453 458 .$conf['top_number'].' '.$lang['best_rated_cat'].'</a>', 454 459 'items' => array_from_query($query, 'id'), … … 473 478 $page, 474 479 array( 475 'title' => '<a href="'.duplicate_index_url( ).'">'480 'title' => '<a href="'.duplicate_index_url(array('start'=>0)).'">' 476 481 .$lang['random_cat'].'</a>', 477 482 'items' => array_from_query($query, 'id'), -
branches/branch-1_7/index.php
r2113 r2118 297 297 'cat_infos.comment', 298 298 array( 299 'COMMENTS' => 300 trigger_event('render_category_description', $page['comment']) 299 'COMMENTS' => $page['comment'] 301 300 ) 302 301 ); -
branches/branch-1_7/plugins/admin_multi_view/is_admin.inc.php
r2017 r2118 12 12 { 13 13 list($user['template'], $user['theme']) = explode('/', $theme); 14 unset( $user['admin_template'], $user['admin_theme']); 14 15 } 15 16 $lang = pwg_get_session_var( 'multiview_lang', '' );
Note: See TracChangeset
for help on using the changeset viewer.