Ignore:
Timestamp:
Feb 27, 2013, 8:37:57 PM (11 years ago)
Author:
flop25
Message:

removed the option for PWG stuffs
added an explicative texte
added new lang key for the PWG Stuff module

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/adult_content/class.inc.php

    r21047 r21057  
    118118  }
    119119
    120   function set_block_on_index ()
    121   {
    122         $this->loading_lang();
    123         global $page, $template, $user, $conf;
    124 
    125         if (isset($page['section']) and $page['section'] == 'categories')
    126 
    127         {
    128                 ////////////lié à quoi/////     
    129          $query = '
    130 SELECT id FROM '.GROUPS_TABLE.'
    131   WHERE name IN (\'+18\')
    132 ;';
    133      $data_18 = pwg_db_fetch_array(pwg_query($query));
    134          $query = '
    135 SELECT id FROM '.GROUPS_TABLE.'
    136   WHERE name IN (\'16-17\')
    137 ;';
    138      $data_16 = pwg_db_fetch_array(pwg_query($query));
    139          $query = '
    140 SELECT id FROM '.GROUPS_TABLE.'
    141   WHERE name IN (\'nothing\')
    142 ;';
    143      $data_no = pwg_db_fetch_array(pwg_query($query));
    144          $n_query = '
    145 SELECT COUNT(*) AS result FROM '.USER_GROUP_TABLE.'
    146   WHERE group_id IN (\''.$data_18['id'].'\',\''.$data_16['id'].'\',\''.$data_no['id'].'\') AND user_id IN (\''.$user['id'].'\')
    147 ;';
    148       $data_user = pwg_db_fetch_array(pwg_query($n_query));
    149           $is_grouped = $data_user['result'];   
    150          
    151           if ( $is_grouped == 0 and $user['username'] !== '16' and $user['username'] !== '18')
    152           {
    153                 $template->set_filename('ac_block', realpath($this->get_template('block.tpl') ) );
    154                 $begin = 'PLUGIN_INDEX_CONTENT_BEFORE';
    155                 $end = 'PLUGIN_INDEX_CONTENT_AFTER';
    156                 $template->concat($begin,       $template->parse('ac_block', true));
    157           }
    158         }
    159   }
    160120  function placer_identification($menu_ref_arr)
    161121  {
     
    324284      'path' => PHPWG_PLUGINS_PATH . AC_NAME . '/stuffs_module/',
    325285      'name' => l10n('ac_text'),
    326       'description' => l10n('ac_stuffs_description'),
     286      'description' => l10n('Disclaimer for the guest, with the ability to choose its age'),
    327287      )
    328288    );
Note: See TracChangeset for help on using the changeset viewer.