[ 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
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
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
int   getCurrentAdminNewsPage()   Get current news page for admin news pagination Addition needed because $_GET['page'] conflict with zenphoto could probably removed now...
int   getCurrentNewsPage()   Gets the current news page number
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
string   getOffset()   Gets the LIMIT and OFFSET for the query that gets the news articles
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
void   processExpired()   Un-publishes pages/news whose expiration date has been reached

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


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

[ Top ]
Methods
Constructor __construct  [line 44]

  Zenpage __construct( )

Class instantiator



[ Top ]
countCombiNews  [line 637]

  int countCombiNews( [ $published = NULL]  )

CombiNews Feature: Counts all news articles and all images

Parameters:
   $published: 


[ Top ]
getAllArticleDates  [line 336]

  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 782]

  array getAllCategories( [ $visible = true]  )

Gets all categories

Parameters:
   $visible: 


[ Top ]
getArticles  [line 168]

  array getArticles( [int $articles_per_page = ''], [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 767]

  array getCategory( int $id  )

Gets a category titlelink by id

Parameters:
int   $id:  id of the category


[ Top ]
getCategoryLink  [line 752]

  string getCategoryLink( string $catname  )

Gets the category link of a category

Parameters:
string   $catname:  the title of the category


[ Top ]
getCategoryStructure  [line 47]

  void getCategoryStructure( )



[ Top ]
getCombiNews  [line 456]

  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 ]
getCurrentAdminNewsPage  [line 390]

  int getCurrentAdminNewsPage( )

Get current news page for admin news pagination Addition needed because $_GET['page'] conflict with zenphoto could probably removed now...



[ Top ]
getCurrentNewsPage  [line 373]

  int getCurrentNewsPage( )

Gets the current news page number



[ Top ]
getNewsArchivePath  [line 717]

  string getNewsArchivePath( )

Returns partial path of news date archive



[ Top ]
getNewsBaseURL  [line 698]

  string getNewsBaseURL( )

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



[ Top ]
getNewsCategoryPath  [line 708]

  string getNewsCategoryPath( )

Returns partial path of news category



[ Top ]
getNewsIndexURL  [line 684]

  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 737]

  string getNewsPagePath( )

Returns partial path of a news page number path



[ Top ]
getNewsTitlePath  [line 727]

  string getNewsTitlePath( )

Returns partial path of news article title



[ Top ]
getOffset  [line 286]

  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 ]
getPages  [line 102]

  array getPages( [bool $published = NULL]  )

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


[ Top ]
getPagesLinkPath  [line 139]

  string getPagesLinkPath( )

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



[ Top ]
getTotalArticles  [line 311]

  void getTotalArticles( )

Returns the articles count



[ Top ]
processExpired  [line 72]

  void processExpired( $table  )

Un-publishes pages/news whose expiration date has been reached

Parameters:
   $table: 


[ Top ]

Documentation generated on Tue, 20 Dec 2011 16:08:28 +0100 by phpDocumentor 1.4.3