-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.default.php
37 lines (29 loc) · 1.23 KB
/
action.default.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
if (!is_object(cmsms())) exit;
/* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Code for simpletagging "default" action
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Typically, this will display something from a template
or do some other task.
*/
$q = "SELECT tag, tag_id FROM " . cms_db_prefix() . "module_simpletagging WHERE page_id = " . cmsms()->variables['content_id'];
$result = $db->Execute($q);
$taglist = "";
$tags = array();
if ($this->GetPreference('resultpage') > 0) {
$returnid = $this->GetPreference('resultpage');
}
while ($result && !$result->EOF) {
$tmp = array();
$tmp['url'] = $this->CreateLink($id, 'searchtags', $returnid, '', array('tagid' => $result->fields['tag_id']), '', true, false, '', false, 'tags/' . $returnid . '/' . $result->fields['tag_id'] . '/' . munge_string_to_url($result->fields['tag']));
$tmp['title'] = $result->fields['tag'];
$tmp['delimiter'] = true;
array_push($tags, $tmp);
$result->moveNext();
}
if (count($tags) > 0) {
$tags[count($tags) - 1]['delimiter'] = false;
$smarty->assign('tags', $tags);
echo $this->ProcessTemplateFromData($this->GetPreference('tagtemplate', $this->getDefaultTagTemplate()));
}
?>