Lines Matching refs:tag

3  * Syntax plugin part for displaying a tag search form with results.
11 * Tagsearch syntax, displays a tag search form with results similar to the topic syntax
90 // get the tag input data
95 if ($helper = $this->loadHelper('tag')) {
122 * Return the search form for the namespace and the tag selection
161 // load the tag list - only tags that actually have pages assigned that the current user can access are listed
163 if ($my = $this->loadHelper('tag')) {
166 // sort tags by name ($tags is in the form $tag => $count)
191 // print tag checkboxes
192 foreach ($tags as $tag => $count) {
196 if ($this->isSelected($tag)) {
199 $form->addElement(form_makeCheckboxField('plugin__tag_search_tags[]', $tag, '+', '', 'plus', $attr));
203 if ($this->isSelected('-'.$tag)) {
206 $form->addElement(form_makeCheckboxField('plugin__tag_search_tags[]', '-'.$tag, '-', '', 'minus', $attr));
209 $form->addElement(hsc($tag).' ['.$count.']');
241 * Returns the tag search string from the selected tags
242 * @return string|null the tag search or null when no tags were selected
248 // When 'and' is set, prepend "+" to each tag
252 foreach ($tags as $tag) {
253 $tag = (string)$tag;
254 if ($tag[0] == '-') {
255 $negative_tags .= $tag.' ';
258 $positive_tags = $tag.' ';
260 $positive_tags .= $plus.$tag.' ';
271 * Check if a tag was selected for search
273 * @param string $tag The tag to check
274 * @return bool if the tag was checked
276 private function isSelected($tag) {
279 return in_array($tag, $INPUT->post->arr('plugin__tag_search_tags'), true);
281 return false; // no tags in the post data - no tag selected
286 * Check if the tag query should use AND (instead of OR)