content
Packages
Interfaces
Classes
Files

Class: Comments

Source Location: /content/comments.class.php [line 40]

Class Overview


This class manages comments everywhere in phpboost Simplyfied use with the display_comments function: //news is the name of the modue, $idnews is the id in database for this item. display_comments('news', $idnews, url('news.php?id=' . $idnews . '&com=%s', 'news-0-' . $idnews . '.php?com=%s'))

Author(s):



Class Details

This class manages comments everywhere in phpboost Simplyfied use with the display_comments function: //news is the name of the modue, $idnews is the id in database for this item. display_comments('news', $idnews, url('news.php?id=' . $idnews . '&com=%s', 'news-0-' . $idnews . '.php?com=%s'))

Tags:

[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]


Class Methods

constructor Comments [line 51]

Comments Comments( string $script, string $idprov, string $vars, [string $module_folder = ''], [string $is_kernel_script = false])
Display comments form.

Parameters:

string   $script   Module's name
string   $idprov   Id field in the database. related to item where the comments are posted.
string   $vars   Link for the module, it has to include com=%s in the link for the comments system.
string   $module_folder   Module's folder
string   $is_kernel_script  
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method add [line 65]

int add( string $contents, string $login)
Add a comment

Tags:

  • return: the inserted identifier.

Parameters:

string   $contents   Comment content
string   $login   Poster's login
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method del [line 93]

int del( )
Delete a comment

Tags:

  • return: the previous comment identifier.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method delete_all [line 118]

void delete_all( int $idprov)
Delete all comments for the specified item.

Parameters:

int   $idprov   The id field of the item in the database.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method display [line 182]

string display( [int $integrated_in_environment = INTEGRATED_IN_ENVIRONMENT], [Template $Template = false], [string $page_path_to_root = ''])
Display comments form.

Tags:

  • return: The parsed template

Parameters:

int   $integrated_in_environment  
Template   $Template   Optional template.
string   $page_path_to_root  
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_attribute [line 170]

void get_attribute( $varname)

Parameters:

   $varname  
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method is_loaded [line 140]

boolean is_loaded( )
Check if the comments system is correctly loaded.

Tags:

  • return: true if loaded correctly, false otherwise.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method lock [line 129]

void lock( boolean $lock)
Lock or unlock comments for an item.

Parameters:

boolean   $lock   true for locking, false otherwise
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_arg [line 155]

void set_arg( int $idcom, [string $path = ''])
Set argument for the comments system.

Parameters:

int   $idcom  
string   $path  
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method update [line 83]

void update( string $contents, string $login)
Edit a comment

Parameters:

string   $contents   Comment content
string   $login   Poster's login
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

static method com_display_link [line 691]

static string com_display_link( int $nbr_com, string $path, int $idprov, string $script, [int $options = 0])

Parameters:

int   $nbr_com  
string   $path  
int   $idprov  
string   $script  
int   $options  
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]


Class Variables

[line 742]   mixed  $idcom  =  0
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 741]   mixed  $idprov  =  0
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 749]   mixed  $is_kernel_script  =  false
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 748]   mixed  $lock_com  =  0
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 745]   mixed  $module_folder  =  ''
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 747]   mixed  $nbr_com  =  0
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 743]   mixed  $path  =  ''
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 740]   mixed  $script  =  ''
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 746]   mixed  $sql_table  =  ''
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 744]   mixed  $vars  =  ''
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
Documentation generated on Tue, 28 Jul 2009 22:43:35 +0200 by phpDocumentor 1.4.1