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 |
topic_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 topic based feeds
18 */
19 abstract class topic_base extends attachments_base
20 {
21 protected $num_items = 'feed_limit_topic';
22
23 /**
24 * {@inheritdoc}
25 */
26 public function set_keys()
27 {
28 $this->set('title', 'topic_title');
29 $this->set('title2', 'forum_name');
30
31 $this->set('author_id', 'topic_poster');
32 $this->set('creator', 'topic_first_poster_name');
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->separator_stats . ' ' . $this->user->lang['REPLIES'] . ' ' . ($this->content_visibility->get_count('topic_posts', $row, $row['forum_id']) - 1)
57 . ' ' . $this->separator_stats . ' ' . $this->user->lang['VIEWS'] . ' ' . $row['topic_views'];
58
59 if ($this->is_moderator_approve_forum($row['forum_id']))
60 {
61 if ((int) $row['topic_visibility'] === ITEM_DELETED)
62 {
63 $item_row['statistics'] .= ' ' . $this->separator_stats . ' ' . $this->user->lang['TOPIC_DELETED'];
64 }
65 else if ((int) $row['topic_visibility'] === ITEM_UNAPPROVED)
66 {
67 $item_row['statistics'] .= ' ' . $this->separator_stats . ' ' . $this->user->lang['TOPIC_UNAPPROVED'];
68 }
69 else if ($row['topic_posts_unapproved'])
70 {
71 $item_row['statistics'] .= ' ' . $this->separator_stats . ' ' . $this->user->lang['POSTS_UNAPPROVED'];
72 }
73 }
74 }
75 }
76 }
77