Changeset 3333
- Timestamp:
- 05/25/07 04:30:39 (3 years ago)
- Location:
- sandbox
- Files:
-
- 4 modified
-
lib/model/blog.keyword.php (modified) (2 diffs)
-
lib/piece/blog/entries.php (modified) (1 diff)
-
plugins/KeywordUI/index.php (modified) (3 diffs)
-
plugins/KeywordUI/index.xml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
sandbox/lib/model/blog.keyword.php
r3106 r3333 44 44 45 45 $visibility = doesHaveOwnership() ? '' : 'AND visibility > 0'; 46 $sql = "SELECT * FROM {$database['prefix']}Entries WHERE owner = $owner AND draft = 0 $visibility AND category = -1 $aux ORDER BY published DESC"; 46 $sql = "SELECT * 47 FROM {$database['prefix']}Entries 48 WHERE owner = $owner 49 AND draft = 0 $visibility 50 AND category = -1 $aux 51 ORDER BY published DESC"; 47 52 return fetchWithPaging($sql, $page, $count, "$folderURL/{$suri['value']}"); 48 53 } … … 52 57 $keyword = mysql_tt_escape_string($keyword); 53 58 $visibility = doesHaveOwnership() ? '' : 'AND visibility > 1'; 54 return DBQuery::queryAll("SELECT id, title, content, published, comments FROM {$database['prefix']}Entries WHERE owner = $owner AND draft = 0 $visibility AND category >= 0 AND (title LIKE '%$keyword%' OR content LIKE '%$keyword%') ORDER BY published DESC"); 59 return DBQuery::queryAll("SELECT id, title, content, published, comments 60 FROM {$database['prefix']}Entries 61 WHERE owner = $owner 62 AND draft = 0 $visibility 63 AND category >= 0 64 AND (title LIKE '%$keyword%' OR content LIKE '%$keyword%') 65 ORDER BY published DESC"); 55 66 } 56 67 ?> -
sandbox/lib/piece/blog/entries.php
r3299 r3333 40 40 if (sizeof($entryTags) > 0) { 41 41 $tags = array(); 42 foreach ($entryTags as $entryTag) 43 array_push($tags, "<a href=\"$defaultURL/tag/" . encodeURL($entryTag['name']) . '"' . ((count($entries) == 1 && getUserSetting('useRelTag', true)) ? ' rel="tag"' : '') . '>' . htmlspecialchars($entryTag['name']) . '</a>'); 42 foreach ($entryTags as $entryTag) { 43 $tags[$entryTag['name']] = "<a href=\"$defaultURL/tag/" . encodeURL($entryTag['name']) . '"' . ((count($entries) == 1 && getUserSetting('useRelTag', true)) ? ' rel="tag"' : '') . '>' . htmlspecialchars($entryTag['name']) . '</a>'; 44 } 44 45 $tags = fireEvent('ViewTagLists', $tags, $entry['id']); 45 dress('tag_label_rep', implode(",\r\n", $tags), $tagLabelView);46 dress('tag_label_rep', implode(",\r\n", array_values($tags)), $tagLabelView); 46 47 dress('tag_label', $tagLabelView, $entryView); 47 48 } -
sandbox/plugins/KeywordUI/index.php
r3111 r3333 2 2 /* KeywordUI for Textcube 1.1 3 3 ---------------------------------- 4 Version 1. 05 Tatter and Friends development team.4 Version 1.5 5 Needlworks. 6 6 7 7 Creator : inureyes … … 9 9 10 10 Created at : 2006.10.3 11 Last modified at : 200 6.10.2611 Last modified at : 2007.5.25 12 12 13 13 This plugin enables keyword / keylog feature in Textcube. … … 37 37 return $pluginPath."/keylogSkin.html"; 38 38 } 39 function KeywordUI_bindTag($target,$mother) { 40 global $owner, $entries, $blogURL, $pluginURL, $configVal; 41 if(isset($mother) && isset($target)){ 42 $tagsWithKeywords = array(); 43 $keywordNames = getKeywordNames($owner); 44 foreach($target as $tag => $tagLink) { 45 if(array_search($tag,$keywordNames) !== false) 46 array_push($tagsWithKeywords, $tagLink."<a class=\"key1\" onclick=\"openKeyword('$blogURL/keylog/".encodeURL($tag)."')\">T</a>"); 47 else array_push($tagsWithKeywords, $tagLink); 48 } 49 $target = $tagsWithKeywords; 50 } 51 return $target; 52 } 39 53 ?> -
sandbox/plugins/KeywordUI/index.xml
r3157 r3333 17 17 <listener event="BindKeyword">KeywordUI_bindKeyword</listener> 18 18 <listener event="setKeylogSkin">KeywordUI_setSkin</listener> 19 <listener event="ViewTagLists">KeywordUI_bindTag</listener> 19 20 </binding> 20 21 </plugin>
