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. |
|
(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 \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'] . '&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 }
71