Procedural File: module_tags.php
Source Location: /modules/module_tags.php
Functions
deleteTag [line 553]
void deleteTag(
string $tag, integer $entrycode
)
|
|
Delete a single tag for any given entry.
Parameters:
|
string |
$tag: |
|
|
integer |
$entrycode: |
|
deleteTags [line 533]
void deleteTags(
mixed $tags, integer $entrycode
)
|
|
Deletes all tags for any given entry.
Parameters:
|
mixed |
$tags: |
|
|
integer |
$entrycode: |
|
getEntriesWithTag [line 792]
unknown getEntriesWithTag(
string $tag, [integer $skip = 0]
)
|
|
Get Entries/Pages with a certain Tag
Parameters:
|
string |
$tag: |
|
|
integer |
$skip: |
|
getRelatedTags [line 922]
unknown getRelatedTags(
string $tag
)
|
|
Get Tags that are related to a certain Tag
Parameters:
getTagCosmos [line 37]
array getTagCosmos(
[integer $max = 0], [string $weblogname = ''], [ $match = ''], [ $exclude = '']
)
|
|
Get the TagCosmos. Wrapper for either getTagCosmosFlat or getTagCosmosMysql, Depending on the DB model that's being used.
Returns an array with the following elements: 'minvalue' => minimum value of a tag 'maxvalue' => maximum value of a tag 'amount' => number of tags 'tags' => array of the tags. The indices are the tags, the values the number of occurences
Parameters:
|
integer |
$max: |
|
|
string |
$weblogname: |
|
|
|
$match: |
|
|
|
$exclude: |
|
API Tags:
getTagCosmosFlat [line 94]
array getTagCosmosFlat(
[integer $max = 0], string $weblogname, $match, [ $exclude = array()]
)
|
|
Get the TagCosmos. Flat file version.
Preferably use the cached version, otherwise just make it on the fly. (and then we store the cached version) The $weblogname parameter is used to return tags for a single weblog. A value of '_all_' returns the tags for all weblogs combined. If $max is given, it will return at most that many tags, ordered by size. Returns an array with the following elements: 'minvalue' => minimum value of a tag 'maxvalue' => maximum value of a tag 'amount' => number of tags 'tags' => array of the tags. The indices are the tags, the values the number of occurences
Parameters:
|
integer |
$max: |
|
|
string |
$weblogname: |
|
|
|
$match: |
|
|
|
$exclude: |
|
API Tags:
getTagCosmosMysql [line 196]
array getTagCosmosMysql(
[integer $max = 0], [string $weblogname = ''], [ $match = ''], [ $exclude = array()]
)
|
|
Get the TagCosmos. MySQL database version.
Preferably use the cached version, otherwise just make it on the fly. (and then we store the cached version) If $max is given, it will return at most that many tags, ordered by size. If $weblogname is given, only tags for that weblog will be returned. Returns an array with the following elements: 'minvalue' => minimum value of a tag 'maxvalue' => maximum value of a tag 'amount' => number of tags 'tags' => array of the tags. The indices are the tags, the values the number of occurences
Parameters:
|
integer |
$max: |
|
|
string |
$weblogname: |
|
|
|
$match: |
|
|
|
$exclude: |
|
API Tags:
getTags [line 277]
array getTags(
[boolean $link = true], [string $text = ""], [mixed $additional = false], [boolean $underscore = false]
)
|
|
Get the tags from the current entry as an array. if $link is true, the array will consist of links to the individual tag pages.
Parameters:
|
boolean |
$link: |
|
|
string |
$text: |
|
|
mixed |
$additional: |
|
|
boolean |
$underscore: |
|
makeRelatedTags [line 983]
void makeRelatedTags(
string $tag, array $p_aAllTags
)
|
|
automagically determine related tags.
Parameters:
|
string |
$tag: |
|
|
array |
$p_aAllTags: |
|
normalizeTag [line 372]
string normalizeTag(
string $tag
)
|
|
Normalize tag to avoid duplicate noise.
Currently we trim spaces, lowercase, remove quotes and HTML entities, and treat 'star wars', 'star-wars', 'star+wars' and 'star_wars' as similar (with the underscore version as the base case).
Parameters:
Information Tags:
| Todo: | Since tag is used as filename not all characters should be allowed. |
printTag [line 658]
string printTag(
string $tag
)
|
|
Print out the tag page for any given tag. Returns the output as HTML.
Parameters:
printTagCosmos [line 606]
Print out the current Tag Cosmos as a fancy tagcloud in HTML, with smaller and larger tags, dependent on how often they occur. Returns the output as HTML.
tagLink [line 745]
string tagLink(
string $tag, [string $template = ""]
)
|
|
Make a link to any given $tag.
Parameters:
|
string |
$tag: |
|
|
string |
$template: |
|
writeTag [line 483]
void writeTag(
string $tag, integer $entrycode
)
|
|
Write out a single tag, checking if it doesn't exist already.
Parameters:
|
string |
$tag: |
|
|
integer |
$entrycode: |
|
writeTagIndex [line 399]
boolean writeTagIndex(
int $start, int $stop, int $time
)
|
|
Indexes tags in entries in the PivotX database and returns true if there are more entries to index.
Parameters:
|
int |
$start: |
Code for first entry to index |
|
int |
$stop: |
Code for last entry to index |
|
int |
$time: |
Indexing time. |
writeTags [line 439]
void writeTags(
$tags, $oldtags, $code, array $entry
)
|
|
Write out all tags for any given entry..
Parameters:
|
array |
$entry: |
|
|
|
$tags: |
|
|
|
$oldtags: |
|
|
|
$code: |
|
|
|