Private Method Details |
show_news |
private string show_news( integer $id )
|
|
We print the news which is being moderated
|
Parameter |
|
integer |
$id |
|
|
ID of the news beeing moderated |
|
Returns |
string the formatted news. |
|
mod_news |
private void mod_news( array $row )
|
|
We do moderate the news
|
Parameter |
|
array |
$row |
|
|
can one describe the contents? |
|
Returns |
void |
|
show_users |
private string show_users( )
|
|
Function for sysadmin to show list of present users
|
Returns |
string |
|
show_edit_user |
private string show_edit_user( integer $id )
|
|
Function for sysadmin to show form to modify a user
|
Parameter |
|
integer |
$id |
|
|
ID of the user to edit |
|
Returns |
string the HTML form |
|
mod_user |
private mixed mod_user( array $row )
|
|
Function to modify user parameters by sysadmin
|
Parameter |
|
|
Returns |
mixed string error message if access denied, -1 if db error, void upon success. |
|
show_topics |
private string show_topics( )
|
|
Function to show topics for admin
|
Returns |
string |
|
show_edit_topic |
private mixed show_edit_topic( integer $id )
|
|
Show modify topic
|
Parameter |
|
|
Returns |
mixed string the HTML form, error msg if no access, int -1 if SQL error. |
|
do_edit_topic |
private mixed do_edit_topic( array $row )
|
|
Do edit topic
|
Parameter |
|
array |
$row |
|
|
row of topic table |
|
Returns |
mixed string error message if no access integer -1 if SQL failed, 1 if success |
|
show_add_topic |
private string show_add_topic( )
|
|
Show form to add topic
|
Returns |
string the form to add topic |
|
do_add_topic |
private mixed do_add_topic( array $row )
|
|
Do add topic
|
Parameter |
|
array |
$row |
|
|
row of the topics table |
|
Returns |
mixed string error message if no access, integer -1 if SQL failed, 1 if success. |
|
show_add_section |
private string show_add_section( )
|
|
Show form to add section
|
Returns |
string the form to add section |
|
do_add_section |
private mixed do_add_section( array $row )
|
|
Performs the SQL query to add a section
|
Parameter |
|
|
Returns |
mixed string error message if no access, integer -1 if SQL failed, 1 if success. |
|
show_sections |
private string show_sections( )
|
|
Creates the list of sections with links to edit them
|
Returns |
string the HTML |
|
show_edit_section |
private mixed show_edit_section( integer $id )
|
|
Creates the HTML form to edit a section
|
Parameter |
|
integer |
$id |
|
|
id of the section to edit |
|
Returns |
mixed string error message if access denied, integer -1 on failure, 1 on success |
|
do_edit_section |
private mixed do_edit_section( array $row )
|
|
Do edit section
|
Parameter |
|
array |
$row |
|
|
'section' => string, 'state' => integer, 'id' =>integer |
|
Returns |
mixed string error message if access denied, integer -1 on failure, 1 on success |
|
show_add_tip_section |
private string show_add_tip_section( )
|
|
Creates the form to add a new tip section0
|
Returns |
string the HTML form |
|
do_add_tip_section |
private mixed do_add_tip_section( array $row )
|
|
Performs SQL query to add a tip section
|
Parameter |
|
array |
$row |
|
|
('tip_section_id' => integer, 'tip_section' => string) |
|
Returns |
mixed string error message if access denied, integer -1 on failure, 1 on success |
|
clear_cache |
private mixed clear_cache( )
|
|
Clears the cache
|
Returns |
mixed void on success, error message if access denied |
|
comments_scored_user |
private void comments_scored_user( )
|
|
Only used for moderation type 2
Calls acho and exit on Db failure
For each comment the user has scored, sets the Admin::comments_score[comment_id] to 1.
Does not return any value
|
Returns |
void |
|
comments_showscore |
private string comments_showscore( integer $user_id_tmp, integer $comments_id_tmp, string $username_tmp, string $usermail_tmp, integer $userid_tmp, string $timestamp, [ mixed $user_xp, string $userhomesite_tmp ] )
|
|
Creates the necessary HTML for comment scoring
|
Parameter |
|
integer |
$user_id_tmp |
|
|
user ID unused ???? |
|
|
integer |
$comments_id_tmp |
|
|
ID of the comment to score |
|
|
string |
$username_tmp |
|
|
username |
|
|
string |
$usermail_tmp |
|
|
mail of the user |
|
|
integer |
$userid_tmp |
|
|
ID of the user |
|
|
string |
$timestamp |
|
|
??? unknow |
|
|
mixed |
$user_xp |
= >>""<< |
|
XP of the user (integer or default empty string) |
|
|
string |
$userhomesite_tmp |
= >>""<< |
|
homepage of the user |
|
Returns |
string the HTML to score comments |
Required global variables |
|
integer $news_id |
the news we are working on -- it's bad! |
|
|
list_uploaded_themes |
private mixed list_uploaded_themes( )
|
|
List uploaded theme tarballs
Returns void if disabled (upload_tar_dir parameter empty).
|
Returns |
mixed void if disabled, array list of tarball otherwise. |
|
show_themes |
private string show_themes( )
|
|
Shows the list of themes, with links to create an archive from them, or install uploaded tars
|
Returns |
string the HTML formated list of themes. |
|
create_theme_tar |
private string create_theme_tar( string $theme, [ string $version ] )
|
|
Create an archive out of an installed theme
Calls exit if user not admin
|
Parameter |
|
string |
$theme |
|
|
of the theme |
|
|
string |
$version |
= >>'0.1'<< |
|
version number of the theme |
|
Returns |
string status message |
|
extract_theme_tar |
private string extract_theme_tar( string $tarfile, integer $action, [ string $file ] )
|
|
Unpacks a theme tarball
Calls exit if user is not admin
|
Parameter |
|
string |
$tarfile |
|
|
name of the tar file |
|
|
integer |
$action |
|
|
action to do: 1 extract, 2 show content of $file, else list content (sure??) |
|
|
string |
$file |
= >>""<< |
|
name of the file to display (only useful if action == 2 ?) |
|
Returns |
string result or error message |
|
delete_theme_tar |
private mixed delete_theme_tar( string $theme )
|
|
Deletes a tarball for a theme
Calls exit in case the user is not admin.
|
Parameter |
|
string |
$theme |
|
|
of the theme |
|
Returns |
mixed void if upload_tar_dir not configured, string ?? on success, error msg on failure. |
|
gen_rdf |
private string gen_rdf( )
|
|
Function that generates a RDF backend file called backend.rdf
Writes the RDF file.
|
Returns |
string a message about operations |
|
gen_sidebar |
private string gen_sidebar( )
|
|
Function that generates a Mozilla/Netscape 6 Sidebar.
|
Returns |
string message about progress |
|