Show
Ignore:
Timestamp:
04/03/11 12:03:09 (2 years ago)
Author:
mistic100
Message:

better compatibility test with SmiliesSupport

Files:
1 modified

Legend:

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

    r9965 r10011  
    4343                return $menu; 
    4444        } 
     45         
     46        // version 2.2.a or greater of SmiliesSupport is required 
     47        add_event_handler('loc_end_admin', 'bbcode_bar_check_smilies'); 
     48        function bbcode_bar_check_smilies() { 
     49                global $page, $template, $pwg_loaded_plugins; 
     50                 
     51                if ( 
     52                        ($_GET['page'] == 'plugins_list' OR $_GET['section'] == 'bbcode_bar/admin.php') 
     53                        AND isset($pwg_loaded_plugins['SmiliesSupport'])  
     54                        AND version_compare($pwg_loaded_plugins['SmiliesSupport']['version'], '2.2.a') == -1 
     55                ) { 
     56                        $page['warnings'][] = "BBCode Bar : SmiliesSupport has been detected, but is not up to date. Version 2.2.a or greater is required. Please update."; 
     57                        $template->assign('warnings', $page['warnings']); 
     58                } 
     59        } 
     60         
    4561} 
    4662 
    47  
    4863?>