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

Class: ZenpageNews

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

Class ZenpageNews

Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From ZenpageRoot

ZenpageRoot::$sortdirection
ZenpageRoot::$sortorder
ZenpageRoot::$sortSticky

Inherited From ThemeObject

ThemeObject::$comments

Inherited From PersistentObject

PersistentObject::$exists
PersistentObject::$id
PersistentObject::$loaded
PersistentObject::$table
PersistentObject::$transient

Inherited From ZenpageItems

ZenpageItems::__construct()
Class instantiator
ZenpageItems::getAuthor()
Returns the author
ZenpageItems::getContent()
Returns the content
ZenpageItems::getExpireDate()
Returns the expire date
ZenpageItems::getExtraContent()
Returns the extra content
ZenpageItems::getLastchange()
Returns the last change date
ZenpageItems::getLastchangeAuthor()
Returns the last change author
ZenpageItems::getLocked()
Returns the locked status , "1" if locked (only used on the admin)
ZenpageItems::setAuthor()
sets the author attribute
ZenpageItems::setContent()
Set the content datum
ZenpageItems::setExpireDate()
sets the expire date
ZenpageItems::setExtraContent()
sets the extra content
ZenpageItems::setLastchange()
sets the last change date
ZenpageItems::setLastchangeAuthor()
stores the last change author
ZenpageItems::setLocked()
sets the locked status , "1" if locked (only used on the admin)

Inherited From ZenpageRoot

ZenpageRoot::getPermalink()
Returns the perma link status (only used on admin)
ZenpageRoot::getTitlelink()
Returns the titlelink
ZenpageRoot::setPermalink()
ZenpageRoot::setTitlelink()
sets the title link

Inherited From ThemeObject

ThemeObject::__construct()
Class instantiator
ThemeObject::addComment()
Adds comments to the album assumes data is coming straight from GET or POST
ThemeObject::checkAccess()
Checks if viewing of object is allowed
ThemeObject::checkForGuest()
returns false (deny) if gallery is "private"
ThemeObject::countHit()
counts visits to the object
ThemeObject::getCodeblock()
Returns the codeblocks as an serialized array
ThemeObject::getCommentCount()
Returns the count of comments in the album. Ignores comments in moderation
ThemeObject::getComments()
Returns an array of comments for this album
ThemeObject::getCommentsAllowed()
Retuns true if comments are allowed
ThemeObject::getCustomData()
returns the custom data field
ThemeObject::getDateTime()
Returns the unformatted date
ThemeObject::getHitcounter()
Returns the hitcount
ThemeObject::getParentID()
Returns the partent id
ThemeObject::getShow()
Returns true published
ThemeObject::getTags()
Returns the tag data
ThemeObject::getTitle()
Returns the title
ThemeObject::hasTag()
Checks if an object has a tag assigned.
ThemeObject::isMyItem()
Checks basic access rights of an object
ThemeObject::setCodeblock()
set the codeblocks as an serialized array
ThemeObject::setCommentsAllowed()
Sets the comments allowed flag
ThemeObject::setCustomData()
Sets the custom data field
ThemeObject::setDateTime()
Stores the date
ThemeObject::setParentID()
Sets the ParentID field
ThemeObject::setShow()
Stores the published value
ThemeObject::setTags()
Stores tag information
ThemeObject::setTitle()
Stores the title

Inherited From PersistentObject

PersistentObject::PersistentObject()
PersistentObject::copy()
Copy this record to another unique set. Checks if the record exists there first, if so returns false. If successful returns true. No changes are made to this object and no other objects are created, just the database entry.
PersistentObject::get()
Get the value of a variable. If $current is false, return the value as of the last save of this object.
PersistentObject::getData()
returns the database record of the object
PersistentObject::getID()
Returns the id
PersistentObject::instantiate()
Prime instantiator for Zenphoto objects
PersistentObject::move()
Change one or more values of the unique set assigned to this record.
PersistentObject::remove()
Deletes object from the database
PersistentObject::save()
Save the updates made to this object since the last update. Returns true if successful, false if not.
PersistentObject::set()
Set a variable in this object. Does not persist to the database until save() is called. So, IMPORTANT: Call save() after set() to persist.
PersistentObject::setDefaults()
Sets default values for new objects using the set() method.
PersistentObject::__toString()
"Magic" function to return a string identifying the object when it is treated as a string

[ Top ]
Property Summary
mixed   $categories  
mixed   $index  
mixed   $manage_rights  
mixed   $manage_some_rights  
mixed   $view_rights  

[ Top ]
Method Summary
ZenpageNews   __construct()  
void   categoryIsVisible()   returns true if the article exists in any published category (or in no categories)
void   checkforGuest()   See if a guest is logged on to the news category.
void   copy()   duplicates an article
array   getCategories()   Gets the categories assigned to an news article
int   getIndex()   Get the index of this article
string   getLink()   Returns the url to a news article
string   getNewsURL()   Returns the url to a news article
object   getNextArticle()   Returns the next article.
object   getPrevArticle()   Return the previous article
bool   getSticky()   Returns true if the article is sticky
void   getTruncation()  
bool   inNewsCategory()   Checks if an article is in a category and returns TRUE or FALSE
array   inProtectedCategory()   Checks if an article is in a password protected category and returns TRUE or FALSE NOTE: This function does not check if the password has been entered! Use checkAccess() for that.
bool   inSubNewsCategoryOf()   Checks if an article is in a sub category of $catlink
void   isMyItem()   Checks if user is news author
void   isProtected()   returns true if the article resides only in protected categories
void   remove()   Deletes an news article from the database
void   setCategories()  
void   setSticky()  
void   setTruncation()  

[ Top ]
Properties
mixed   $categories = NULL [line 21]

[ Top ]
mixed   $index = NULL [line 22]

[ Top ]
mixed   $manage_rights = MANAGE_ALL_NEWS_RIGHTS [line 18]

Redefinition of:
ThemeObject::$manage_rights

[ Top ]
mixed   $manage_some_rights = ZENPAGE_NEWS_RIGHTS [line 19]

Redefinition of:
ThemeObject::$manage_some_rights

[ Top ]
mixed   $view_rights = ALL_NEWS_RIGHTS [line 20]

Redefinition of:
ThemeObject::$view_rights

[ Top ]
Methods
Constructor __construct  [line 24]

  ZenpageNews __construct( $titlelink, [ $allowCreate = NULL]  )

Parameters:
   $titlelink: 
   $allowCreate: 


Redefinition of:
ZenpageItems::__construct()
Class instantiator

[ Top ]
categoryIsVisible  [line 165]

  void categoryIsVisible( )

returns true if the article exists in any published category (or in no categories)



[ Top ]
checkforGuest  [line 187]

  void checkforGuest( [$hint &$hint = NULL], [$show &$show = NULL]  )

See if a guest is logged on to the news category.

Note: If any belonging category is plublic or he is logged on, then success.

Parameters:
$hint   &$hint: 
$show   &$show: 


[ Top ]
copy  [line 83]

  void copy( string $newtitle  )

duplicates an article

Parameters:
string   $newtitle:  the title for the new article


Redefinition of:
PersistentObject::copy()
Copy this record to another unique set. Checks if the record exists there first, if so returns false. If successful returns true. No changes are made to this object and no other objects are created, just the database entry.

[ Top ]
getCategories  [line 38]

  array getCategories( int $article_id  )

Gets the categories assigned to an news article

Parameters:
int   $article_id:  ID od the article


[ Top ]
getIndex  [line 319]

  int getIndex( string $sortorder, bool $sortdirection, bool $sticky  )

Get the index of this article

Parameters:
string   $sortorder: 
bool   $sortdirection:  TRUE for ascending, FALSE for descending
bool   $sticky:  If sticky article should come first


[ Top ]
getLink  [line 295]

  string getLink( )

Returns the url to a news article



[ Top ]
getNewsURL  [line 306]

  string getNewsURL( )

Returns the url to a news article


API Tags:
Deprecated:  since version 1.4.6


[ Top ]
getNextArticle  [line 359]

  object getNextArticle( [string $sortorder = 'date'], [bool $sortdirection = false], [bool $sticky = true]  )

Returns the next article.

Parameters:
string   $sortorder: 
bool   $sortdirection:  TRUE for ascending, FALSE for descending
bool   $sticky:  If sticky article should come first


[ Top ]
getPrevArticle  [line 344]

  object getPrevArticle( [string $sortorder = 'date'], [bool $sortdirection = false], [bool $sticky = true]  )

Return the previous article

Parameters:
string   $sortorder: 
bool   $sortdirection:  TRUE for ascending, FALSE for descending
bool   $sticky:  If sticky article should come first


[ Top ]
getSticky  [line 63]

  bool getSticky( )

Returns true if the article is sticky



[ Top ]
getTruncation  [line 71]

  void getTruncation( )



[ Top ]
inNewsCategory  [line 246]

  bool inNewsCategory( string $catlink  )

Checks if an article is in a category and returns TRUE or FALSE

Parameters:
string   $catlink:  The titlelink of a category


[ Top ]
inProtectedCategory  [line 135]

  array inProtectedCategory( [bool $only = false]  )

Checks if an article is in a password protected category and returns TRUE or FALSE NOTE: This function does not check if the password has been entered! Use checkAccess() for that.

Parameters:
bool   $only:  set to true to know if the news article belongs only to protected categories (i.e. it is protected)


[ Top ]
inSubNewsCategoryOf  [line 268]

  bool inSubNewsCategoryOf( string $catlink  )

Checks if an article is in a sub category of $catlink

Parameters:
string   $catlink:  The titlelink of a category


[ Top ]
isMyItem  [line 212]

  void isMyItem( bit $action  )

Checks if user is news author

Parameters:
bit   $action: 

what the caller wants to do

returns true of access is allowed



Redefinition of:
ThemeObject::isMyItem()
Checks basic access rights of an object

[ Top ]
isProtected  [line 157]

  void isProtected( )

returns true if the article resides only in protected categories



[ Top ]
remove  [line 116]

  void remove( )

Deletes an news article from the database



Redefinition of:
PersistentObject::remove()
Deletes object from the database

[ Top ]
setCategories  [line 48]

  void setCategories( $categories  )

Parameters:
   $categories: 


[ Top ]
setSticky  [line 67]

  void setSticky( $v  )

Parameters:
   $v: 


[ Top ]
setTruncation  [line 75]

  void setTruncation( $v  )

Parameters:
   $v: 


[ Top ]

Documentation generated on Sat, 07 Jun 2014 18:03:50 +0200 by phpDocumentor 1.4.3