Ignore:
Timestamp:
Jun 10, 2011, 9:03:17 PM (13 years ago)
Author:
mistic100
Message:

use a prefilter, works with theme 'Simple'

File:
1 edited

Legend:

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

    r10983 r11295  
    2424}
    2525
    26 function add_bbcode_bar() {
     26function add_bbcode_bar()
     27{
    2728  global $page;
    2829 
    29   if (isset($page['body_id']) AND $page['body_id'] == 'thePicturePage') {
     30  if (isset($page['body_id']) AND $page['body_id'] == 'thePicturePage')
     31  {
    3032    set_bbcode_bar();
    3133  }
     
    4648  // version 2.2.a or greater of SmiliesSupport is required
    4749  add_event_handler('loc_end_admin', 'bbcode_bar_check_smilies');
    48   function bbcode_bar_check_smilies() {
     50  function bbcode_bar_check_smilies()
     51  {
    4952    global $page, $template, $pwg_loaded_plugins;
    5053
    5154    if (
    52       ((isset($_GET['page']) AND $_GET['page'] == 'plugins_list') OR (isset($_GET['section']) AND $_GET['section'] == 'bbcode_bar/admin.php'))
    53       AND isset($pwg_loaded_plugins['SmiliesSupport'])
    54       AND strcmp($pwg_loaded_plugins['SmiliesSupport']['version'], '2.2.a') == -1
     55      ( (isset($_GET['page']) AND $_GET['page'] == 'plugins_list') OR (isset($_GET['section']) AND $_GET['section'] == 'bbcode_bar/admin.php') )
     56      AND isset($pwg_loaded_plugins['SmiliesSupport']) AND strcmp($pwg_loaded_plugins['SmiliesSupport']['version'], '2.2.f') == -1
    5557    ) {
    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.";
     58      array_push($page['warnings'], "BBCode Bar : SmiliesSupport has been detected, but is not up to date. Version 2.2.a or greater is required. Please update.");
    5759      $template->assign('warnings', $page['warnings']);
    5860    }
Note: See TracChangeset for help on using the changeset viewer.