Verzeichnisstruktur phpBB-3.3.15
- Veröffentlicht
- 28.08.2024
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. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
post_base.php
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 * Abstract class for post based feeds
18 */
19 abstract class post_base extends attachments_base
20 {
21 protected $num_items = 'feed_limit_post';
22
23 /**
24 * {@inheritdoc}
25 */
26 public function set_keys()
27 {
28 $this->set('title', 'post_subject');
29 $this->set('title2', 'topic_title');
30
31 $this->set('author_id', 'user_id');
32 $this->set('creator', 'username');
33 $this->set('published', 'post_time');
34 $this->set('updated', 'post_edit_time');
35 $this->set('text', 'post_text');
36
37 $this->set('bitfield', 'bbcode_bitfield');
38 $this->set('bbcode_uid','bbcode_uid');
39
40 $this->set('enable_bbcode', 'enable_bbcode');
41 $this->set('enable_smilies', 'enable_smilies');
42 $this->set('enable_magic_url', 'enable_magic_url');
43 }
44
45 /**
46 * {@inheritdoc}
47 */
48 public function adjust_item(&$item_row, &$row)
49 {
50 $item_row['link'] = $this->helper->append_sid('viewtopic.' . $this->phpEx, "p={$row['post_id']}#p{$row['post_id']}");
51
52 if ($this->config['feed_item_statistics'])
53 {
54 $item_row['statistics'] = $this->user->lang['POSTED'] . ' ' . $this->user->lang['POST_BY_AUTHOR'] . ' ' . $this->user_viewprofile($row)
55 . ' ' . $this->separator_stats . ' ' . $this->user->format_date($row[$this->get('published')])
56 . (($this->is_moderator_approve_forum($row['forum_id']) && (int) $row['post_visibility'] === ITEM_UNAPPROVED) ? ' ' . $this->separator_stats . ' ' . $this->user->lang['POST_UNAPPROVED'] : '')
57 . (($this->is_moderator_approve_forum($row['forum_id']) && (int) $row['post_visibility'] === ITEM_DELETED) ? ' ' . $this->separator_stats . ' ' . $this->user->lang['POST_DELETED'] : '');
58 }
59 }
60 }
61