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

Class: Zenpage

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

Class Zenpage

Descendants
Child Class Description
Combi

[ Top ]
Property Summary
mixed   $categoryStructure  
mixed   $page_sortdirection  
mixed   $page_sortorder  
mixed   $sortdirection  
mixed   $sortorder  
mixed   $sortSticky  

[ Top ]
Method Summary
static void   expiry()  
static string   getOffset()   Gets the LIMIT and OFFSET for the query that gets the news articles
Zenpage   __construct()   Class instantiator
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
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   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   getNewsTitlePath()   Returns partial path of news article title
array   getPages()   Gets all pages or published ones.
void   getSortDirection()  
void   getSortSticky()  
void   getSortType()  
void   getTotalArticles()   Returns the articles count
void   setSortDirection()  
void   setSortSticky()  
void   setSortType()  
void   visibleCategory()  
string   __toString()   "Magic" function to return a string identifying the object when it is treated as a string

[ Top ]
Properties
mixed   $categoryStructure = array() [line 28]

[ Top ]
mixed   $page_sortdirection [line 35]
API Tags:
Access:  protected


[ Top ]
mixed   $page_sortorder [line 34]
API Tags:
Access:  protected


[ Top ]
mixed   $sortdirection = true [line 31]
API Tags:
Access:  protected


[ Top ]
mixed   $sortorder = 'date' [line 30]
API Tags:
Access:  protected


[ Top ]
mixed   $sortSticky = true [line 32]
API Tags:
Access:  protected


[ Top ]
Methods
static method expiry  [line 48]

  static void expiry( )



[ Top ]
static method getOffset  [line 417]

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

  Zenpage __construct( )

Class instantiator



[ Top ]
getAllArticleDates  [line 458]

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

  array getAllCategories( [bool $visible = true], [string $sorttype = NULL], [bool $sortdirection = NULL]  )

Gets all categories

Parameters:
bool   $visible:  TRUE for published and unprotected
string   $sorttype:  NULL for the standard order as sorted on the backend, "title", "id", "popular", "random"
bool   $sortdirection:  TRUE for ascending or FALSE for descending order


[ Top ]
getArticle  [line 400]

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

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

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


[ Top ]
getArticles  [line 205]

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

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, "published-unpublished" for published articles only from an unpublished category, "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" (default), "title", "id, "popular", "mostrated", "toprated", "random" This parameter is not used for date archives
bool   $sortdirection:  TRUE for ascending, FALSE for descending. Note: This parameter is not used for date archives
bool   $sticky:  set to true to place "sticky" articles at the front of the list.
   $category: 


[ Top ]
getCategory  [line 827]

  array getCategory( int $id  )

Gets a category titlelink by id

Parameters:
int   $id:  id of the category


[ Top ]
getCategoryLink  [line 812]

  string getCategoryLink( string $catname  )

Gets the category link of a category

Parameters:
string   $catname:  the title of the category

API Tags:
Deprecated:  since version 1.4.6


[ Top ]
getCombiNews  [line 551]

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

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.
string   $direction:  "desc" or "asc"
   $sortdirection: 

API Tags:
Deprecated:  since version 1.4.6
Access:  protected


[ Top ]
getNewsArchivePath  [line 785]

  string getNewsArchivePath( $date, [ $page = NULL]  )

Returns partial path of news date archive

Parameters:
   $date: 
   $page: 

API Tags:
Deprecated:  since version 1.4.6


[ Top ]
getNewsCategoryPath  [line 768]

  string getNewsCategoryPath( $category, [ $page = NULL]  )

Returns partial path of news category

Parameters:
   $category: 
   $page: 

API Tags:
Deprecated:  since version 1.4.6


[ Top ]
getNewsIndexURL  [line 757]

  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 ]
getNewsTitlePath  [line 796]

  string getNewsTitlePath( $title  )

Returns partial path of news article title

Parameters:
   $title: 

API Tags:
Deprecated:  since version 1.4.6


[ Top ]
getPages  [line 98]

  array getPages( [bool $published = NULL], [bool $toplevel = false], [int $number = NULL], [string $sorttype = NULL], [string $sortdirection = NULL]  )

Gets 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
int   $number:  number of pages to get (NULL by default for all)
string   $sorttype:  NULL for the standard order as sorted on the backend, "title", "date", "id", "popular", "mostrated", "toprated", "random"
string   $sortdirection:  false for ascenting, true for descending


[ Top ]
getSortDirection  [line 895]

  void getSortDirection( [ $what = 'news']  )

Parameters:
   $what: 


[ Top ]
getSortSticky  [line 927]

  void getSortSticky( )



[ Top ]
getSortType  [line 911]

  void getSortType( [ $what = 'news']  )

Parameters:
   $what: 


[ Top ]
getTotalArticles  [line 437]

  void getTotalArticles( )

Returns the articles count


API Tags:
Deprecated:  since version 1.4.6


[ Top ]
setSortDirection  [line 903]

  void setSortDirection( $value, [ $what = 'news']  )

Parameters:
   $value: 
   $what: 


[ Top ]
setSortSticky  [line 931]

  void setSortSticky( $value  )

Parameters:
   $value: 


[ Top ]
setSortType  [line 919]

  void setSortType( $value, [ $what = 'news']  )

Parameters:
   $value: 
   $what: 


[ Top ]
visibleCategory  [line 82]

  void visibleCategory( $cat  )

Parameters:
   $cat: 


[ Top ]
__toString  [line 891]

  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, 07 Jun 2014 18:03:51 +0200 by phpDocumentor 1.4.3