[ Index ]
 

Code source de GeekLog 1.4.1

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/system/ -> lib-story.php (sommaire)

(pas de description)

Poids: 981 lignes (42 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 9 fonctions

  STORY_renderArticle()
  STORY_extractLinks()
  STORY_whatsRelated()
  STORY_deleteImage()
  STORY_deleteImages()
  STORY_getItemInfo()
  STORY_replace_images()
  STORY_insert_images()
  STORY_deleteStory()

Fonctions
Fonctions qui ne font pas partie d'une Classe:

STORY_renderArticle( $A, $index='', $storytpl='storytext.thtml', $query='' )   X-Ref
Returns the array (created from db record) passed to it as formated HTML

Formats the given article data into HTML.  Called by index.php, article.php,
submit.php, and admin/story.php (when previewing)

param: array       $A      Data to display as an article (associative array from record from gl_stories)
param: string      $index  whether or not this is the index page if 'n' then compact display for index page else display full article, also: 'p' = preview
return: string      Article as formated HTML

STORY_extractLinks( $fulltext, $maxlength = 26 )   X-Ref
Extract links from an HTML-formatted text.

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

param: string  $fulltext   the text to search for links
param: int     $maxlength  max. length of text in a link (can be 0)
return: array   an array of strings of form <a href="...">link</a>

STORY_whatsRelated( $related, $uid, $tid )   X-Ref
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).

param: string      $related    contents of gl_stories 'related' field
param: int         $uid        user id of the author
param: int         $tid        topic id
return: string      HTML-formatted list of links

STORY_deleteImage($image)   X-Ref
Delete one image from a story

Deletes scaled and unscaled image, but does not update the database.

param: string  $image  file name of the image (without the path)

STORY_deleteImages($sid)   X-Ref
Delete all images from a story

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

param: string  $sid    story id

STORY_getItemInfo($sid, $what)   X-Ref
Return information for a story

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

param: string  $sid    story ID
param: string  $what   comma-separated list of story properties
return: mixed           string or array of strings with the information

STORY_replace_images($sid, $intro, $body)   X-Ref
This replaces all article image HTML in intro and body with
GL special syntax

param: string      $sid    ID for story to parse
param: string      $intro  Intro text
param: string      $body   Body text
return: string      processed text

STORY_insert_images($sid, $intro, $body, $usage='html')   X-Ref
Replaces simple image syntax with actual HTML in the intro and body.
If errors occur it will return all errors in $error

param: string      $sid    ID for story to parse
param: string      $intro  Intro text
param: string      $body   Body text
param: string      $usage  'html' for normal use, 'email' for email use
return: string      Processed text

STORY_deleteStory($sid)   X-Ref
Delete a story.

This is used to delete a story from the list of stories with the 'draft' flag
set (see function draftlist() above).




Généré le : Wed Nov 21 12:27:40 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics