1 | <?php |
||
20 | class bbcodes_display |
||
21 | { |
||
22 | /** @var driver_interface */ |
||
23 | protected $db; |
||
24 | |||
25 | /** @var manager */ |
||
26 | protected $extension_manager; |
||
27 | |||
28 | /** @var user */ |
||
29 | protected $user; |
||
30 | |||
31 | /** @var string */ |
||
32 | protected $ext_root_path; |
||
33 | |||
34 | /** @var array */ |
||
35 | protected $memberships; |
||
36 | |||
37 | /** |
||
38 | * Constructor |
||
39 | * |
||
40 | * @param driver_interface $db Database connection |
||
41 | * @param manager $extension_manager Extension manager object |
||
42 | * @param user $user User object |
||
43 | * @param string $ext_root_path Path to abbc3 extension root |
||
44 | * @access public |
||
45 | */ |
||
46 | 11 | public function __construct(driver_interface $db, manager $extension_manager, user $user, $ext_root_path) |
|
53 | |||
54 | /** |
||
55 | * Display allowed custom BBCodes with icons |
||
56 | * |
||
57 | * Uses GIF images named exactly the same as the bbcode_tag |
||
58 | * |
||
59 | * @param array $custom_tags Template data of the bbcode |
||
60 | * @param array $row The data of the bbcode |
||
61 | * @return array Update template data of the bbcode |
||
62 | * @access public |
||
63 | */ |
||
64 | 1 | public function display_custom_bbcodes($custom_tags, $row) |
|
81 | |||
82 | /** |
||
83 | * Set custom BBCodes to 'disabled' if they are not allowed to be used |
||
84 | * |
||
85 | * @param array $bbcodes Array of bbcode data for use in parsing |
||
86 | * @param array $rowset Array of bbcode data from the database |
||
87 | * @return array The bbcodes data array |
||
88 | * @access public |
||
89 | * |
||
90 | * @deprecated 3.2.0. Provides bc for phpBB 3.1.x. |
||
91 | */ |
||
92 | public function allow_custom_bbcodes($bbcodes, $rowset) |
||
104 | |||
105 | /** |
||
106 | * Determine if a user is in a group allowed to use a custom BBCode |
||
107 | * |
||
108 | * @param string|array $group_ids Allowed group IDs, comma separated string or array |
||
109 | * @return bool Return true if allowed to use BBCode |
||
110 | * @access public |
||
111 | 11 | */ |
|
112 | public function user_in_bbcode_group($group_ids = '') |
||
131 | |||
132 | /** |
||
133 | * Get image paths/names from ABBC3's icons folder |
||
134 | * |
||
135 | * @return array File data from ./ext/vse/abbc3/images/icons |
||
136 | * @access protected |
||
137 | 1 | */ |
|
138 | protected function get_images() |
||
147 | |||
148 | /** |
||
149 | * Load this user's group memberships if it's not cached already |
||
150 | * |
||
151 | * @return null |
||
152 | * @access protected |
||
153 | 7 | */ |
|
154 | protected function load_memberships() |
||
173 | } |
||
174 |