1 | <?php |
||
15 | class base |
||
16 | { |
||
17 | |||
18 | /** @var \phpbb\auth\auth */ |
||
19 | protected $auth; |
||
20 | |||
21 | /** @var \phpbb\config\config */ |
||
22 | protected $config; |
||
23 | |||
24 | /** @var string phpbb_root_path */ |
||
25 | protected $phpbb_root_path; |
||
26 | |||
27 | /** |
||
28 | * Constructor |
||
29 | * |
||
30 | * @param \phpbb\auth\auth auth Authentication object |
||
31 | * @param \phpbb\config\config $config Config Object |
||
32 | * @param string $phpbb_root_path phpbb_root_path |
||
33 | * @access public |
||
34 | */ |
||
35 | public function __construct(\phpbb\auth\auth $auth, \phpbb\config\config $config, $phpbb_root_path) |
||
41 | |||
42 | /** |
||
43 | * Generate the SEO link for a topic |
||
44 | * |
||
45 | * @param int $forum_id The ID of the forum |
||
46 | * @param string $forum_name The title of the forum |
||
47 | * @param int $topic_id The ID if the topic |
||
48 | * @param string $topic_title The title of the topic |
||
49 | * @param int $start Optional start parameter |
||
50 | * @param bool $full Return the full URL |
||
51 | * @return string The SEO URL |
||
52 | * @access private |
||
53 | */ |
||
54 | public function generate_topic_link($forum_id, $forum_name, $topic_id, $topic_title, $start = 0, $full = false) |
||
62 | |||
63 | /** |
||
64 | * Generate the SEO link for a forum |
||
65 | * |
||
66 | * @param int $forum_id The ID of the forum |
||
67 | * @param string $forum_name The title of the forum |
||
68 | * @param int $start Optional start parameter |
||
69 | * @param bool $full Return the full URL |
||
70 | * @return string The SEO URL |
||
71 | * @access private |
||
72 | */ |
||
73 | public function generate_forum_link($forum_id, $forum_name, $start = 0, $full = false) |
||
81 | |||
82 | /** |
||
83 | * |
||
84 | * @global type $_SID |
||
85 | * @param int $replies Replays in the topic |
||
86 | * @param string $url URL oft the topic |
||
87 | * @return string The URL with start included |
||
88 | */ |
||
89 | public function generate_lastpost_link($replies, $url) |
||
107 | |||
108 | /** |
||
109 | * Replace letters to use title in URL |
||
110 | * |
||
111 | * @param string $title The title to use in the URL |
||
112 | * @return string Title to use in URLs |
||
113 | */ |
||
114 | public static function title_to_url($title) |
||
129 | |||
130 | /** |
||
131 | * Get the topics post count or the forums post/topic count based on permissions |
||
132 | * |
||
133 | * @param $mode string One of topic_posts, forum_posts or forum_topics |
||
134 | * @param $data array Array with the topic/forum data to calculate from |
||
135 | * @param $forum_id int The forum id is used for permission checks |
||
136 | * @return int Number of posts/topics the user can see in the topic/forum |
||
137 | */ |
||
138 | public function get_count($mode, $data, $forum_id) |
||
147 | } |
||
148 |