Changeset 12618


Ignore:
Timestamp:
11/13/11 13:18:26 (8 years ago)
Author:
mistic100
Message:

fix display with simple and stripped themes, disable with luciano theme

Location:
extensions/Comments_on_Albums
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/Comments_on_Albums/include/coa_albums.php

    r12601 r12618  
    350350    ); 
    351351   
    352   $template->set_filename('comments_on_albums', dirname(__FILE__) .'/../template/albums.tpl'); 
     352  global $user; 
     353  if ( $is_simple = strstr($user['theme'], 'simple') !== false or strstr($user['theme'], 'stripped') !== false ) 
     354  { 
     355    $template->assign('IS_SIMPLE', $is_simple); 
     356    $template->set_filename('comments_on_albums', dirname(__FILE__) .'/../template/albums_simple.tpl'); 
     357  } 
     358  else 
     359  { 
     360    $template->set_filename('comments_on_albums', dirname(__FILE__) .'/../template/albums.tpl'); 
     361  } 
    353362  $template->concat('PLUGIN_INDEX_CONTENT_END', $template->parse('comments_on_albums', true)); 
    354363   
  • extensions/Comments_on_Albums/main.inc.php

    r12381 r12618  
    2525//          Triggers 
    2626// +-----------------------------------------------------------------------+ 
    27 add_event_handler('loc_end_index', 'COA_albums'); 
    28 add_event_handler('loc_after_page_header', 'COA_comments_page'); 
    29 add_event_handler('loc_begin_admin_page', 'COA_admin_intro'); 
    30 add_event_handler('loc_end_admin', 'COA_admin_comments'); 
    31 add_event_handler('get_admin_plugin_menu_links', 'COA_admin_menu'); 
    32 add_event_handler('get_stuffs_modules', 'COA_register_stuffs_module'); 
     27add_event_handler('init', 'coa_init'); 
     28function coa_init() 
     29{ 
     30  global $user; 
     31  // luciano doesn't show comments, display is very bad on Stripped & Collumns 
     32  if ($user['theme'] == 'luciano' or $user['theme'] == 'stripped_black_bloc') return; 
     33   
     34  add_event_handler('loc_end_index', 'COA_albums'); 
     35  add_event_handler('loc_after_page_header', 'COA_comments_page'); 
     36  add_event_handler('loc_begin_admin_page', 'COA_admin_intro'); 
     37  add_event_handler('loc_end_admin', 'COA_admin_comments'); 
     38  add_event_handler('get_admin_plugin_menu_links', 'COA_admin_menu'); 
     39  add_event_handler('get_stuffs_modules', 'COA_register_stuffs_module'); 
     40} 
    3341 
    3442 
Note: See TracChangeset for help on using the changeset viewer.