BLOG Class Reference

List of all members.

Public Member Functions

 BLOG ($id)
 readLog ($template, $amountEntries, $offset=0, $startpos=0)
 showArchive ($templatename, $year, $month, $day=0)
 setSelectedCategory ($catid)
 setSelectedCategoryByName ($catname)
 getSelectedCategory ()
 readLogAmount ($template, $amountEntries, $extraQuery, $highlight, $comments, $dateheads, $offset=0, $startpos=0)
 showUsingQuery ($templateName, $query, $highlight= '', $comments=0, $dateheads=1)
 showOneitem ($itemid, $template, $highlight)
 additem ($catid, $title, $body, $more, $blogid, $authorid, $timestamp, $closed, $draft, $posted='1')
 sendNewItemNotification ($itemid, $title, $body)
 createNewCategory ($catName= '', $catDescription= 'New category')
 search ($query, $template, $amountMonths, $maxresults, $startpos)
 getSqlSearch ($query, $amountMonths=0, &$highlight, $mode= '')
 getSqlBlog ($extraQuery, $mode= '')
 showArchiveList ($template, $mode= 'month', $limit=0)
 showCategoryList ($template)
 showBlogList ($template, $bnametype)
 readSettings ()
 writeSettings ()
 updateUpdatefile ()
 isValidCategory ($catid)
 getCategoryName ($catid)
 getCategoryDesc ($catid)
 getCategoryIdFromName ($name)
 sendPing ()
 setPingUserland ($val)
 convertBreaks ()
 insertJavaScriptInfo ($authorid= '')
 setConvertBreaks ($val)
 setAllowPastPosting ($val)
 allowPastPosting ()
 getCorrectTime ($t=0)
 getName ()
 getShortName ()
 getMaxComments ()
 getNotifyAddress ()
 getNotifyType ()
 notifyOnComment ()
 notifyOnVote ()
 notifyOnNewItem ()
 setNotifyType ($val)
 getTimeOffset ()
 commentsEnabled ()
 getURL ()
 getDefaultSkin ()
 getUpdateFile ()
 getDescription ()
 isPublic ()
 emailRequired ()
 getSearchable ()
 getDefaultCategory ()
 setPublic ($val)
 setSearchable ($val)
 setDescription ($val)
 setUpdateFile ($val)
 setDefaultSkin ($val)
 setURL ($val)
 setName ($val)
 setShortName ($val)
 setCommentsEnabled ($val)
 setMaxComments ($val)
 setNotifyAddress ($val)
 setEmailRequired ($val)
 setTimeOffset ($val)
 setDefaultCategory ($val)
 getSetting ($key)
 setSetting ($key, $value)
 addTeamMember ($memberid, $admin)
 getID ()
 exists ($name)
 existsID ($id)
 setFuturePost ()
 clearFuturePost ()
 checkJustPosted ()

Public Attributes

 $blogid
 $selectedcatid
 $isValid
 $settings


Detailed Description

Definition at line 26 of file BLOG.php.


Member Function Documentation

BLOG::BLOG ( $  id  ) 

Creates a new BLOG object for the given blog

Parameters:
$id blogid

Definition at line 46 of file BLOG.php.

References $catid, readSettings(), and setSelectedCategory().

BLOG::readLog ( $  template,
$  amountEntries,
$  offset = 0,
$  startpos = 0 
)

Shows the given amount of items for this blog

Parameters:
$template String representing the template _NAME_ (!)
$amountEntries amount of entries to show
$startpos offset from where items should be shown (e.g. 5 = start at fifth item)
Returns:
int amount of items shown

Definition at line 68 of file BLOG.php.

References $startpos, and readLogAmount().

BLOG::showArchive ( $  templatename,
$  year,
$  month,
$  day = 0 
)

Shows an archive for a given month

Parameters:
$year year
$month month
$template String representing the template name to be used

Definition at line 82 of file BLOG.php.

References mysqldate(), and readLogAmount().

BLOG::setSelectedCategory ( $  catid  ) 

Definition at line 102 of file BLOG.php.

References $catid, and isValidCategory().

Referenced by BLOG(), and setSelectedCategoryByName().

BLOG::setSelectedCategoryByName ( $  catname  ) 

Definition at line 107 of file BLOG.php.

References getCategoryIdFromName(), and setSelectedCategory().

BLOG::getSelectedCategory (  ) 

Definition at line 111 of file BLOG.php.

Referenced by getSqlBlog().

BLOG::readLogAmount ( $  template,
$  amountEntries,
$  extraQuery,
$  highlight,
$  comments,
$  dateheads,
$  offset = 0,
$  startpos = 0 
)

Shows the given amount of items for this blog

Parameters:
$template String representing the template _NAME_ (!)
$amountEntries amount of entries to show (0 = no limit)
$extraQuery extra conditions to be added to the query
$highlight contains a query that should be highlighted
$comments 1=show comments 0=don't show comments
$dateheads 1=show dateheads 0=don't show dateheads
$offset offset
Returns:
int amount of items shown

Definition at line 135 of file BLOG.php.

References $highlight, $query, $startpos, getSqlBlog(), and showUsingQuery().

Referenced by readLog(), search(), showArchive(), and showOneitem().

BLOG::showUsingQuery ( $  templateName,
$  query,
$  highlight = '',
$  comments = 0,
$  dateheads = 1 
)

BLOG::showOneitem ( $  itemid,
$  template,
$  highlight 
)

Definition at line 228 of file BLOG.php.

References $highlight, $itemid, and readLogAmount().

BLOG::additem ( $  catid,
$  title,
$  body,
$  more,
$  blogid,
$  authorid,
$  timestamp,
$  closed,
$  draft,
$  posted = '1' 
)

BLOG::sendNewItemNotification ( $  itemid,
$  title,
$  body 
)

Definition at line 288 of file BLOG.php.

References $CONF, $itemid, $member, createItemLink(), getMailFooter(), getName(), getNotifyAddress(), getURL(), and toAscii().

Referenced by additem().

BLOG::createNewCategory ( $  catName = '',
$  catDescription = 'New category' 
)

Creates a new category for this blog

Parameters:
$catName name of the new category. When empty, a name is generated automatically (starting with newcat)
$catDescription description of the new category. Defaults to 'New Category'
Returns:
the new category-id in case of success. 0 on failure

Definition at line 336 of file BLOG.php.

References $catid, $manager, $member, $query, getID(), mysql_insert_id(), mysql_num_rows(), sql_query(), and sql_table().

BLOG::search ( $  query,
$  template,
$  amountMonths,
$  maxresults,
$  startpos 
)

Searches all months of this blog for the given query

Parameters:
$query search query
$template template to be used (__NAME__ of the template)
$amountMonths max amount of months to be search (0 = all)
$maxresults max number of results to show
$startpos offset
Returns:
amount of hits found

Definition at line 403 of file BLOG.php.

References $CONF, $highlight, $manager, $maxresults, $query, $startpos, TEMPLATE::fill(), getID(), getSqlSearch(), readLogAmount(), and showUsingQuery().

BLOG::getSqlSearch ( $  query,
$  amountMonths = 0,
&$  highlight,
$  mode = '' 
)

Returns an SQL query to use for a search query

Parameters:
$query search query
$amountMonths amount of months to search back. Default = 0 = unlimited
$mode either empty, or 'count'. In this case, the query will be a SELECT COUNT(*) query
Returns:
$highlight words to highlight (out parameter)

either a full SQL query, or an empty string (if querystring empty)

Note:
No LIMIT clause is added. (caller should add this if multiple pages are requested)

Definition at line 454 of file BLOG.php.

References $highlight, $query, getCorrectTime(), getID(), mysqldate(), and sql_table().

Referenced by search().

BLOG::getSqlBlog ( $  extraQuery,
$  mode = '' 
)

Returns the SQL query that's normally used to display the blog items on the index type skins

Parameters:
$mode either empty, or 'count'. In this case, the query will be a SELECT COUNT(*) query
Returns:
either a full SQL query, or an empty string
Note:
No LIMIT clause is added. (caller should add this if multiple pages are requested)

Definition at line 523 of file BLOG.php.

References $query, getCorrectTime(), getSelectedCategory(), mysqldate(), and sql_table().

Referenced by readLogAmount().

BLOG::showArchiveList ( $  template,
$  mode = 'month',
$  limit = 0 
)

Shows the archivelist using the given template

Definition at line 553 of file BLOG.php.

References $archive, $catid, $CONF, $manager, $query, createArchiveLink(), TEMPLATE::fill(), getCorrectTime(), getID(), mysql_fetch_object(), mysql_free_result(), mysqldate(), and sql_query().

BLOG::showCategoryList ( $  template  ) 

BLOG::showBlogList ( $  template,
$  bnametype 
)

Shows a list of all blogs in the system using a given template

Definition at line 679 of file BLOG.php.

References $CONF, $manager, $query, createBlogidLink(), TEMPLATE::fill(), mysql_fetch_assoc(), mysql_free_result(), and sql_query().

Referenced by ACTIONS::parse_bloglist().

BLOG::readSettings (  ) 

Blogsettings functions

Definition at line 727 of file BLOG.php.

References $query, mysql_fetch_assoc(), mysql_num_rows(), and sql_query().

Referenced by BLOG().

BLOG::writeSettings (  ) 

BLOG::updateUpdatefile (  ) 

Definition at line 774 of file BLOG.php.

References getCorrectTime(), and getUpdateFile().

BLOG::isValidCategory ( $  catid  ) 

Definition at line 783 of file BLOG.php.

References $catid, $query, getID(), mysql_num_rows(), and sql_query().

Referenced by additem(), and setSelectedCategory().

BLOG::getCategoryName ( $  catid  ) 

Definition at line 789 of file BLOG.php.

References $catid, getID(), mysql_fetch_object(), sql_query(), and sql_table().

BLOG::getCategoryDesc ( $  catid  ) 

Definition at line 795 of file BLOG.php.

References $catid, getID(), mysql_fetch_object(), sql_query(), and sql_table().

BLOG::getCategoryIdFromName ( $  name  ) 

BLOG::sendPing (  ) 

Definition at line 811 of file BLOG.php.

References getSetting().

Referenced by writeSettings().

BLOG::setPingUserland ( $  val  ) 

Definition at line 815 of file BLOG.php.

References setSetting().

BLOG::convertBreaks (  ) 

Definition at line 819 of file BLOG.php.

References getSetting().

Referenced by additem(), insertJavaScriptInfo(), and writeSettings().

BLOG::insertJavaScriptInfo ( $  authorid = ''  ) 

Definition at line 823 of file BLOG.php.

References $CONF, $member, convertBreaks(), and setConvertBreaks().

BLOG::setConvertBreaks ( $  val  ) 

Definition at line 836 of file BLOG.php.

References setSetting().

Referenced by insertJavaScriptInfo().

BLOG::setAllowPastPosting ( $  val  ) 

Definition at line 839 of file BLOG.php.

References setSetting().

BLOG::allowPastPosting (  ) 

Definition at line 842 of file BLOG.php.

References getSetting().

Referenced by writeSettings().

BLOG::getCorrectTime ( $  t = 0  ) 

BLOG::getName (  ) 

Definition at line 851 of file BLOG.php.

References getSetting().

Referenced by addTeamMember(), sendNewItemNotification(), and writeSettings().

BLOG::getShortName (  ) 

Definition at line 855 of file BLOG.php.

References getSetting().

Referenced by writeSettings().

BLOG::getMaxComments (  ) 

Definition at line 859 of file BLOG.php.

References getSetting().

Referenced by writeSettings().

BLOG::getNotifyAddress (  ) 

Definition at line 863 of file BLOG.php.

References getSetting().

Referenced by additem(), sendNewItemNotification(), and writeSettings().

BLOG::getNotifyType (  ) 

Definition at line 867 of file BLOG.php.

References getSetting().

Referenced by notifyOnComment(), notifyOnNewItem(), notifyOnVote(), and writeSettings().

BLOG::notifyOnComment (  ) 

Definition at line 871 of file BLOG.php.

References getNotifyType().

BLOG::notifyOnVote (  ) 

Definition at line 876 of file BLOG.php.

References getNotifyType().

BLOG::notifyOnNewItem (  ) 

Definition at line 881 of file BLOG.php.

References getNotifyType().

Referenced by additem().

BLOG::setNotifyType ( $  val  ) 

Definition at line 886 of file BLOG.php.

References setSetting().

BLOG::getTimeOffset (  ) 

Definition at line 891 of file BLOG.php.

References getSetting().

Referenced by getCorrectTime(), and writeSettings().

BLOG::commentsEnabled (  ) 

Definition at line 895 of file BLOG.php.

References getSetting().

Referenced by writeSettings().

BLOG::getURL (  ) 

Definition at line 899 of file BLOG.php.

References getSetting().

Referenced by sendNewItemNotification(), and writeSettings().

BLOG::getDefaultSkin (  ) 

Definition at line 903 of file BLOG.php.

References getSetting().

Referenced by writeSettings().

BLOG::getUpdateFile (  ) 

Definition at line 907 of file BLOG.php.

References getSetting().

Referenced by updateUpdatefile(), and writeSettings().

BLOG::getDescription (  ) 

Definition at line 911 of file BLOG.php.

References getSetting().

Referenced by writeSettings().

BLOG::isPublic (  ) 

Definition at line 915 of file BLOG.php.

References getSetting().

Referenced by writeSettings().

BLOG::emailRequired (  ) 

Definition at line 919 of file BLOG.php.

References getSetting().

Referenced by writeSettings().

BLOG::getSearchable (  ) 

Definition at line 923 of file BLOG.php.

References getSetting().

Referenced by writeSettings().

BLOG::getDefaultCategory (  ) 

Definition at line 927 of file BLOG.php.

References getSetting().

Referenced by additem(), getCategoryIdFromName(), and writeSettings().

BLOG::setPublic ( $  val  ) 

Definition at line 931 of file BLOG.php.

References setSetting().

BLOG::setSearchable ( $  val  ) 

Definition at line 935 of file BLOG.php.

References setSetting().

BLOG::setDescription ( $  val  ) 

Definition at line 939 of file BLOG.php.

References setSetting().

BLOG::setUpdateFile ( $  val  ) 

Definition at line 943 of file BLOG.php.

References setSetting().

BLOG::setDefaultSkin ( $  val  ) 

Definition at line 947 of file BLOG.php.

References setSetting().

BLOG::setURL ( $  val  ) 

Definition at line 951 of file BLOG.php.

References setSetting().

BLOG::setName ( $  val  ) 

Definition at line 955 of file BLOG.php.

References setSetting().

BLOG::setShortName ( $  val  ) 

Definition at line 959 of file BLOG.php.

References setSetting().

BLOG::setCommentsEnabled ( $  val  ) 

Definition at line 963 of file BLOG.php.

References setSetting().

BLOG::setMaxComments ( $  val  ) 

Definition at line 967 of file BLOG.php.

References setSetting().

BLOG::setNotifyAddress ( $  val  ) 

Definition at line 971 of file BLOG.php.

References setSetting().

BLOG::setEmailRequired ( $  val  ) 

Definition at line 975 of file BLOG.php.

References setSetting().

BLOG::setTimeOffset ( $  val  ) 

Definition at line 979 of file BLOG.php.

References setSetting().

BLOG::setDefaultCategory ( $  val  ) 

Definition at line 993 of file BLOG.php.

References setSetting().

BLOG::getSetting ( $  key  ) 

BLOG::setSetting ( $  key,
$  value 
)

BLOG::addTeamMember ( $  memberid,
$  admin 
)

BLOG::getID (  ) 

BLOG::exists ( $  name  ) 

Definition at line 1055 of file BLOG.php.

References mysql_num_rows(), sql_query(), and sql_table().

Referenced by MANAGER::existsBlog().

BLOG::existsID ( $  id  ) 

BLOG::setFuturePost (  ) 

Definition at line 1067 of file BLOG.php.

References $query, getID(), and sql_query().

BLOG::clearFuturePost (  ) 

Definition at line 1074 of file BLOG.php.

References $query, getID(), and sql_query().

Referenced by checkJustPosted().

BLOG::checkJustPosted (  ) 

Definition at line 1081 of file BLOG.php.

References $blogid, $manager, clearFuturePost(), getID(), mysql_num_rows(), sql_query(), and sql_table().


Member Data Documentation

BLOG::$blogid

Definition at line 29 of file BLOG.php.

Referenced by additem(), and checkJustPosted().

BLOG::$selectedcatid

Definition at line 32 of file BLOG.php.

BLOG::$isValid

Definition at line 36 of file BLOG.php.

BLOG::$settings

Definition at line 39 of file BLOG.php.


The documentation for this class was generated from the following file:



Generated on Wed Jun 25 17:26:02 2008 by  doxygen 1.5.5