Packageindex Classtrees Modulegroups Elementlist Report XML Files

File: /home/inri/public_html/daCode-HEAD/daCode/src/phplib/board.php3
daCode -

Board

Board

This class is to make a board like bbs ones

 

private class Board

This class is to make a board like bbs ones

daCode http://www.dacode.org/
src/phplib/board.php3
$Id: board.php3,v 1.93 2002/05/13 21:34:02 jbcombes Exp $

Depends: Config Db Utils Html

AuthorsFabien Penso <penso@linuxfr.org>

 

Public Method Summary

void

Board()

Class cosntructor
void

add(string $message, [ integer $section ])

This function add a new message to the board
string

print_info(integer $id)

This will print information about a message
mixed

print_message([ integer $nb, integer $section, integer $inputsize ])

Print a number of messages

Private Method Summary

string

print_raw([ integer $nb, integer $section ])

Print a number of messages to be used by external programs
void

gen_xml()

Generate the XML backend for the board
boolean

privateMessage(string $message, string $url)

privateMessage: parses input and checks if it begins with "/msg"
string

parseUrls(string $message)

parseUrl: parses input and changes urls to HTML links
string

parseUrlLogin(string $message)

parseUrlLogin: parses a special type of links

Private Field Summary

object Utils

$utils

Utils instance
object DB

$db

Db abstraction layer
object HTML

$html

HTML subclass instance
object Message

$message

Message instance
array

$HTTP_REFERER

HTTP_REFERER, to avoid using global vars

Public Method Details

Board

public void Board( )

  Class cosntructor
Loads Db, Session, Cache, Utils, HTML

Returns void


add

public void add( string $message, [ integer $section ] )

  This function add a new message to the board
Does not return
Calls header to redirect to HTTP_REFERER, the calls exit.

Parameter
string $message
message to add
integer $section = >>1<<
1 for normal people, 2 for moderators
Returns void

Required global variables
array $HTTP_SERVER_VARS environement variables hash.

print_info

public string print_info( integer $id )

  This will print information about a message
Calls exit on SQL error.

Parameter
integer $id
id of the message.
Returns string

infos or error message


print_message

public mixed print_message( [ integer $nb, integer $section, integer $inputsize ] )

  Print a number of messages
Calls echo on SQL failure

Parameter
integer $nb = >>10<<
of messages to print
integer $section = >>1<<
1 for normal people, 2 for moderator-only board
integer $inputsize = >>25<<
of messages to print
Returns mixed

string board sidebox or integer -1 on SQL failure


Private Method Details

print_raw

private string print_raw( [ integer $nb, integer $section ] )

  Print a number of messages to be used by external programs

Parameter
integer $nb = >>10<<
of messages to print
integer $section = >>1<<
1 for normal people, 2 for moderator-only board
Returns string

error message or XML-formatted list of messages


gen_xml

private void gen_xml( )

  Generate the XML backend for the board

Returns void


privateMessage

private boolean privateMessage( string $message, string $url )

  privateMessage: parses input and checks if it begins with "/msg"

Parameter
string $message
The posted message
string $url
The url where the user will be redirected
Returns boolean

true if message is private false if not


parseUrls

private string parseUrls( string $message )

  parseUrl: parses input and changes urls to HTML links

Parameter
string $message
string to be parsed
Returns string

parsed string to be printed


parseUrlLogin

private string parseUrlLogin( string $message )

  parseUrlLogin: parses a special type of links

Parameter
string $message
user name extracted by preg_replace
Returns string

the HTML url form


Private Field Details

$utils

private object Utils $utils

>><<

Utils instance


$db

private object DB $db

>><<

Db abstraction layer


$html

private object HTML $html

>><<

HTML subclass instance


$message

private object Message $message

>><<

Message instance


$HTTP_REFERER

private array $HTTP_REFERER

>><<

HTTP_REFERER, to avoid using global vars



Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta