[ class tree: plugins ] [ index: plugins ] [ all elements ]

Class: Zenpage

Source Location: /zp-extensions/zenpage/zenpage-class.php

Class Zenpage

Property Summary
mixed   $categoryStructure  
mixed   $news_on_index  

[ Top ]
Method Summary
static string   getOffset()   Gets the LIMIT and OFFSET for the query that gets the news articles
Zenpage   __construct()   Class instantiator
int   countCombiNews()   CombiNews Feature: Counts all news articles and all images
array   getAllArticleDates()   Retrieves a list of all unique years & months
array   getAllCategories()   Gets all categories
int   getArticle()   Returns an article from the album based on the index passed.
array   getArticles()   Gets all news articles titlelink.
array   getCategory()   Gets a category titlelink by id
string   getCategoryLink()   Gets the category link of a category
void   getCategoryStructure()  
array   getCombiNews()   Gets news articles and images of a gallery to show them together on the news section
string   getNewsArchivePath()   Returns partial path of news date archive
string   getNewsBaseURL()   Returns the base /news or index.php?p=news url
string   getNewsCategoryPath()   Returns partial path of news category
string   getNewsIndexURL()   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   getNewsPagePath()   Returns partial path of a news page number path
string   getNewsTitlePath()   Returns partial path of news article title
array   getPages()   Gets the titlelink and sort order for all pages or published ones.
string   getPagesLinkPath()   Returns path to the pages.php page without the title(link)
void   getTotalArticles()   Returns the articles count
string   __toString()   "Magic" function to return a string identifying the object when it is treated as a string

[ Top ]
Properties
mixed   $categoryStructure = NULL [line 36]
API Tags:
Access:  protected


[ Top ]
mixed   $news_on_index = NULL [line 35]

[ Top ]
Methods
static method getOffset  [line 294]

  static string getOffset( int $articles_per_page, [bool $ignorepagination = false]  )

Gets the LIMIT and OFFSET for the query that gets the news articles

Parameters:
int   $articles_per_page:  The number of articles to get
bool   $ignorepagination:  If pagination should be ingored so always with the first is started (false is default)


[ Top ]
Constructor __construct  [line 41]

  Zenpage __construct( )

Class instantiator



[ Top ]
countCombiNews  [line 620]

  int countCombiNews( [ $published = NULL]  )

CombiNews Feature: Counts all news articles and all images

Parameters:
   $published: 


[ Top ]
getAllArticleDates  [line 338]

  array getAllArticleDates( [bool $yearsonly = false], [string $order = 'desc']  )

Retrieves a list of all unique years & months

Parameters:
bool   $yearsonly:  If set to true only the years' count is returned (Default false)
string   $order:  'desc' (default) or 'asc' for descending or ascending


[ Top ]
getAllCategories  [line 771]

  array getAllCategories( [ $visible = true]  )

Gets all categories

Parameters:
   $visible: 


[ Top ]
getArticle  [line 275]

  int getArticle( int $index, [ $published = NULL], [ $sortorder = 'date'], [ $sortdirection = 'desc'], [ $sticky = true]  )

Returns an article from the album based on the index passed.

Parameters:
int   $index: 
   $published: 
   $sortorder: 
   $sortdirection: 
   $sticky: 


[ Top ]
getArticles  [line 159]

  array getArticles( [int $articles_per_page = 0], [string $published = NULL], [boolean $ignorepagination = false], [string $sortorder = 'date'], [string $sortdirection = 'desc'], [bool $sticky = true]  )

Gets all news articles titlelink.

NOTE: Since this function only returns titlelinks for use with the object model it does not exclude articles that are password protected via a category

Parameters:
int   $articles_per_page:  The number of articles to get
string   $published:  "published" for an published articles, "unpublished" for an unpublised articles, "sticky" for sticky articles (published or not!) for admin page use only, "all" for all articles
boolean   $ignorepagination:  Since also used for the news loop this function automatically paginates the results if the "page" GET variable is set. To avoid this behaviour if using it directly to get articles set this TRUE (default FALSE)
string   $sortorder:  "date" for sorting by date (default) "title" for sorting by title This parameter is not used for date archives
string   $sortdirection:  "desc" (default) for descending sort order "asc" for ascending sort order This parameter is not used for date archives
bool   $sticky:  set to true to place "sticky" articles at the front of the list.


[ Top ]
getCategory  [line 756]

  array getCategory( int $id  )

Gets a category titlelink by id

Parameters:
int   $id:  id of the category


[ Top ]
getCategoryLink  [line 741]

  string getCategoryLink( string $catname  )

Gets the category link of a category

Parameters:
string   $catname:  the title of the category


[ Top ]
getCategoryStructure  [line 63]

  void getCategoryStructure( )



[ Top ]
getCombiNews  [line 427]

  array getCombiNews( [int $articles_per_page = ''], [string $mode = ''], [string $published = NULL], [string $sortorder = ''], [bool $sticky = true]  )

Gets news articles and images of a gallery to show them together on the news section

NOTE: This function does not exclude articles that are password protected via a category

Parameters:
int   $articles_per_page:  The number of articles to get
string   $mode:  "latestimages-thumbnail" "latestimages-thumbnail-customcrop" "latestimages-sizedimage" "latestalbums-thumbnail" "latestalbums-thumbnail-customcrop" "latestalbums-sizedimage" "latestimagesbyalbum-thumbnail" "latestimagesbyalbum-thumbnail-customcrop" "latestimagesbyalbum-sizedimage" "latestupdatedalbums-thumbnail" (for RSS and getLatestNews() used only) "latestupdatedalbums-thumbnail-customcrop" (for RSS and getLatestNews() used only) "latestupdatedalbums-sizedimage" (for RSS and getLatestNews() used only) NOTE: The "latestupdatedalbums" variants do NOT support pagination as required on the news loop!
string   $published:  "published" for published articles, "unpublished" for un-published articles, "all" for all articles
string   $sortorder:  id, date or mtime, only for latestimages-... modes
bool   $sticky:  set to true to place "sticky" articles at the front of the list.


[ Top ]
getNewsArchivePath  [line 706]

  string getNewsArchivePath( )

Returns partial path of news date archive



[ Top ]
getNewsBaseURL  [line 687]

  string getNewsBaseURL( )

Returns the base /news or index.php?p=news url



[ Top ]
getNewsCategoryPath  [line 697]

  string getNewsCategoryPath( )

Returns partial path of news category



[ Top ]
getNewsIndexURL  [line 673]

  string getNewsIndexURL( )

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.



[ Top ]
getNewsPagePath  [line 726]

  string getNewsPagePath( )

Returns partial path of a news page number path



[ Top ]
getNewsTitlePath  [line 716]

  string getNewsTitlePath( )

Returns partial path of news article title



[ Top ]
getPages  [line 90]

  array getPages( [bool $published = NULL], [bool $toplevel = false]  )

Gets the titlelink and sort order for all pages or published ones.

NOTE: Since this function only returns titlelinks for use with the object model it does not exclude pages that are password protected

Parameters:
bool   $published:  TRUE for published or FALSE for all pages including un-published
bool   $toplevel:  TRUE for only the toplevel pages


[ Top ]
getPagesLinkPath  [line 130]

  string getPagesLinkPath( )

Returns path to the pages.php page without the title(link)



[ Top ]
getTotalArticles  [line 313]

  void getTotalArticles( )

Returns the articles count



[ Top ]
__toString  [line 791]

  string __toString( )

"Magic" function to return a string identifying the object when it is treated as a string


API Tags:
Access:  public


[ Top ]

Documentation generated on Sat, 05 Jan 2013 15:51:32 +0100 by phpDocumentor 1.4.3