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'].'lib-user.php') [line 44]
require_once($_CONF['path_system'].'/classes/story.class.php') [line 40]





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

[ Top ]




plugin_autotags_story [line 1136]

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_getiteminfo_story [line 797]

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_getwhatsnewcomment_story [line 748]

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_ismoderator_story [line 1009]

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

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

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

void plugin_moderationapprove_story_draft( string $sid)

"Approve" a draft story



Parameters

string   $sid   story id
[ Top ]



plugin_moderationdelete_story [line 993]

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

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

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

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_wsEnabled_story [line 957]

boolean plugin_wsEnabled_story( )

Return true since this component supports webservices



Tags:

return:  True, if webservices are supported


[ Top ]



service_delete_story [line 1615]

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

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

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

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

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

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

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

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

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

string STORY_renderArticle( &$story, [string $index = ''], [string $storytpl = 'storytext.thtml'], [string $query = ''], object $story)

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 formated HTML.

Note: Formerly named COM_Article, and re-written totally since then.



Parameters

object   $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.
   &$story  
[ Top ]



STORY_whatsRelated [line 586]

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

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   $tid   topic id
[ Top ]



Documentation generated on Sat, 11 Feb 2012 02:08:28 -0500 by phpDocumentor 1.4.3