[ Index ]

PHP Cross Reference of phpBB-3.1.12-deutsch

title

Body

[close]

/phpbb/feed/ -> post_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 post based feeds
  18  */
  19  abstract class post_base extends \phpbb\feed\attachments_base
  20  {
  21      var $num_items = 'feed_limit_post';
  22      var $attachments = array();
  23  
  24  	function set_keys()
  25      {
  26          $this->set('title',        'post_subject');
  27          $this->set('title2',    'topic_title');
  28  
  29          $this->set('author_id',    'user_id');
  30          $this->set('creator',    'username');
  31          $this->set('published',    'post_time');
  32          $this->set('updated',    'post_edit_time');
  33          $this->set('text',        'post_text');
  34  
  35          $this->set('bitfield',    'bbcode_bitfield');
  36          $this->set('bbcode_uid','bbcode_uid');
  37  
  38          $this->set('enable_bbcode',        'enable_bbcode');
  39          $this->set('enable_smilies',    'enable_smilies');
  40          $this->set('enable_magic_url',    'enable_magic_url');
  41      }
  42  
  43  	function adjust_item(&$item_row, &$row)
  44      {
  45          $item_row['link'] = $this->helper->append_sid('viewtopic.' . $this->phpEx, "t={$row['topic_id']}&amp;p={$row['post_id']}#p{$row['post_id']}");
  46  
  47          if ($this->config['feed_item_statistics'])
  48          {
  49              $item_row['statistics'] = $this->user->lang['POSTED'] . ' ' . $this->user->lang['POST_BY_AUTHOR'] . ' ' . $this->user_viewprofile($row)
  50                  . ' ' . $this->separator_stats . ' ' . $this->user->format_date($row[$this->get('published')])
  51                  . (($this->is_moderator_approve_forum($row['forum_id']) && (int) $row['post_visibility'] === ITEM_UNAPPROVED) ? ' ' . $this->separator_stats . ' ' . $this->user->lang['POST_UNAPPROVED'] : '')
  52                  . (($this->is_moderator_approve_forum($row['forum_id']) && (int) $row['post_visibility'] === ITEM_DELETED) ? ' ' . $this->separator_stats . ' ' . $this->user->lang['POST_DELETED'] : '');
  53          }
  54      }
  55  }


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