Ignore:
Timestamp:
Feb 26, 2011, 4:28:24 PM (13 years ago)
Author:
patdenice
Message:

Add display option. Optimizations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/PWG_Stuffs/include/functions.inc.php

    r9369 r9383  
    3737}
    3838
     39function get_default_stuffs_modules($modules)
     40{
     41  $dir = opendir(STUFFS_PATH . 'modules/');
     42  while ($file = readdir($dir))
     43  {
     44    if ($file != '.' and $file != '..' and $file != '.svn')
     45    {
     46      $path = STUFFS_PATH . 'modules/' . $file;
     47      if (is_dir($path) and !is_link($path))
     48      {
     49        array_push($modules, array(
     50          'path' => $path,
     51          'name' => l10n('module_name_' . strtolower($file)),
     52          'description' => l10n('module_desc_' . strtolower($file)),
     53          )
     54        );
     55      }
     56    }
     57  }
     58  closedir($dir);
     59  return $modules;
     60}
     61
    3962function pwgs_picture_special_sections()
    4063{
     
    6184      {
    6285        case 'pwgs_mv': $title = l10n('Most visited'); break;
    63         case 'pwgs_br': $title = l10n('Best rated');   break;
    64         case 'pwgs_re': $title = l10n('Recent pictures');  break;
    65         case 'pwgs_ra': $title = l10n('Random pictures');       break;
     86        case 'pwgs_br': $title = l10n('Best rated'); break;
     87        case 'pwgs_re': $title = l10n('Recent pictures'); break;
     88        case 'pwgs_ra': $title = l10n('Random pictures'); break;
    6689      }
    6790      $page['title'] .= $conf['level_separator'] . $title;
     
    117140  global $page, $template;
    118141
    119   if ($page['is_homepage'])
     142  if ($page['stuffs_section'] == 'on_home')
    120143  {
    121144    $template->set_prefilter('index', 'hide_main_block_prefilter');
Note: See TracChangeset for help on using the changeset viewer.