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

Procedural File: lib-story.php

Source Location: /system/lib-story.php



Page Details:



Includes:

require_once($_CONF['path_system'].'/classes/story.class.php') [line 40]
require_once($_CONF['path_system'].'lib-user.php') [line 44]





STORY_ARCHIVE_ON_EXPIRE [line 52]

STORY_ARCHIVE_ON_EXPIRE = '10'

[ Top ]



STORY_DELETE_ON_EXPIRE [line 53]

STORY_DELETE_ON_EXPIRE = '11'

[ Top ]



STORY_MAX_ID_LENGTH [line 48]

STORY_MAX_ID_LENGTH = 128

[ Top ]




plugin_autotags_story [line 1465]

void plugin_autotags_story( string $op, [string $content = ''], [array $autotag = ''], mixed 3)

Implements the [story:] autotag.



Parameters

string   $op   operation to perform
string   $content   item (e.g. story text), including the autotag
array   $autotag   parameters used in the autotag
mixed   3   tag names (for $op='tagname') or formatted content
[ Top ]



plugin_configchange_article [line 1688]

void plugin_configchange_article( $group, [ $changes = array()])

Config Option has changed. (use plugin api)



Parameters

   $group  
   $changes  
[ Top ]



plugin_deletecomment_article [line 1583]

mixed plugin_deletecomment_article( int $cid, string $id)

article: delete a comment



Tags:

return:  false for failure, HTML string (redirect?) for success


Parameters

int   $cid   Comment to be deleted
string   $id   Item id to which $cid belongs
[ Top ]



plugin_displaycomment_article [line 1627]

mixed plugin_displaycomment_article( string $id, int $cid, string $title, string $order, string $format, int $page, boolean $view)

article: display [a] comment[s]



Tags:

return:  results of calling the plugin_displaycomment_ function


Parameters

string   $id   Unique idenifier for item comment belongs to
int   $cid   Comment id to display (possibly including sub-comments)
string   $title   Page/comment title
string   $order   'ASC' or 'DESC' or blank
string   $format   'threaded', 'nested', or 'flat'
int   $page   Page number of comments to display
boolean   $view   True to view comment (by cid), false to display (by $pid)
[ Top ]



plugin_getfeednames_article [line 1661]

array plugin_getfeednames_article( )

Do we support article feeds? (use plugin api)



Tags:

return:  id/name pairs of all supported feeds


[ Top ]



plugin_getiteminfo_story [line 1083]

mixed plugin_getiteminfo_story( string $sid, string $what, [int $uid = 0], [array $options = array()])

Return information for a story This is the story equivalent of PLG_getItemInfo. See lib-plugins.php for details.



Tags:

return:  string or array of strings with the information


Parameters

string   $sid   story ID or '*'
string   $what   comma-separated list of story properties
int   $uid   user ID or 0 = current user
array   $options   (reserved for future extensions)
[ Top ]



plugin_getrelateditems_story [line 968]

array plugin_getrelateditems_story( array $tids, int $max, int $trim)

Return list of articles for the Related Items block



Tags:

return:  array of links to related articles with unix timestamp as key


Parameters

array   $tids   list of topic ids
int   $max   maximum number of items to return
int   $trim   max length of text
[ Top ]



plugin_getwhatsnewcomment_story [line 1023]

array plugin_getwhatsnewcomment_story( [string $numreturn = 0], [string $uid = 0])

Return new Story comments for the What's New block



Tags:

return:  list of new comments (dups, type, title, sid, lastdate) or (sid, title, cid, unixdate)


Parameters

string   $numreturn   If 0 will return results for What's New Block. If > 0 will return last X new comments for User Profile.
string   $uid   ID of the user to return results for. 0 = all users.
[ Top ]



plugin_group_changed_story [line 1431]

void plugin_group_changed_story( int $grp_id, string $mode)

This function is called to inform plugins when a group's information has changed or a new group has been created.



Parameters

int   $grp_id   Group ID
string   $mode   type of change: 'new', 'edit', or 'delete'
[ Top ]



plugin_ismoderator_story [line 1312]

boolean plugin_ismoderator_story( )

Checks that the current user has the rights to moderate stories.

Returns true if this is the case, false otherwise




Tags:

return:  Returns true if moderator


[ Top ]



plugin_itemlist_story [line 1322]

mixed plugin_itemlist_story( )

Returns SQL & Language texts to moderation.php



Tags:

return:  Plugin object or void if not allowed


[ Top ]



plugin_itemlist_story_draft [line 1385]

mixed plugin_itemlist_story_draft( )

Returns SQL & Language texts to moderation.php



Tags:

return:  Plugin object or void if not allowed


[ Top ]



plugin_moderationapprove_story_draft [line 1409]

void plugin_moderationapprove_story_draft( string $sid)

"Approve" a draft story



Parameters

string   $sid   story id
[ Top ]



plugin_moderationdelete_story [line 1296]

string plugin_moderationdelete_story( string $sid)

Performs story exclusive work for items deleted by moderation While moderation.php handles the actual removal from the submission table, within this function we handle all other deletion related tasks



Tags:

return:  Any wanted HTML output


Parameters

string   $sid   Identifying string, i.e. the story id
[ Top ]



plugin_moderationdelete_story_draft [line 1371]

string plugin_moderationdelete_story_draft( string $sid)

Performs draft story exclusive work for items deleted by moderation While moderation.php handles the actual removal from the submission table, within this function we handle all other deletion related tasks



Tags:

return:  Any wanted HTML output


Parameters

string   $sid   Identifying string, i.e. the story id
[ Top ]



plugin_moderationvalues_story [line 1276]

array plugin_moderationvalues_story( )

Returns list of moderation values The array returned contains (in order): the row 'id' label, main table, moderation fields (comma separated), and submission table



Tags:

return:  Returns array of useful moderation values


[ Top ]



plugin_moderationvalues_story_draft [line 1351]

array plugin_moderationvalues_story_draft( )

Returns list of moderation values The array returned contains (in order): the row 'id' label, main table, moderation fields (comma separated), and submission table



Tags:

return:  Returns array of useful moderation values


[ Top ]



plugin_savecomment_article [line 1533]

mixed plugin_savecomment_article( string $title, string $comment, string $id, int $pid, string $postmode)

article: saves a comment



Tags:

return:  false for failure, HTML string (redirect?) for success


Parameters

string   $title   comment title
string   $comment   comment text
string   $id   Item id to which $cid belongs
int   $pid   comment parent
string   $postmode   'html' or 'text'
[ Top ]



plugin_wsEnabled_story [line 1264]

boolean plugin_wsEnabled_story( )

Return true since this component supports webservices



Tags:

return:  True, if webservices are supported


[ Top ]



service_delete_story [line 2174]

int service_delete_story( array $args, string &$output, &$svc_msg)

Delete an existing story



Tags:

return:  Response code as defined in lib-plugins.php


Parameters

array   $args   args Contains all the data provided by the client
string   &$output   &output OUTPUT parameter containing the returned text
   &$svc_msg  
[ Top ]



service_getTopicList_story [line 2417]

int service_getTopicList_story( array $args, string &$output, &$svc_msg)

Get all the topics available



Tags:

return:  Response code as defined in lib-plugins.php


Parameters

array   $args   args Contains all the data provided by the client
string   &$output   &output OUTPUT parameter containing the returned text
   &$svc_msg  
[ Top ]



service_get_story [line 2217]

int service_get_story( array $args, string &$output, &$svc_msg)

Get an existing story



Tags:

return:  Response code as defined in lib-plugins.php


Parameters

array   $args   args Contains all the data provided by the client
string   &$output   &output OUTPUT parameter containing the returned text
   &$svc_msg  
[ Top ]



service_submit_story [line 1745]

int service_submit_story( array $args, string &$output, &$svc_msg)

Submit a new or updated story. The story is updated if it exists, or a new one is created



Tags:

return:  Response code as defined in lib-plugins.php


Parameters

array   $args   args Contains all the data provided by the client
string   &$output   &output OUTPUT parameter containing the returned text
   &$svc_msg  
[ Top ]



STORY_deleteImage [line 837]

void STORY_deleteImage( string $image)

Delete one image from a story Deletes scaled and unscaled image, but does not update the database.



Parameters

string   $image   file name of the image (without the path)
[ Top ]



STORY_deleteImages [line 870]

void STORY_deleteImages( string $sid)

Delete all images from a story Deletes all scaled and unscaled images from the file system and the database.



Parameters

string   $sid   story id
[ Top ]



STORY_deleteStory [line 890]

string STORY_deleteStory( string $sid)

Delete a story.

This is used to delete a story from the list of stories.




Tags:

return:  HTML, e.g. a meta redirect


Parameters

string   $sid   ID of the story to delete
[ Top ]



STORY_doDeleteThisStoryNow [line 911]

void STORY_doDeleteThisStoryNow( string $sid)

Delete a story and related data immediately.

Note: For internal use only! To delete a story, use STORY_deleteStory (see above), which will do permission checks and eventually end up here.




Parameters

string   $sid   ID of the story to delete
[ Top ]



STORY_extractLinks [line 666]

array STORY_extractLinks( string $fulltext, [int $maxlength = 26])

Extract links from an HTML-formatted text.

Collects all the links in a story and returns them in an array.




Tags:

return:  an array of strings of form <a href="...">link</a>


Parameters

string   $fulltext   the text to search for links
int   $maxlength   max. length of text in a link (can be 0)
[ Top ]



STORY_renderArticle [line 68]

string STORY_renderArticle( Story $story, [string $index = ''], [string $storyTpl = 'storytext.thtml'], [string $query = ''])

Takes an article class and renders HTML in the specified template and style.

Formats the given article into HTML. Called by index.php, article.php, submit.php and admin/story.php (Preview mode for the last two).




Tags:

return:  Article as formatted HTML. Note: Formerly named COM_Article, and re-written totally since then.


Parameters

Story   $story   The story to display, an instance of the Story class.
string   $index   n = Full display of article. p = 'Preview' mode. Else introtext only.
string   $storyTpl   The template to use to render the story.
string   $query   A search query, if one was specified.
[ Top ]



STORY_updateLastArticlePublished [line 941]

void STORY_updateLastArticlePublished( )

Updates last_article_publish variables stored in vars table.

Note: Used when insert/update/delete an article. last_article_publish is used to determine new articles and if feeds need to be updated.




[ Top ]



STORY_whatsRelated [line 703]

string STORY_whatsRelated( string $related, int $uid, int $sid)

Create "What's Related" links for a story Creates an HTML-formatted list of links to be used for the What's Related block next to a story (in article view).



Tags:

return:  HTML-formatted list of links


Parameters

string   $related   contents of gl_stories 'related' field
int   $uid   user id of the author
int   $sid   story id
[ Top ]



Documentation generated on Sun, 02 Oct 2016 07:51:39 +0000 by phpDocumentor 1.4.3