Procedural File: zenpage-template-functions.php
Source Location: /zp-extensions/zenpage/zenpage-template-functions.php
Page Details
zenpage template functions
| Author: | Malte Müller (acrylian), Stephen Billard (sbillard) |
Functions
checkForPage [line 2820]
If the titlelink is valid this will setup for the page Returns true if page is setup and valid, otherwise returns false
Parameters:
|
string |
$titlelink: |
The page to setup |
bool checkForPage(
string $titlelink
)
|
|
getAuthor [line 158]
Wrapper function to get the author of a news article or page: Used by getNewsAuthor() and getPageAuthor().
Parameters:
|
bool |
$fullname: |
False for the user name, true for the full name |
string getAuthor(
[bool $fullname = false]
)
|
|
getBareNewsAlbumTitle [line 866]
CombiNews feature only: returns the raw title of an album if image or movie/audio or false.
string getBareNewsAlbumTitle(
)
|
|
getBareNewsTitle [line 392]
Returns the raw title of a news article.
string getBareNewsTitle(
)
|
|
getBarePageTitle [line 2445]
Returns the raw title of a page.
string getBarePageTitle(
)
|
|
getContentShorten [line 666]
Shorten the content of any type of item and add the shorten indicator and readmore link set on the Zenpage plugin options. Helper function for getNewsContent() but usage of course not limited to that.
If there is nothing to shorten the content passed. The read more link is wrapped within <p class="readmorelink"></p>.
Parameters:
|
string |
$text: |
The text content to be shortenend. |
|
integer |
$shorten: |
The lenght the content should be shortened |
|
string |
$shortenindicator: |
The placeholder to mark the shortening (e.g."(...)"). If empty the Zenpage option for this is used. |
|
string |
$readmore: |
The text for the "read more" link. If empty the term set in Zenpage option is used. |
|
string |
$readmoreurl: |
The url the read more link should point to |
void getContentShorten(
string $text, integer $shorten, [string $shortenindicator = NULL], [string $readmore = NULL], [string $readmoreurl = NULL]
)
|
|
getCurrentNewsArchive [line 1116]
Gets the current select news date (year-month) or formatted
Parameters:
|
string |
$mode: |
"formatted" for a formatted date or "plain" for the pure year-month (for example "2008-09") archive date |
|
string |
$format: |
If $mode="formatted" how the date should be printed (see PHP's strftime() function for the requirements) |
string getCurrentNewsArchive(
[string $mode = 'formatted'], [string $format = '%B %Y']
)
|
|
getFullNewsImage [line 908]
CombiNews feature only: Returns the fullimage link if image or movie/audio or false.
mixed getFullNewsImage(
)
|
|
getLatestNews [line 1191]
Gets the latest news either only news articles or with the latest images or albums
NOTE: This function excludes articles that are password protected via a category for not logged in users!
Parameters:
|
int |
$number: |
The number of news items to get |
|
string |
$option: |
"none" for only news articles "with_latest_images" for news articles with the latest images by id "with_latest_images_date" for news articles with the latest images by date "with_latest_images_mtime" for news articles with the latest images by mtime (upload date) "with_latest_images_publishdate" for news articles with the latest images by publishdate (if not set date is used) "with_latest_albums" for news articles with the latest albums by id "with_latest_albums_date" for news articles with the latest albums by date "with_latest_albums_mtime" for news articles with the latest albums by mtime (upload date) "with_latest_albums_publishdate" for news articles with the latest albums by publishdate (if not set date is used) "with_latestupdated_albums" for news articles with the latest updated albums |
|
string |
$category: |
Optional news articles by category (only "none" option) |
|
bool |
$sticky: |
place sticky articles at the front of the list |
array getLatestNews(
[int $number = 2], [string $option = 'none'], [string $category = ''], [bool $sticky = true]
)
|
|
getLatestZenpageComments [line 2858]
Gets latest comments for news articles and pages
Parameters:
|
int |
$number: |
how many comments you want. |
|
string |
$type: |
"all" for all latest comments for all news articles and all pages "news" for the lastest comments of one specific news article "page" for the lastest comments of one specific page |
|
int |
$itemID: |
the ID of the element to get the comments for if $type != "all" |
void getLatestZenpageComments(
int $number, [string $type = "all"], [int $itemID = ""]
)
|
|
getNewsAlbumName [line 875]
CombiNews feature only: returns the album name (folder) if image or movie/audio or returns false.
mixed getNewsAlbumName(
)
|
|
getNewsAlbumTitle [line 847]
CombiNews feature only: returns the album title if image or movie/audio or false.
mixed getNewsAlbumTitle(
)
|
|
getNewsAlbumURL [line 895]
CombiNews feature only: returns the url to an album if image or movie/audio or returns false.
getNewsArchivePath [line 1465]
Returns partial path of news date archive
string getNewsArchivePath(
)
|
|
getNewsArchivePathNav [line 1546]
news archive path only for use in the news article pagination
string getNewsArchivePathNav(
)
|
|
getNewsAuthor [line 801]
Gets the author of a news article (if in Combinews mode for gallery items the owner)
Parameters:
string getNewsAuthor(
[ $fullname = false]
)
|
|
getNewsBaseURL [line 1444]
Returns the base /news or index.php?p=news url
getNewsCategories [line 922]
Gets the categories of the current news article
array getNewsCategories(
)
|
|
getNewsCategoryCustomData [line 971]
Gets the custom data field of the current news category
string getNewsCategoryCustomData(
)
|
|
getNewsCategoryDesc [line 951]
Gets the description of the current news category
string getNewsCategoryDesc(
)
|
|
getNewsCategoryPath [line 1455]
Returns partial path of news category
string getNewsCategoryPath(
)
|
|
getNewsCategoryPathNav [line 1532]
News cat path only for use in the news article pagination
string getNewsCategoryPathNav(
)
|
|
getNewsCategoryURL [line 1365]
Returns the full path to a news category
Parameters:
|
string |
$catlink: |
The category link of a category |
string getNewsCategoryURL(
[string $catlink = '']
)
|
|
getNewsContent [line 458]
Gets the content of a news article
If using the CombiNews feature this returns the description for gallery items (see printNewsContent for more)
Parameters:
|
int |
$shorten: |
The optional length of the content for the news list for example, will override the plugin option setting if set, "" (empty) for full content (not used for image descriptions!) |
|
string |
$shortenindicator: |
The placeholder to mark the shortening (e.g."(...)"). If empty the Zenpage option for this is used. |
|
string |
$readmore: |
The text for the "read more" link. If empty the term set in Zenpage option is used. |
string getNewsContent(
[int $shorten = false], [string $shortenindicator = NULL], [string $readmore = NULL]
)
|
|
getNewsCustomData [line 782]
Gets the custom data field of the curent news article
string getNewsCustomData(
)
|
|
getNewsDate [line 1023]
Gets the date of the current news article
getNewsExtraContent [line 736]
Gets the extracontent of a news article if in single news articles view or returns FALSE
string getNewsExtraContent(
)
|
|
getNewsID [line 316]
Gets the id of a news article/item
getNewsIndexURL [line 1399]
Returns the full path of the news index page (news page 1) or if the "news on zp index" option is set a link to the gallery index.
string getNewsIndexURL(
)
|
|
getNewsPagePath [line 1487]
Returns partial path of a news page number path
string getNewsPagePath(
)
|
|
getNewsReadMore [line 761]
Returns the text for the read more link for news articles or gallery items if in CombiNews mode
string getNewsReadMore(
)
|
|
getNewsTitle [line 329]
Gets the news article title
getNewsTitleLink [line 407]
Returns the titlelink (url name) of the current news article.
If using the CombiNews feature this also returns the full path to a image.php page if the item is an image.
string getNewsTitleLink(
)
|
|
getNewsTitlePath [line 1476]
Returns partial path of news article title
string getNewsTitlePath(
)
|
|
getNewsType [line 91]
Gets the news type of a news item.
"news" for a news article or if using the CombiNews feature "flvmovie" (for flv, fla, mp3, m4a and mp4/m4v), "image", "3gpmovie" or "quicktime"
Parameters:
|
obj |
$newsobj: |
optional news object to check directly outside news context |
string getNewsType(
[obj $newsobj = NULL]
)
|
|
getNewsURL [line 1500]
Returns the url to a news article
Parameters:
|
string |
$titlelink: |
The titlelink of a news article |
string getNewsURL(
[string $titlelink = '']
)
|
|
getNewsVideoContent [line 705]
Helper function for getNewsContent to get video/audio content if $imageobj is a video/audio object if using Zenpage CombiNews
Parameters:
|
object |
$imageobj: |
The object of an image |
void getNewsVideoContent(
object $imageobj
)
|
|
getNextNewsPageURL [line 1601]
Returns the url to the next news page
string getNextNewsPageURL(
)
|
|
getNextNewsURL [line 1782]
Returns the title and the titlelink of the next article in single news article pagination as an array Returns false if there is none (or option is empty)
NOTE: This is not available if using the CombiNews feature
Parameters:
|
string |
$sortorder: |
"desc" (default)or "asc" for descending or ascending news. Required if these for next_news() loop are changed. |
|
string |
$sortdirection: |
"date" (default) or "title" for sorting by date or titlelink. Required if these for next_news() loop are changed. |
mixed getNextNewsURL(
[string $sortorder = 'date'], [string $sortdirection = 'desc']
)
|
|
getNextPrevNews [line 1749]
Returns the title and the titlelink of the next or previous article in single news article pagination as an array Returns false if there is none (or option is empty)
NOTE: This is not available if using the CombiNews feature
Parameters:
|
string |
$option: |
"prev" or "next" |
|
string |
$sortorder: |
"desc" (default)or "asc" for descending or ascending news. Required if these for next_news() loop are changed. |
|
string |
$sortdirection: |
"date" (default) or "title" for sorting by date or title. Required if these for next_news() loop are changed. |
mixed getNextPrevNews(
[string $option = ''], [string $sortorder = 'date'], [string $sortdirection = 'desc']
)
|
|
getNumNews [line 190]
Returns the number of news articles.
When in search context this is the count of the articles found. Otherwise it is the count of articles that match the criteria.
Parameters:
int getNumNews(
[bool $total = false]
)
|
|
getNumPages [line 2374]
Returns a count of the pages
If in search context, the count is the number of items found. If in a page context, the count is the number of sub-pages of the current page. Otherwise it is the total number of pages.
Parameters:
|
bool |
$total: |
return the count of all pages |
int getNumPages(
[bool $total = false]
)
|
|
getPageAuthor [line 2669]
Returns the author of a page
Parameters:
|
bool |
$fullname: |
True if you want to get the full name if set, false if you want the login/screenname |
string getPageAuthor(
[bool $fullname = false]
)
|
|
getPageContent [line 2578]
Returns page content either of the current page or if requested by titlelink directly. If not both return false Set the titlelink of a page to call a specific even un-published page ($published = false) as a gallery description or on another custom page for example
Parameters:
|
string |
$titlelink: |
the titlelink of the page to print the content from |
|
bool |
$published: |
If titlelink is set, set this to false if you want to call an un-published page's content. True is default |
mixed getPageContent(
[string $titlelink = NULL], [bool $published = true]
)
|
|
getPageCustomData [line 2647]
Gets the custom data field of the current page
string getPageCustomData(
)
|
|
getPageDate [line 2523]
Returns the creation date of a page
getPageExtraContent [line 2614]
Returns page extra content either of the current page or if requested by titlelink directly. If not both return false Set the titlelink of a page to call a specific even un-published page ($published = false) as a gallery description or on another custom page for example
Parameters:
|
string |
$titlelink: |
the titlelink of the page to print the content from |
|
bool |
$published: |
If titlelink is set, set this to false if you want to call an un-published page's extra content. True is default |
mixed getPageExtraContent(
[string $titlelink = ''], [bool $published = true]
)
|
|
getPageLastChangeDate [line 2548]
Returns the last change date of a page if available
string getPageLastChangeDate(
)
|
|
getPageLinkPath [line 2710]
Returns path to the pages.php page
string getPageLinkPath(
)
|
|
getPageLinkURL [line 2721]
Returns full path to a specific page
Parameters:
string getPageLinkURL(
[ $titlelink = '']
)
|
|
getPageParentID [line 2510]
Returns the id of the parent page of a page
getPageSortorder [line 2695]
Returns the sortorder of a page
string getPageSortorder(
)
|
|
getPageTitleLink [line 2463]
Returns titlelink of a page
string getPageTitleLink(
)
|
|
getPrevNewsPageURL [line 1560]
Returns the url to the previous news page
string getPrevNewsPageURL(
)
|
|
getPrevNewsURL [line 1797]
Returns the title and the titlelink of the previous article in single news article pagination as an array Returns false if there is none (or option is empty)
NOTE: This is not available if using the CombiNews feature
Parameters:
|
string |
$sortorder: |
"desc" (default)or "asc" for descending or ascending news. Required if these for next_news() loop are changed. |
|
string |
$sortdirection: |
"date" (default) or "title" for sorting by date or titlelink. Required if these for next_news() loop are changed. |
mixed getPrevNewsURL(
[string $sortorder = 'date'], [string $sortdirection = 'desc']
)
|
|
getTotalNewsPages [line 1723]
void getTotalNewsPages(
)
|
|
getZenpageRSSLink [line 2993]
Gets a RSS link
Parameters:
|
string |
$option: |
type of RSS: "News" feed for all news articles "Category" for only the news articles of the category that is currently selected "NewsWithImages" for all news articles and latest images "Comments" for all news articles and pages "Comments-news" for comments of only the news article it is called from "Comments-page" for comments of only the page it is called from "Comments-all" for comments from all albums, images, news articels and pages |
|
string |
$categorylink: |
The specific category you want a RSS feed from (only 'Category' mode) |
|
string |
$prev: |
text to before before the link |
|
string |
$linktext: |
title of the link |
|
string |
$next: |
text to appear after the link |
|
bool |
$printIcon: |
print an RSS icon beside it? if true, the icon is zp-core/images/rss.png |
|
string |
$class: |
css class |
|
string |
$lang: |
optional to display a feed link for a specific language (currently works for latest images only). Enter the locale like "de_DE" (the locale must be installed on your Zenphoto to work of course). If empty the locale set in the admin option or the language selector (getOption('locale') is used. |
void getZenpageRSSLink(
[string $option = 'News'], [string $categorylink = ''], [string $lang = NULL], string $prev, string $linktext, string $next, bool $printIcon, string $class
)
|
|
getZenpageStatistic [line 1856]
Gets the statistic for pages, news articles or categories as an unordered list
Parameters:
|
int |
$number: |
The number of news items to get |
|
string |
$option: |
"all" pages, articles and categories "news" for news articles "categories" for news categories "pages" for pages |
|
string |
$mode: |
"popular" most viewed for pages, news articles and categories "mostrated" for news articles and pages "toprated" for news articles and pages "random" for pages, news articles and categories |
array getZenpageStatistic(
[int $number = 10], [string $option = "all"], [string $mode = "popular"]
)
|
|
is_GalleryNewsType [line 146]
CombiNews feature: A general wrapper function to check if this is a 'normal' news article (type 'news' or one of the zenphoto news types
bool is_GalleryNewsType(
)
|
|
is_News [line 29]
Checks if the current page is in news context.
is_NewsArchive [line 69]
Checks if the current page is a news archive page
is_NewsArticle [line 49]
Checks if the current page is a single news article page
is_NewsCategory [line 59]
Checks if the current page is a news category page
is_NewsPage [line 39]
Checks if the current page is the news page in general.
is_NewsType [line 136]
Checks what type the current news item is (See get NewsType())
Parameters:
|
string |
$type: |
The type to check for "news" for a news article or if using the CombiNews feature "flvmovie" (for flv, fla, mp3, m4a and mp4/m4v), "image", "3gpmovie" or "quicktime" |
|
obj |
$newsobj: |
optional news object to check directly outside news context |
bool is_NewsType(
string $type, [obj $newsobj = NULL]
)
|
|
is_Pages [line 79]
Checks if the current page is a zenpage page
next_news [line 220]
Returns the next news item on a page.
sets $_zp_current_zenpage_news to the next news item Returns true if there is an new item to be shown NOTE: If you set the sortorder and sortdirection parameters you also have to set the same ones on the next/prevNewsLink/URL functions for the single news article pagination!
Parameters:
|
string |
$sortorder: |
"date" for sorting by date (default) "title" for sorting by title This parameter is not used for date archives and CombiNews mode. |
|
string |
$sortdirection: |
"desc" (default) for descending sort order "asc" for ascending sort order This parameter is not used for date archives and CombiNews mode |
bool next_news(
[string $sortorder = "date"], [string $sortdirection = "desc"]
)
|
|
next_page [line 2399]
Returns a page from the search list
printAllNewsCategories [line 1167]
Prints all news categories as a unordered html list
Parameters:
|
string |
$newsindex: |
How you want to call the link the main news page without a category, leave empty if you don't want to print it at all. |
|
bool |
$counter: |
TRUE or FALSE (default TRUE). If you want to show the number of articles behind the category name within brackets, |
|
string |
$css_id: |
The CSS id for the list |
|
string |
$css_class_active: |
The css class for the active menu item |
|
bool |
$startlist: |
set to true to output the UL tab |
|
int |
$showsubs: |
Set to depth of sublevels that should be shown always. 0 by default. To show all, set to a true! Only valid if option=="list". |
|
string |
$css_class: |
CSS class of the sub level list(s) |
|
string |
$$css_class_active: |
CSS class of the sub level list(s) |
|
string |
$option: |
The mode for the menu: "list" context sensitive toplevel plus sublevel pages, "list-top" only top level pages, "omit-top" only sub level pages "list-sub" lists only the current pages direct offspring |
|
int |
$limit: |
truncation of display text |
|
|
$css_class_topactive: |
|
string printAllNewsCategories(
[string $newsindex = 'All news'], [bool $counter = TRUE], [string $css_id = ''], [ $css_class_topactive = ''], [bool $startlist = true], [string $css_class = ''], [string $css_class_active = ''], [string $option = 'list'], [int $showsubs = false], [int $limit = NULL], string $$css_class_active
)
|
|
printBareNewsTitle [line 395]
void printBareNewsTitle(
)
|
|
printBarePageTitle [line 2454]
prints the raw title of a page.
string printBarePageTitle(
)
|
|
printCurrentNewsArchive [line 1138]
Prints the current select news date (year-month) or formatted
Parameters:
|
string |
$before: |
What you want to print before the archive if using in a breadcrumb navigation for example |
|
string |
$mode: |
"formatted" for a formatted date or "plain" for the pure year-month (for example "2008-09") archive date |
|
string |
$format: |
If $mode="formatted" how the date should be printed (see PHP's strftime() function for the requirements) |
string printCurrentNewsArchive(
[string $before = ''], [string $mode = 'formatted'], [string $format = '%B %Y']
)
|
|
printCurrentNewsCategory [line 936]
Prints the title of the currently selected news category
Parameters:
|
string |
$before: |
insert what you want to be show before it |
void printCurrentNewsCategory(
[string $before = '']
)
|
|
printLatestNews [line 1278]
Prints the latest news either only news articles or with the latest images or albums as a unordered html list
NOTE: Latest images and albums require the image_album_statistic plugin
Parameters:
|
int |
$number: |
The number of news items to get |
|
string |
$option: |
"none" for only news articles "with_latest_images" for news articles with the latest images by id "with_latest_images_date" for news articles with the latest images by date "with_latest_images_mtime" for news articles with the latest images by mtime (upload date) "with_latest_images_publishdate" for news articles with the latest images by publishdate (if not set date is used) "with_latest_albums" for news articles with the latest albums by id "with_latest_albums_date" for news articles with the latest albums by date "with_latest_albums_mtime" for news articles with the latest albums by mtime (upload date) "with_latest_albums_publishdate" for news articles with the latest albums by publishdate (if not set date is used) "with_latestupdated_albums" for news articles with the latest updated albums |
|
string |
$category: |
Optional news articles by category (only "none" option" |
|
bool |
$showdate: |
If the date should be shown |
|
bool |
$showcontent: |
If the content should be shown |
|
int |
$contentlength: |
The lengths of the content |
|
bool |
$showcat: |
If the categories should be shown |
|
string |
$readmore: |
Text for the read more link, if empty the option value for "zenpage_readmore" is used |
|
bool |
$sticky: |
place sticky articles at the front of the list |
string printLatestNews(
[int $number = 5], [string $option = 'with_latest_images'], [string $category = ''], [bool $showdate = true], [bool $showcontent = true], [int $contentlength = 70], [bool $showcat = true], [string $readmore = NULL], [bool $sticky = true]
)
|
|
printLatestZenpageComments [line 2936]
Prints out latest comments for news articles and pages as a unordered list
Parameters:
|
int |
$number: |
how many comments you want. |
|
string |
$shorten: |
the number of characters to shorten the comment display |
|
string |
$id: |
The css id to style the list |
|
string |
$type: |
"all" for all latest comments for all news articles and all pages "news" for the lastest comments of one specific news article "page" for the lastest comments of one specific page |
|
int |
$itemID: |
the ID of the element to get the comments for if $type != "all" |
void printLatestZenpageComments(
int $number, [string $shorten = '123'], [string $id = 'showlatestcomments'], [string $type = "all"], [int $itemID = ""]
)
|
|
printMostPopularItems [line 2035]
Prints the most popular pages, news articles and categories as an unordered list
Parameters:
|
int |
$number: |
The number of news items to get |
|
string |
$option: |
"all" pages and articles "news" for news articles "pages" for pages |
|
bool |
$showstats: |
if the value should be shown |
|
bool |
$showtype: |
if the type should be shown |
|
bool |
$showdate: |
if the date should be shown (news articles and pages only) |
|
bool |
$showcontent: |
if the content should be shown (news articles and pages only) |
|
bool |
$contentlength: |
The shortened lenght of the content |
void printMostPopularItems(
[int $number = 10], [string $option = "all"], [bool $showstats = true], [bool $showtype = true], [bool $showdate = true], [bool $showcontent = true], [bool $contentlength = 40]
)
|
|
printMostRatedItems [line 2052]
Prints the most rated pages and news articles as an unordered list
Parameters:
|
int |
$number: |
The number of news items to get |
|
string |
$option: |
"all" pages and articles "news" for news articles "pages" for pages |
|
bool |
$showstats: |
if the value should be shown |
|
bool |
$showtype: |
if the type should be shown |
|
bool |
$showdate: |
if the date should be shown (news articles and pages only) |
|
bool |
$showcontent: |
if the content should be shown (news articles and pages only) |
|
bool |
$contentlength: |
The shortened lenght of the content |
void printMostRatedItems(
[int $number = 10], [string $option = "all"], [bool $showstats = true], [bool $showtype = true], [bool $showdate = true], [bool $showcontent = true], [bool $contentlength = 40]
)
|
|
printNestedMenu [line 2094]
Prints a context sensitive menu of all pages as a unordered html list
Parameters:
|
string |
$option: |
The mode for the menu: "list" context sensitive toplevel plus sublevel pages, "list-top" only top level pages, "omit-top" only sub level pages "list-sub" lists only the current pages direct offspring |
|
string |
$mode: |
'pages' or 'categories' |
|
bool |
$counter: |
Only $mode = 'categories': Count the articles in each category |
|
string |
$css_id: |
CSS id of the top level list |
|
string |
$css_class_topactive: |
class of the active item in the top level list |
|
string |
$css_class: |
CSS class of the sub level list(s) |
|
string |
$$css_class_active: |
CSS class of the sub level list(s) |
|
string |
$indexname: |
insert the name (default "Gallery Index") how you want to call the link to the gallery index, insert "" (default) if you don't use it, it is not printed then. |
|
int |
$showsubs: |
Set to depth of sublevels that should be shown always. 0 by default. To show all, set to a true! Only valid if option=="list". |
|
bool |
$startlist: |
set to true to output the UL tab (false automatically if you use 'omit-top' or 'list-sub') |
|
int |
$limit: |
truncation limit display strings |
|
|
$css_class_active: |
|
string printNestedMenu(
[string $option = 'list'], [string $mode = NULL], [bool $counter = TRUE], [string $css_id = NULL], [string $css_class_topactive = NULL], [string $css_class = NULL], [ $css_class_active = NULL], [string $indexname = NULL], [int $showsubs = 0], [bool $startlist = true], [int $limit = NULL], string $$css_class_active
)
|
|
printNewsArchive [line 1059]
Prints the monthy news archives sorted by year NOTE: This does only include news articles.
Parameters:
|
string |
$class: |
optional class |
|
string |
$yearclass: |
optional class for "year" |
|
string |
$monthclass: |
optional class for "month" |
|
string |
$activeclass: |
optional class for the currently active archive |
|
bool |
$yearsonly: |
If set to true the archive only shows the years with total count (Default false) |
|
string |
$order: |
'desc' (default) or 'asc' for descending or ascending |
void printNewsArchive(
[string $class = 'archive'], [string $yearclass = 'year'], [string $monthclass = 'month'], [string $activeclass = "archive-active"], [bool $yearsonly = false], [string $order = 'desc']
)
|
|
printNewsAuthor [line 835]
Prints the author of a news article
Parameters:
string printNewsAuthor(
[ $fullname = false]
)
|
|
printNewsCategories [line 992]
Prints the categories of current article as a unordered html list
Parameters:
|
string |
$separator: |
A separator to be shown between the category names if you choose to style the list inline |
|
string |
$class: |
The CSS class for styling |
|
|
$before: |
|
string printNewsCategories(
[string $separator = ''], [ $before = ''], [string $class = '']
)
|
|
printNewsCategoryCustomData [line 981]
Prints the custom data field of the news category
void printNewsCategoryCustomData(
)
|
|
printNewsCategoryDesc [line 962]
Prints the description of the news category
void printNewsCategoryDesc(
)
|
|
printNewsCategoryURL [line 1384]
Prints the full link to a news category
Parameters:
|
string |
$before: |
If you want to print text before the link |
|
string |
$catlink: |
The category link of a category |
string printNewsCategoryURL(
[string $before = ''], [string $catlink = '']
)
|
|
printNewsContent [line 646]
Prints the news article content. Note: TinyMCE used by Zenpage for news articles may already add a surrounding <p></p> to the content.
If using the CombiNews feature this prints the thumbnail or sized image for a gallery item. If using the 'CombiNews sized image' mode it shows movies directly and the description below.
Parameters:
|
int |
$shorten: |
$shorten The lengths of the content for the news main page for example (only for video/audio descriptions, not for normal image descriptions) |
|
string |
$shortenindicator: |
The placeholder to mark the shortening (e.g."(...)"). If empty the Zenpage option for this is used. |
|
string |
$readmore: |
The text for the "read more" link. If empty the term set in Zenpage option is used. |
void printNewsContent(
[int $shorten = false], [string $shortenindicator = NULL], [string $readmore = NULL]
)
|
|
printNewsCustomData [line 792]
Prints the custom data field of the curent news article
void printNewsCustomData(
)
|
|
printNewsDate [line 1043]
Prints the date of the current news article
printNewsExtraContent [line 752]
Prints the extracontent of a news article if in single news articles view
string printNewsExtraContent(
)
|
|
printNewsIndexURL [line 1416]
Prints the full link of the news index page (news page 1)
Parameters:
|
string |
$name: |
The linktext |
|
string |
$before: |
The text to appear before the link text |
|
string |
$archive: |
the link text for an archive page |
void printNewsIndexURL(
[string $name = NULL], [string $before = ''], [string $archive = NULL]
)
|
|
printNewsPageList [line 1636]
Prints the page number list for news page navigation
Parameters:
|
string |
$class: |
The CSS class for the disabled link |
string printNewsPageList(
[string $class = 'pagelist']
)
|
|
printNewsPageListWithNav [line 1653]
Prints the full news page navigation with prev/next links and the page number list
Parameters:
|
string |
$next: |
The next page link text |
|
string |
$prev: |
The prev page link text |
|
bool |
$nextprev: |
If the prev/next links should be printed |
|
string |
$class: |
The CSS class for the disabled link |
|
bool |
$firstlast: |
Add links to the first and last pages of you gallery |
|
int |
$navlen: |
Number of navigation links to show (0 for all pages). Works best if the number is odd. |
string printNewsPageListWithNav(
string $next, string $prev, [bool $nextprev = true], [string $class = 'pagelist'], [bool $firstlast = true], [int $navlen = 9]
)
|
|
printNewsTitle [line 377]
prints the news article title
Parameters:
|
string |
$before: |
insert if you want to use for the breadcrumb navigation or in the html title tag |
void printNewsTitle(
[string $before = '']
)
|
|
printNewsTitleLink [line 433]
Prints the titlelin of a news article as a full html link
Parameters:
|
string |
$before: |
insert what you want to be show before the titlelink. |
void printNewsTitleLink(
[string $before = '']
)
|
|
printNewsURL [line 1517]
Prints the url to a news article
Parameters:
|
string |
$titlelink: |
The titlelink of a news article |
string printNewsURL(
[string $titlelink = '']
)
|
|
printNextNewsLink [line 1812]
Prints the link of the next article in single news article pagination if available
NOTE: This is not available if using the CombiNews feature
Parameters:
|
string |
$next: |
If you want to show something with the title of the article like a symbol |
|
string |
$sortorder: |
"desc" (default)or "asc" for descending or ascending news. Required if these for next_news() loop are changed. |
|
string |
$sortdirection: |
"date" (default) or "title" for sorting by date or titlelink. Required if these for next_news() loop are changed. |
string printNextNewsLink(
[string $next = " »"], [string $sortorder = 'date'], [string $sortdirection = 'desc']
)
|
|
printNextNewsPageLink [line 1620]
Prints the link to the next news page
Parameters:
|
string |
$next: |
The linktext |
|
string |
$class: |
The CSS class for the disabled link |
string printNextNewsPageLink(
[string $next = 'next »'], [string $class = 'disabledlink']
)
|
|
printPageAuthor [line 2683]
Prints the author of a page
Parameters:
|
bool |
$fullname: |
True if you want to get the full name if set, false if you want the login/screenname |
string printPageAuthor(
[bool $fullname = false]
)
|
|
printPageContent [line 2601]
Print page content either of the current page or if requested by titlelink directly. If not both return false Set the titlelink of a page to call a specific even un-published page ($published = false) as a gallery description or on another custom page for example
Parameters:
|
string |
$titlelink: |
the titlelink of the page to print the content from |
|
bool |
$published: |
If titlelink is set, set this to false if you want to call an un-published page's content. True is default |
mixed printPageContent(
[string $titlelink = NULL], [bool $published = true]
)
|
|
printPageCustomData [line 2657]
Prints the custom data field of the current page
void printPageCustomData(
)
|
|
printPageDate [line 2538]
Prints the creation date of a page
printPageExtraContent [line 2638]
Prints page extra content if on a page either of the current page or if requested by titlelink directly. If not both return false Set the titlelink of a page to call a specific even un-published page ($published = false) as a gallery description or on another custom page for example
Parameters:
|
string |
$titlelink: |
the titlelink of the page to print the content from |
|
bool |
$published: |
If titlelink is set, set this to false if you want to call an un-published page's extra content. True is default |
mixed printPageExtraContent(
[string $titlelink = NULL], [bool $published = true]
)
|
|
printPageLastChangeDate [line 2564]
Prints the last change date of a page
Parameters:
|
string |
$before: |
The text you want to show before the link |
string printPageLastChangeDate(
[string $before = The text you want to show before the link]
)
|
|
printPageLinkURL [line 2739]
Prints the url to a specific zenpage page
Parameters:
|
string |
$linktext: |
Text for the URL |
|
string |
$titlelink: |
page to include in URL |
|
string |
$prev: |
text to insert before the URL |
|
string |
$next: |
text to follow the URL |
|
string |
$class: |
optional class |
void printPageLinkURL(
string $linktext, string $titlelink, [string $prev = ''], [string $next = ''], [string $class = NULL]
)
|
|
printPageMenu [line 2808]
Prints a context sensitive menu of all pages as a unordered html list
Parameters:
|
string |
$option: |
The mode for the menu: "list" context sensitive toplevel plus sublevel pages, "list-top" only top level pages, "omit-top" only sub level pages "list-sub" lists only the current pages direct offspring |
|
string |
$css_id: |
CSS id of the top level list |
|
string |
$css_class_topactive: |
class of the active item in the top level list |
|
string |
$css_class: |
CSS class of the sub level list(s) |
|
string |
$$css_class_active: |
CSS class of the sub level list(s) |
|
string |
$indexname: |
insert the name (default "Gallery Index") how you want to call the link to the gallery index, insert "" (default) if you don't use it, it is not printed then. |
|
int |
$showsubs: |
Set to depth of sublevels that should be shown always. 0 by default. To show all, set to a true! Only valid if option=="list". |
|
bool |
$startlist: |
set to true to output the UL tab |
|
|
$css_class_active: |
|
|
|
$limit: |
|
string printPageMenu(
[string $option = 'list'], [string $css_id = NULL], [string $css_class_topactive = NULL], [string $css_class = NULL], [ $css_class_active = NULL], [string $indexname = NULL], [int $showsubs = 0], [bool $startlist = true], [ $limit = NULL], string $$css_class_active
)
|
|
printPageTitle [line 2436]
Prints the title of a page
Parameters:
string printPageTitle(
[ $before = NULL]
)
|
|
printPageTitleLink [line 2476]
Prints titlelink of a page
string printPageTitleLink(
)
|
|
printPrevNewsLink [line 1830]
Prints the link of the previous article in single news article pagination if available
NOTE: This is not available if using the CombiNews feature
Parameters:
|
string |
$next: |
If you want to show something with the title of the article like a symbol |
|
string |
$sortorder: |
"desc" (default)or "asc" for descending or ascending news. Required if these for next_news() loop are changed. |
|
string |
$sortdirection: |
"date" (default) or "title" for sorting by date or titlelink. Required if these for next_news() loop are changed. |
|
|
$prev: |
|
string printPrevNewsLink(
[ $prev = "« "], [string $sortorder = 'date'], [string $sortdirection = 'desc'], string $next
)
|
|
printPrevNewsPageLink [line 1586]
Prints the link to the previous news page
Parameters:
|
string |
$prev: |
The linktext |
|
string |
$class: |
The CSS class for the disabled link |
string printPrevNewsPageLink(
[string $prev = '« prev'], [string $class = 'disabledlink']
)
|
|
printSubPagesExcerpts [line 2759]
Prints excerpts of the direct subpages (1 level) of a page for a kind of overview. The setup is:
<div class='pageexcerpt'> <h4>page title</h3> <p>page content excerpt</p> <p>read more</p> </div>
Parameters:
|
int |
$excerptlength: |
The length of the page content, if nothing specifically set, the plugin option value for 'news article text length' is used |
|
string |
$readmore: |
The text for the link to the full page. If empty the read more setting from the options is used. |
|
string |
$shortenindicator: |
The optional placeholder that indicates that the content is shortened, if this is not set the plugin option "news article text shorten indicator" is used. |
string printSubPagesExcerpts(
[int $excerptlength = NULL], [string $readmore = NULL], [string $shortenindicator = NULL]
)
|
|
printTopRatedItems [line 2069]
Prints the top rated pages and news articles as an unordered list
Parameters:
|
int |
$number: |
The number of news items to get |
|
string |
$option: |
"all" pages and articles "news" for news articles "pages" for pages |
|
bool |
$showstats: |
if the value should be shown |
|
bool |
$showtype: |
if the type should be shown |
|
bool |
$showdate: |
if the date should be shown (news articles and pages only) |
|
bool |
$showcontent: |
if the content should be shown (news articles and pages only) |
|
bool |
$contentlength: |
The shortened lenght of the content |
void printTopRatedItems(
[int $number = 10], [string $option = "all"], [bool $showstats = true], [bool $showtype = true], [bool $showdate = true], [bool $showcontent = true], [bool $contentlength = 40]
)
|
|
printZenpageItemsBreadcrumb [line 2325]
Prints the parent items breadcrumb navigation for pages or categories
Parameters:
|
string |
$before: |
Text to place before the breadcrumb item |
|
string |
$after: |
Text to place after the breadcrumb item |
void printZenpageItemsBreadcrumb(
[string $before = NULL], [string $after = NULL]
)
|
|
printZenpageRSSHeaderLink [line 3092]
Prints the RSS link for use in the HTML HEAD
Parameters:
|
string |
$option: |
type of RSS: "News" feed for all news articles "Category" for only the news articles of the category that is currently selected "NewsWithImages" for all news articles and latest images "Comments" for all news articles and pages "Comments-news" for comments of only the news article it is called from "Comments-page" for comments of only the page it is called from "Comments-all" for comments from all albums, images, news articels and pages |
|
string |
$categorylink: |
The specific category you want a RSS feed from (only 'Category' mode) |
|
string |
$linktext: |
title of the link |
|
string |
$lang: |
optional to display a feed link for a specific language (currently works for latest images only). Enter the locale like "de_DE" (the locale must be installed on your Zenphoto to work of course). If empty the locale set in the admin option or the language selector (getOption('locale') is used. |
void printZenpageRSSHeaderLink(
[string $option = 'News'], [string $categorylink = ''], [string $linktext = ''], [string $lang = null]
)
|
|
printZenpageRSSLink [line 3064]
Prints a RSS link
Parameters:
|
string |
$option: |
type of RSS: "News" feed for all news articles "Category" for only the news articles of the category that is currently selected "NewsWithImages" for all news articles and latest images "Comments" for all news articles and pages "Comments-news" for comments of only the news article it is called from "Comments-page" for comments of only the page it is called from "Comments-all" for comments from all albums, images, news articels and pages |
|
string |
$categorylink: |
The specific category you want a RSS feed from (only 'Category' mode) |
|
string |
$prev: |
text to before before the link |
|
string |
$linktext: |
title of the link |
|
string |
$next: |
text to appear after the link |
|
bool |
$printIcon: |
print an RSS icon beside it? if true, the icon is zp-core/images/rss.png |
|
string |
$class: |
css class |
|
string |
$lang: |
optional to display a feed link for a specific language (currently works for latest images only). Enter the locale like "de_DE" (the locale must be installed on your Zenphoto to work of course). If empty the locale set in the admin option or the language selector (getOption('locale') is used. |
void printZenpageRSSLink(
[string $option = 'News'], [string $categorylink = ''], [string $prev = ''], [string $linktext = ''], [string $next = ''], [bool $printIcon = true], [string $class = null], [string $lang = NULL]
)
|
|
printZenpageStatistic [line 1961]
Prints the statistics Zenpage items as an unordered list
Parameters:
|
int |
$number: |
The number of news items to get |
|
string |
$option: |
"all" pages and articles "news" for news articles "pages" for pages |
|
string |
$mode: |
"popular" most viewed for pages, news articles and categories "mostrated" for news articles and pages "toprated" for news articles and pages "random" for pages, news articles and categories |
|
bool |
$showstats: |
if the value should be shown |
|
bool |
$showtype: |
if the type should be shown |
|
bool |
$showdate: |
if the date should be shown (news articles and pages only) |
|
bool |
$showcontent: |
if the content should be shown (news articles and pages only) |
|
bool |
$contentlength: |
The shortened lenght of the content |
void printZenpageStatistic(
[int $number = 10], [string $option = "all"], [string $mode = "popular"], [bool $showstats = true], [bool $showtype = true], [bool $showdate = true], [bool $showcontent = true], [bool $contentlength = 40]
)
|
|
stickyNews [line 115]
returns the "sticky" value of the news article
Parameters:
|
obj |
$newsobj: |
optional news object to check directly outside news context |
bool stickyNews(
[obj $newsobj = NULL]
)
|
|
zenpageAlbumImage [line 3112]
support to show an image from an album The imagename is optional. If absent the album thumb image will be used and the link will be to the album. If present the link will be to the image.
Parameters:
|
string |
$albumname: |
|
|
string |
$imagename: |
|
|
int |
$size: |
the size to make the image. If omitted image will be 50% of 'image_size' option. |
|
bool |
$linkalbum: |
set true to link specific image to album instead of image |
void zenpageAlbumImage(
string $albumname, [string $imagename = NULL], [int $size = NULL], [bool $linkalbum = false]
)
|
|
zenpageOpenedForComments [line 2837]
Returns if comments are open for this news article or page (TRUE or FALSE)
bool zenpageOpenedForComments(
)
|
|
|
|