Ignore:
Timestamp:
11/07/12 15:31:55 (7 years ago)
Author:
mistic100
Message:

add 'get_extended_desc' trigger, use ORDER BY FIND_IN_SET for [slider]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/ExtendedDescription/main.inc.php

    r17976 r18971  
    625625  } 
    626626   
    627    
    628627  // get pictures 
    629628  $query = ' 
     
    631630  FROM '.IMAGES_TABLE.' 
    632631  WHERE id IN ('.implode(',', $ids).') 
     632  ORDER BY FIND_IN_SET(id, "'.implode(',', $ids).'") 
    633633;'; 
    634634  $pictures = hash_from_query($query, 'id'); 
    635    
    636   // sort pictures 
    637   if (!function_exists('ed_rank_sort')) 
    638   { 
    639     function ed_rank_sort($a, $b) 
    640     { 
    641       global $ids; 
    642       return array_search($a, $ids) > array_search($b, $ids); 
    643     } 
    644   } 
    645   uksort($pictures, 'ed_rank_sort'); 
    646635   
    647636  foreach ($pictures as $row) 
     
    738727} 
    739728 
     729// main 
     730add_event_handler ('get_extended_desc',  'get_extended_desc'); 
    740731add_event_handler ('render_page_banner', 'get_extended_desc'); 
    741 add_event_handler ('render_category_name', 'get_user_language_desc'); 
     732// categories 
     733add_event_handler ('render_category_name',        'get_user_language_desc'); 
    742734add_event_handler ('render_category_description', 'get_extended_desc', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); 
    743 add_event_handler ('render_tag_name', 'get_user_language_desc'); 
    744 add_event_handler ('render_tag_url', 'get_user_language_tag_url', 40); 
     735// tags 
     736add_event_handler ('render_tag_name',   'get_user_language_desc'); 
     737add_event_handler ('render_tag_url',    'get_user_language_tag_url', 40); 
    745738add_event_handler ('get_tag_alt_names', 'ed_get_all_alt_names', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); 
    746 add_event_handler ('render_element_name', 'get_user_language_desc'); 
     739// element 
     740add_event_handler ('render_element_name',        'get_user_language_desc'); 
    747741add_event_handler ('render_element_description', 'get_extended_desc'); 
     742// mail/nbm 
    748743add_event_handler ('nbm_render_user_customize_mail_content', 'get_extended_desc'); 
    749 add_event_handler ('mail_group_assign_vars', 'extended_desc_mail_group_assign_vars'); 
     744add_event_handler ('mail_group_assign_vars',                 'extended_desc_mail_group_assign_vars'); 
     745// removals 
    750746add_event_handler ('loc_end_index_category_thumbnails', 'ext_remove_cat', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); 
    751 add_event_handler ('loc_end_index_thumbnails', 'ext_remove_image', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); 
    752 add_event_handler ('get_categories_menu_sql_where', 'ext_remove_menubar_cats'); 
     747add_event_handler ('loc_end_index_thumbnails',          'ext_remove_image', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); 
     748add_event_handler ('get_categories_menu_sql_where',     'ext_remove_menubar_cats'); 
     749 
    753750?> 
Note: See TracChangeset for help on using the changeset viewer.