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 2714]
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 166]
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 826]
CombiNews feature only: returns the raw title of an album if image or movie/audio or false.
string getBareNewsAlbumTitle(
)
|
|
getBareNewsTitle [line 382]
Returns the raw title of a news article.
string getBareNewsTitle(
)
|
|
getBarePageTitle [line 2350]
Returns the raw title of a page.
string getBarePageTitle(
)
|
|
getContentShorten [line 626]
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 1067]
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']
)
|
|
getFullNewsImageURL [line 868]
CombiNews feature only: Returns the fullimage link if image or movie/audio or false.
mixed getFullNewsImageURL(
)
|
|
getLatestNews [line 1134]
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_albums" for news articles with the latest albums by id "with_latestupdated_albums" for news articles with the latest updated albums |
|
string |
$category: |
Optional news articles by category (only "none" option) |
array getLatestNews(
[int $number = 2], [string $option = 'none'], [string $category = '']
)
|
|
getLatestZenpageComments [line 2757]
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 835]
CombiNews feature only: returns the album name (folder) if image or movie/audio or returns false.
mixed getNewsAlbumName(
)
|
|
getNewsAlbumTitle [line 807]
CombiNews feature only: returns the album title if image or movie/audio or false.
mixed getNewsAlbumTitle(
)
|
|
getNewsAlbumURL [line 855]
CombiNews feature only: returns the url to an album if image or movie/audio or returns false.
getNewsArchivePath [line 1369]
Returns partial path of news date archive
string getNewsArchivePath(
)
|
|
getNewsArchivePathNav [line 1450]
news archive path only for use in the news article pagination
string getNewsArchivePathNav(
)
|
|
getNewsAuthor [line 761]
Gets the author of a news article (if in Combinews mode for gallery items the owner)
Parameters:
string getNewsAuthor(
[ $fullname = false]
)
|
|
getNewsBaseURL [line 1348]
Returns the base /news or index.php?p=news url
getNewsCategories [line 882]
Gets the categories of the current news article
array getNewsCategories(
)
|
|
getNewsCategoryCustomData [line 928]
Gets the custom data field of the current news category
string getNewsCategoryCustomData(
)
|
|
getNewsCategoryDesc [line 908]
Gets the description of the current news category
string getNewsCategoryDesc(
)
|
|
getNewsCategoryPath [line 1359]
Returns partial path of news category
string getNewsCategoryPath(
)
|
|
getNewsCategoryPathNav [line 1436]
News cat path only for use in the news article pagination
string getNewsCategoryPathNav(
)
|
|
getNewsCategoryURL [line 1292]
Returns the full path to a news category
Parameters:
|
string |
$catlink: |
The category link of a category |
string getNewsCategoryURL(
[string $catlink = '']
)
|
|
getNewsContent [line 442]
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 742]
Gets the custom data field of the curent news article
string getNewsCustomData(
)
|
|
getNewsDate [line 974]
Gets the date of the current news article
getNewsExtraContent [line 696]
Gets the extracontent of a news article if in single news articles view or returns FALSE
string getNewsExtraContent(
)
|
|
getNewsID [line 321]
Gets the id of a news article/item
getNewsIndexURL [line 1321]
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 1391]
Returns partial path of a news page number path
string getNewsPagePath(
)
|
|
getNewsReadMore [line 721]
Returns the text for the read more link for news articles or gallery items if in CombiNews mode
string getNewsReadMore(
)
|
|
getNewsTitle [line 334]
Gets the news article title
getNewsTitleLink [line 394]
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 1380]
Returns partial path of news article title
string getNewsTitlePath(
)
|
|
getNewsType [line 94]
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 1404]
Returns the url to a news article
Parameters:
|
string |
$titlelink: |
The titlelink of a news article |
string getNewsURL(
[string $titlelink = '']
)
|
|
getNewsVideoContent [line 665]
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 1507]
Returns the url to the next news page
string getNextNewsPageURL(
)
|
|
getNextNewsURL [line 1712]
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 1658]
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 198]
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 2277]
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 2565]
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 2474]
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 2543]
Gets the custom data field of the current page
string getPageCustomData(
)
|
|
getPageDate [line 2419]
Returns the creation date of a page
getPageExtraContent [line 2510]
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 2444]
Returns the last change date of a page if available
string getPageLastChangeDate(
)
|
|
getPageLinkPath [line 2606]
Returns path to the pages.php page
string getPageLinkPath(
)
|
|
getPageLinkURL [line 2617]
Returns full path to a specific page
Parameters:
string getPageLinkURL(
[ $titlelink = '']
)
|
|
getPageParentID [line 2406]
Returns the id of the parent page of a page
getPageSortorder [line 2591]
Returns the sortorder of a page
string getPageSortorder(
)
|
|
getPageTitleLink [line 2359]
Returns titlelink of a page
string getPageTitleLink(
)
|
|
getPrevNewsPageURL [line 1464]
Returns the url to the previous news page
string getPrevNewsPageURL(
)
|
|
getPrevNewsURL [line 1727]
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 1632]
void getTotalNewsPages(
)
|
|
getZenpageRSSLink [line 2893]
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 1785]
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 |
array getZenpageStatistic(
[int $number = 10], [string $option = "all"], [string $mode = "popular"]
)
|
|
is_GalleryNewsType [line 154]
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 32]
Checks if the current page is in news context.
is_NewsArchive [line 72]
Checks if the current page is a news archive page
is_NewsArticle [line 52]
Checks if the current page is a single news article page
is_NewsCategory [line 62]
Checks if the current page is a news category page
is_NewsPage [line 42]
Checks if the current page is the news page in general.
is_NewsType [line 144]
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 82]
Checks if the current page is a zenpage page
next_news [line 229]
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 2303]
Returns a page from the search list
printAllNewsCategories [line 1115]
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
)
|
|
printCurrentNewsArchive [line 1089]
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 896]
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 1204]
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_albums" for news articles with the latest albums by id "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 |
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]
)
|
|
printLatestZenpageComments [line 2836]
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 1954]
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 1971]
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 2013]
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 1010]
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 795]
Prints the author of a news article
Parameters:
string printNewsAuthor(
[ $fullname = false]
)
|
|
printNewsCategories [line 949]
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 938]
Prints the custom data field of the news category
void printNewsCategoryCustomData(
)
|
|
printNewsCategoryDesc [line 919]
Prints the description of the news category
void printNewsCategoryDesc(
)
|
|
printNewsCategoryURL [line 1311]
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 608]
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 752]
Prints the custom data field of the curent news article
void printNewsCustomData(
)
|
|
printNewsDate [line 994]
Prints the date of the current news article
printNewsExtraContent [line 712]
Prints the extracontent of a news article if in single news articles view
string printNewsExtraContent(
)
|
|
printNewsIndexURL [line 1338]
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 printNewsIndexURL(
[string $name = ''], [string $before = '']
)
|
|
printNewsPageList [line 1544]
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 1561]
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 370]
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 420]
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 1421]
Prints the url to a news article
Parameters:
|
string |
$titlelink: |
The titlelink of a news article |
string printNewsURL(
[string $titlelink = '']
)
|
|
printNextNewsLink [line 1742]
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 = " &raquo;"], [string $sortorder = 'date'], [string $sortdirection = 'desc']
)
|
|
printNextNewsPageLink [line 1527]
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 &raquo;'], [string $class = 'disabledlink']
)
|
|
printPageAuthor [line 2579]
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 2497]
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 2553]
Prints the custom data field of the current page
void printPageCustomData(
)
|
|
printPageDate [line 2434]
Prints the creation date of a page
printPageExtraContent [line 2534]
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 2460]
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 2632]
Prints full path to a specific page
Parameters:
string printPageLinkURL(
$titlelink
)
|
|
printPageMenu [line 2702]
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 2341]
Prints the title of a page
Parameters:
string printPageTitle(
[ $before = NULL]
)
|
|
printPageTitleLink [line 2372]
Prints titlelink of a page
string printPageTitleLink(
)
|
|
printPrevNewsLink [line 1760]
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 = "&laquo; "], [string $sortorder = 'date'], [string $sortdirection = 'desc'], string $next
)
|
|
printPrevNewsPageLink [line 1491]
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 = '&laquo; prev'], [string $class = 'disabledlink']
)
|
|
printSubPagesExcerpts [line 2653]
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 1988]
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 2234]
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 2992]
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 2964]
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 1883]
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 |
|
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 123]
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 3012]
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 2736]
Returns if comments are open for this news article or page (TRUE or FALSE)
bool zenpageOpenedForComments(
)
|
|
|
|