Verzeichnisstruktur phpBB-3.1.0


Veröffentlicht
27.10.2014

So funktioniert es


Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück

Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

      (Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

forums.php

Zuletzt modifiziert: 09.10.2024, 12:52 - Dateigröße: 1.84 KiB


 01  <?php
 02  /**
 03  *
 04  * This file is part of the phpBB Forum Software package.
 05  *
 06  * @copyright (c) phpBB Limited <https://www.phpbb.com>
 07  * @license GNU General Public License, version 2 (GPL-2.0)
 08  *
 09  * For full copyright and license information, please see
 10  * the docs/CREDITS.txt file.
 11  *
 12  */
 13   
 14  namespace phpbb\feed;
 15   
 16  /**
 17  * 'All Forums' feed
 18  *
 19  * This will give you a list of all postable forums where feeds are enabled
 20  * including forum description, topic stats and post stats
 21  */
 22  class forums extends \phpbb\feed\base
 23  {
 24      var $num_items    = 0;
 25   
 26      function set_keys()
 27      {
 28          $this->set('title',        'forum_name');
 29          $this->set('text',        'forum_desc');
 30          $this->set('bitfield',    'forum_desc_bitfield');
 31          $this->set('bbcode_uid','forum_desc_uid');
 32          $this->set('updated',    'forum_last_post_time');
 33          $this->set('options',    'forum_desc_options');
 34      }
 35   
 36      function get_sql()
 37      {
 38          $in_fid_ary = array_diff($this->get_readable_forums(), $this->get_excluded_forums());
 39          if (empty($in_fid_ary))
 40          {
 41              return false;
 42          }
 43   
 44          // Build SQL Query
 45          $this->sql = array(
 46              'SELECT'    => 'f.forum_id, f.left_id, f.forum_name, f.forum_last_post_time,
 47                              f.forum_desc, f.forum_desc_bitfield, f.forum_desc_uid, f.forum_desc_options,
 48                              f.forum_topics_approved, f.forum_posts_approved',
 49              'FROM'        => array(FORUMS_TABLE => 'f'),
 50              'WHERE'        => 'f.forum_type = ' . FORUM_POST . '
 51                              AND ' . $this->db->sql_in_set('f.forum_id', $in_fid_ary),
 52              'ORDER_BY'    => 'f.left_id ASC',
 53          );
 54   
 55          return true;
 56      }
 57   
 58      function adjust_item(&$item_row, &$row)
 59      {
 60          $item_row['link'] = $this->helper->append_sid('viewforum.' . $this->phpEx, 'f=' . $row['forum_id']);
 61   
 62          if ($this->config['feed_item_statistics'])
 63          {
 64              $item_row['statistics'] = $this->user->lang('TOTAL_TOPICS', (int) $row['forum_topics_approved'])
 65                  . ' ' . $this->separator_stats . ' ' . $this->user->lang('TOTAL_POSTS_COUNT', (int) $row['forum_posts_approved']);
 66          }
 67      }
 68  }
 69