Procedural File: tag_extras.php
Source Location: /zp-extensions/tag_extras.php
Page Details
Provides functions to print a tag cloud/list of all image tags from an album optionally including the subalbums or the album tags including sub album tags.
Or alternatively a tag cloud/list of all tags used by either Zenpage news articles or pages. Note: The optional counter prints the total number of the tag used, not just for the select items (as clicking on it will return all anyway.)
| Author: | Malte Müller (acrylian) |
Functions
getAllTagsFromAlbum [line 24]
Prints a tag cloud list of the tags in one album and optionally its subalbums. Returns FALSE if no value.
Parameters:
|
string |
$albumname: |
folder name of the album to get the tags from ($subalbums = true this is the base albums)- This value is mandatory. |
|
bool |
$subalbums: |
TRUE if the tags of subalbum should be. FALSE is default |
|
string |
$mode: |
"images" for image tags, "albums" for album tags."images" is default. |
array getAllTagsFromAlbum(
string $albumname, [bool $subalbums = false], [string $mode = 'images']
)
|
|
getAllTagsFromAlbum_multi_unique [line 291]
Removes duplicate entries in multi dimensional array.
From kenrbnsn at rbnsn dot com http://uk.php.net/manual/en/function.array-unique.php#57202
Parameters:
array getAllTagsFromAlbum_multi_unique(
array $array
)
|
|
getAllTagsFromZenpage [line 115]
Gets all tags used by either all Zenpage news articles or pages.
Parameters:
|
string |
$mode: |
"news" for Zenpage news article tags, "pages" for Zenpage pages tags |
void getAllTagsFromZenpage(
[string $mode = 'news']
)
|
|
printAllTags [line 246]
Prints a tag cloud list of the tags in one album and optionally its subalbums. Base function to printAllTagsFromAlbum().
Note meant to be used standalone.
Parameters:
|
array |
$tags: |
array of tags with the fields count, id, and name (as passed by the specific printAllTagsFrom.... functions) |
|
string |
$mode: |
"images" for image tags, "albums" for album tags, "all" for images and albums mixed or "news" for Zenpage news articles, "pages" for Zenpage pages |
|
string |
$separator: |
how to separate the entries |
|
string |
$class: |
css classs to style the list |
|
integer |
$showcounter: |
if the tag count should be shown (no counter if $mode = "all") |
|
bool |
$tagcloud: |
if set to false a simple list without font size changes will be printed, set to true (default) prints a list as a tag cloud |
|
integere |
$size_min: |
smallest font size the cloud should display |
|
integer |
$size_max: |
largest font size the cloud should display |
|
integer |
$count_min: |
the minimum count for a tag to appear in the output |
|
integer |
$count_max: |
the floor count for setting the cloud font size to $size_max |
void printAllTags(
array $tags, string $mode, [string $separator = ''], [string $class = ''], [integer $showcounter = true], [bool $tagcloud = true], [integere $size_min = 1], [integer $size_max = 5], [integer $count_min = 1], [integer $count_max = 50]
)
|
|
printAllTagsFromAlbum [line 209]
Prints a tag cloud list of the tags in one album and optionally its subalbums.
Known limitation: If $mode is set to "all" there is no tag count and therefore no tag cloud but a simple list
Parameters:
|
string |
$albumname: |
folder name of the album to get the tags from ($subalbums = true this is the base albums) |
|
bool |
$subalbums: |
TRUE if the tags of subalbum should be. FALSE is default |
|
string |
$mode: |
"images" for image tags, "albums" for album tags, "all" for both mixed |
|
string |
$separator: |
how to separate the entries |
|
string |
$class: |
css classs to style the list |
|
integer |
$showcounter: |
if the tag count should be shown (no counter if $mode = "all") |
|
bool |
$tagcloud: |
if set to false a simple list without font size changes will be printed, set to true (default) prints a list as a tag cloud |
|
integere |
$size_min: |
smallest font size the cloud should display |
|
integer |
$size_max: |
largest font size the cloud should display |
|
integer |
$count_min: |
the minimum count for a tag to appear in the output |
|
integer |
$count_max: |
the floor count for setting the cloud font size to $size_max |
void printAllTagsFromAlbum(
[string $albumname = ""], [bool $subalbums = false], [string $mode = 'images'], [string $separator = ''], [string $class = ''], [integer $showcounter = true], [bool $tagcloud = true], [integere $size_min = 1], [integer $size_max = 5], [integer $count_min = 1], [integer $count_max = 50]
)
|
|
printAllTagsFromZenpage [line 188]
Prints a tag cloud list of the tags used by either all Zenpage news articles or pages.
Parameters:
|
string |
$mode: |
"news" for Zenpage news article tags, "pages" for Zenpage pages tags |
|
string |
$separator: |
how to separate the entries |
|
string |
$class: |
css classs to style the list |
|
integer |
$showcounter: |
if the tag count should be shown (no counter if $mode = "all") |
|
bool |
$tagcloud: |
if set to false a simple list without font size changes will be printed, set to true (default) prints a list as a tag cloud |
|
integere |
$size_min: |
smallest font size the cloud should display |
|
integer |
$size_max: |
largest font size the cloud should display |
|
integer |
$count_min: |
the minimum count for a tag to appear in the output |
|
integer |
$count_max: |
the floor count for setting the cloud font size to $size_max |
void printAllTagsFromZenpage(
[string $mode = 'news'], [string $separator = ''], [string $class = ''], [integer $showcounter = true], [bool $tagcloud = true], [integere $size_min = 1], [integer $size_max = 5], [integer $count_min = 1], [integer $count_max = 50]
)
|
|
|
|