[ Index ]

PHP Cross Reference of phpBB-3.1.12-deutsch

title

Body

[close]

/phpbb/feed/ -> topic_base.php (source)

   1  <?php
   2  /**
   3  *
   4  * This file is part of the phpBB Forum Software package.
   5  *
   6  * @copyright (c) phpBB Limited <https://www.phpbb.com>
   7  * @license GNU General Public License, version 2 (GPL-2.0)
   8  *
   9  * For full copyright and license information, please see
  10  * the docs/CREDITS.txt file.
  11  *
  12  */
  13  
  14  namespace phpbb\feed;
  15  
  16  /**
  17  * Abstract class for topic based feeds
  18  */
  19  abstract class topic_base extends \phpbb\feed\attachments_base
  20  {
  21      var $num_items = 'feed_limit_topic';
  22  
  23  	function set_keys()
  24      {
  25          $this->set('title',        'topic_title');
  26          $this->set('title2',    'forum_name');
  27  
  28          $this->set('author_id',    'topic_poster');
  29          $this->set('creator',    'topic_first_poster_name');
  30          $this->set('published',    'post_time');
  31          $this->set('updated',    'post_edit_time');
  32          $this->set('text',        'post_text');
  33  
  34          $this->set('bitfield',    'bbcode_bitfield');
  35          $this->set('bbcode_uid','bbcode_uid');
  36  
  37          $this->set('enable_bbcode',        'enable_bbcode');
  38          $this->set('enable_smilies',    'enable_smilies');
  39          $this->set('enable_magic_url',    'enable_magic_url');
  40      }
  41  
  42  	function adjust_item(&$item_row, &$row)
  43      {
  44          $item_row['link'] = $this->helper->append_sid('viewtopic.' . $this->phpEx, 't=' . $row['topic_id'] . '&amp;p=' . $row['post_id'] . '#p' . $row['post_id']);
  45  
  46          if ($this->config['feed_item_statistics'])
  47          {
  48              $item_row['statistics'] = $this->user->lang['POSTED'] . ' ' . $this->user->lang['POST_BY_AUTHOR'] . ' ' . $this->user_viewprofile($row)
  49                  . ' ' . $this->separator_stats . ' ' . $this->user->format_date($row[$this->get('published')])
  50                  . ' ' . $this->separator_stats . ' ' . $this->user->lang['REPLIES'] . ' ' . ($this->content_visibility->get_count('topic_posts', $row, $row['forum_id']) - 1)
  51                  . ' ' . $this->separator_stats . ' ' . $this->user->lang['VIEWS'] . ' ' . $row['topic_views'];
  52  
  53              if ($this->is_moderator_approve_forum($row['forum_id']))
  54              {
  55                  if ((int) $row['topic_visibility'] === ITEM_DELETED)
  56                  {
  57                      $item_row['statistics'] .= ' ' . $this->separator_stats . ' ' . $this->user->lang['TOPIC_DELETED'];
  58                  }
  59                  else if ((int) $row['topic_visibility'] === ITEM_UNAPPROVED)
  60                  {
  61                      $item_row['statistics'] .= ' ' . $this->separator_stats . ' ' . $this->user->lang['TOPIC_UNAPPROVED'];
  62                  }
  63                  else if ($row['topic_posts_unapproved'])
  64                  {
  65                      $item_row['statistics'] .= ' ' . $this->separator_stats . ' ' . $this->user->lang['POSTS_UNAPPROVED'];
  66                  }
  67              }
  68          }
  69      }
  70  }


Generated: Thu Jan 11 00:25:41 2018 Cross-referenced by PHPXref 0.7.1