Ignore:
Timestamp:
Dec 4, 2013, 9:50:16 PM (11 years ago)
Author:
chronos
Message:
  • Modified: Search page generalized as dynamic configurable list. Other modules can register their search ability.
  • Modified: If sarch is invoked on some module then filter is added to table. Filter have to be disabled to view all items again.
  • Added: Shoutbox can be searched.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Translation/Translation.php

    r622 r626  
    2222  function Start()
    2323  {
     24        global $TranslationTree;
     25       
    2426                $this->System->RegisterPage('comparison.php', 'PageTranslationComparison');
    2527        $this->System->RegisterPage('form.php', 'PageTranslationForm');
     
    3537        'Permission' => LICENCE_ANONYMOUS,
    3638        'Icon' => '',
    37     ), 1);   
     39    ), 1);   
     40    if(array_key_exists('Search', $this->System->ModuleManager->Modules))
     41    {
     42                  foreach($TranslationTree as $Group)
     43                  {
     44                          $Table = $Group['TablePrefix'];
     45       
     46                                $Columns = array('ID', 'Entry');
     47                          foreach($Group['Items'] as $Item)
     48                          {
     49                                if($Item['Column'] != '') $Columns[] = $Item['Column'];
     50                          }
     51
     52        $this->System->ModuleManager->Modules['Search']->RegisterSearch('group'.$Group['Id'],
     53        sprintf(T('Translation group "%s"'), $Group['Name']), $Columns, '`'.$Table.'`', $this->System->Link('/TranslationList.php?group='.
     54        $Group['Id'].'&user=0&state=0&entry=&text='));                 
     55                }
     56    }     
    3857  }
    3958 
Note: See TracChangeset for help on using the changeset viewer.