Procedural File: common_func.php
Source Location: /common_func.php
Page Details:
Description : This file contains all the main functions of the MesDiscussions.net forum.
To use those functions, just add in your php file : include "include/initialize.php"; include "include/common_func.php"; You have access to a list of usefull variables : http://www.mesdiscussions.net/doc/sdk/html/ch02.html#lesvariablesimportantesfourniesparinitialize
Includes:
include(include_path.'common_internal_func.php') [line 50]
md_activate_mail [line 4260]
bool md_activate_mail(
string $current_forum, bool $use_current_db, int $topic_id, int $cat, int $idu, resource $dbhr, resource $dbhw)
|
|
Description : Activate the mail notification for the given user and topic
Tags:
Parameters
| string |
$current_forum |
db name of the forum |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| int |
$topic_id |
topic id |
| int |
$cat |
id cat |
| int |
$idu |
id user |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_activate_mail_private [line 4286]
bool md_activate_mail_private(
int $topic_id, int $idu, resource $dbhr, resource $dbhw)
|
|
Description : Activate the mail notification for the given user and private topic
Tags:
Parameters
| int |
$topic_id |
topic id |
| int |
$idu |
user id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_add_post [line 5664]
int md_add_post(
bool $use_current_db, string $current_forum, int $idsite, int $cat, int $topic_id, int $MsgIcon, string $safe_content, string $safe_pseudo, int $id, bool $signature, string $remote, string $current_ip, bool $apriori, resource $dbhr, resource $dbhw, [int $subcat = 0], [string $date = NULL])
|
|
Description : Add a post inside a topic
Tags:
Parameters
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| string |
$current_forum |
db name of the forum |
| int |
$idsite |
forum id |
| int |
$cat |
cat id |
| int |
$topic_id |
topic id |
| int |
$MsgIcon |
icon # |
| string |
$safe_content |
text of the post (need to be passed through md_mysqlw_real_escape_string) |
| string |
$safe_pseudo |
name of the author (need to be passed through md_mysqlw_real_escape_string) |
| int |
$id |
id_pseudo |
| bool |
$signature |
enable the signature display |
| string |
$remote |
ip 1 |
| string |
$current_ip |
ip 2 |
| bool |
$apriori |
if set to 1, insert the posts in the queue of posts to be validated apriori |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| int |
$subcat |
specify subcat |
| string |
$date |
explicitly specify a date |
md_add_starpoint [line 510]
void md_add_starpoint(
int $id_user, int $nb_point, int $ponderation, resource $dbhr, resource $dbhw)
|
|
Description : Add point for the star system
Parameters
| int |
$id_user |
user id |
| int |
$nb_point |
number of point - + 30p for a topic creation
- + 10p for a small post
- + 20p for a big post
- - 40p for each SMS detection
|
| int |
$ponderation |
number of day of registration. Pass NULL if no ponderation is needed. |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_add_topic [line 687]
array md_add_topic(
bool $use_current_db, string $current_forum, int $id_forum, int $cat, int $subcat, int $sticky, string $subject, string $content, array $poll, int $MsgIcon, int $user_id, string $pseudo, date $date, bool $signature, array $toread, string $remote, string $current_ip, int $topicParPage, resource $dbhr, resource $dbhw, [bool $stickyallowed = 0], [bool $apriori = 0], [array $expire = array(0,0,0,0,0)])
|
|
Description : Create a topic (do not use for a private message)
Tags:
Parameters
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| string |
$current_forum |
db name of the forum |
| int |
$id_forum |
id of the forum |
| int |
$cat |
cat number |
| int |
$subcat |
subcat number |
| int |
$sticky |
set to 1 to create as sticky |
| string |
$subject |
title of the topic (needs to be protected by md_mysqlw_real_escape_string) |
| string |
$content |
content of the topic (needs to be protected by md_mysqlw_real_escape_string) |
| array |
$poll |
poll answer; 0 => poll title; 1-10 => poll choices; 99 => max number of votes |
| int |
$MsgIcon |
icone associated with the topic |
| int |
$user_id |
id of the user which create the topic |
| string |
$pseudo |
pseudo of the user which create the topic (needs to be protected by md_mysqlw_real_escape_string) |
| date |
$date |
date of creation of the topic |
| bool |
$signature |
activate the signature of the user |
| array |
$toread |
array of topic id (max 5 elements) which could be associated with this topic |
| string |
$remote |
ip of the sender (behind a firewall if any) |
| string |
$current_ip |
ip of the sender |
| int |
$topicParPage |
number of topic per page listed on the topic list. |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| bool |
$stickyallowed |
default 0, set to 1 if sticky creation is allowed |
| bool |
$apriori |
default 0, set to 1 if you want to create the topic as a topic to be moderated a priori |
| array |
$expire |
default (0,0,0,0,0), expiration date of a poll (Y,m,d,H,m) |
md_alerter_mp_mail [line 178]
void md_alerter_mp_mail(
bool $mp, string $to, string $replyto, string $title, string $content, int $id_author, string $author, int $id_recipient, string $recipient, string $remote, string $current_ip, resource $dbhw, [bool $skip_author = 0])
|
|
Description : Send either an email or a Private Message to inform a user an action has occured.
Parameters
| bool |
$mp |
if set to 1, contact by PM, otherwise contact by mail |
| string |
$to |
email of the recipient |
| string |
$replyto |
email of the sender |
| string |
$title |
title of the mail / PM |
| string |
$content |
content of the mail / PM |
| int |
$id_author |
id of the sender |
| string |
$author |
name of the sender |
| int |
$id_recipient |
id of the recipient |
| string |
$recipient |
name of the recipient |
| string |
$remote |
ip of the sender (behind a firewall if any) |
| string |
$current_ip |
ip of the sender |
| resource |
$dbhw |
db link for master servers |
| bool |
$skip_author |
if set to 1, do not send a PM to the sender |
md_aposteriori_nb_delete [line 5497]
int md_aposteriori_nb_delete(
int $id_author, bool $use_current_db, date $begin, date $end, resource $dbhr, resource $dbhw)
|
|
Description : Get the number of deleted 'aposteriori' posts by a given moderator between given dates
Tags:
Parameters
| int |
$id_author |
moderator id |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| date |
$begin |
begin date (YYYY-MM-DD) |
| date |
$end |
end date (YYYY-MM-DD) |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_aposteriori_nb_edited [line 5524]
int md_aposteriori_nb_edited(
int $id_author, bool $use_current_db, date $begin, date $end, resource $dbhr, resource $dbhw)
|
|
Description : Get the number of edited 'aposteriori' posts by a given moderator between given dates
Tags:
Parameters
| int |
$id_author |
moderator id |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| date |
$begin |
begin date (YYYY-MM-DD) |
| date |
$end |
end date (YYYY-MM-DD) |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_apriori_nb_delete [line 5412]
int md_apriori_nb_delete(
int $id_author, bool $use_current_db, date $begin, date $end, resource $dbhr, resource $dbhw)
|
|
Description : Get the number of deleted 'apriori' posts by a given moderator between given dates
Tags:
Parameters
| int |
$id_author |
moderator id |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| date |
$begin |
begin date (YYYY-MM-DD) |
| date |
$end |
end date (YYYY-MM-DD) |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_apriori_nb_messages [line 5438]
int md_apriori_nb_messages(
bool $use_current_db, date $begin, date $end, resource $dbhr, resource $dbhw)
|
|
Description : Get the total number of 'apriori' posts between given dates
Tags:
Parameters
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| date |
$begin |
begin date (YYYY-MM-DD) |
| date |
$end |
end date (YYYY-MM-DD) |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_apriori_nb_publie [line 5385]
int md_apriori_nb_publie(
int $id_author, bool $use_current_db, date $begin, date $end, resource $dbhr, resource $dbhw)
|
|
Description : Get the number of 'apriori' posts published by a given moderator between given dates
Tags:
Parameters
| int |
$id_author |
moderator id |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| date |
$begin |
begin date (YYYY-MM-DD) |
| date |
$end |
end date (YYYY-MM-DD) |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_auto_marking_as_old [line 1621]
void md_auto_marking_as_old(
string $current_forum, int $id_cat, int $user_id, int $user_delay, bool $use_current_db, date $date, resource $dbhr, resource $dbhw)
|
|
Description : Automatically mark topics as old if the delay specified after the last marking is reached
Parameters
| string |
$current_forum |
db name of the forum |
| int |
$id_cat |
cat number |
| int |
$user_id |
check topics of the given user_id |
| int |
$user_delay |
number of hour between the last check |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| date |
$date |
current date in the user timezone |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_casier_judiciaire [line 1373]
void md_casier_judiciaire(
bool $use_current_db, string $current_forum, int $user_id, int $ban, int $cat, date $dateban, resource $dbhw)
|
|
Description : Insert a sanction into the moderation log
Parameters
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| string |
$current_forum |
db name of the forum |
| int |
$user_id |
id of the user to punish |
| int |
$ban |
sanction type : - 1 => teletubbies
- 2 => ban
- 3 => images forbidden
- 4 => signature forbidden
- 5 => smilies forbidden
- 6 => blabla
|
| int |
$cat |
cat number |
| date |
$dateban |
date of the sanction |
| resource |
$dbhw |
db link for master servers |
md_check_allow_search_on_all_forum [line 3944]
bool md_check_allow_search_on_all_forum(
resource $dbhr, resource $dbhw, [MD_user $user_obj = ''], [int $idforum = 0])
|
|
Description : Check if the search is allowed on the whole board or on a given forum
Tags:
Parameters
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| MD_user |
$user_obj |
current user |
| int |
$idforum |
|
md_check_apriori [line 3569]
bool md_check_apriori(
string $current_forum, bool $use_current_db, resource $dbhr, resource $dbhw)
|
|
Description : Check if the apriori moderation is activated in one cat of the given forum
Tags:
Parameters
| string |
$current_forum |
db name of the forum |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_check_charte [line 1990]
bool md_check_charte(
int $id_site, resource $dbhr, resource $dbhw)
|
|
Description : Check if the charter should be displayed for the given forum
Tags:
Parameters
| int |
$id_site |
forum id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_check_closed_board [line 3203]
bool md_check_closed_board(
bool $up, int $user_status, string $text)
|
|
Description : Display the given text if the forum is closed
Tags:
Parameters
| bool |
$up |
set to 0 if the forum is closed |
| int |
$user_status |
status of the user |
| string |
$text |
text to be displayed if the board is closed |
md_check_display_stats_on_home [line 3674]
bool md_check_display_stats_on_home(
int $id_site, resource $dbhr, resource $dbhw)
|
|
Description : Check if the stats should be displayed on the current forum
Tags:
Parameters
| int |
$id_site |
id of the forum |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_check_edit_right [line 5550]
bool md_check_edit_right(
bool $use_current_db, string $current_forum, int $cat, int $post_id, resource $dbhr)
|
|
Description : Check if the owner of a given post has the proper right to edit it
Tags:
Parameters
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| string |
$current_forum |
db name of the forum |
| int |
$cat |
cat id |
| int |
$post_id |
post id |
| resource |
$dbhr |
db link for slave servers (if any) |
md_check_identification [line 1807]
array md_check_identification(
resource $dbhr, resource $dbhw, [int $get_nb_mp = '0'])
|
|
Description : Check the user identification is correct from COOKIE user and passs
Tags:
Parameters
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| int |
$get_nb_mp |
default 0 ; if set to 1, return the number of new PMs |
md_check_keyword_notification [line 295]
void md_check_keyword_notification(
int $cat, int $topic_id, string $forum_rewritten_name, string $subject, int $id_author, string $author, string $path1, string $dir_install, bool $modrewrite, bool $default, string $categorie, string $forum_name, &$parsed_string_array, string $remote, resource $dbhw, resource $dbhr, [int $subcat = 0], [string $souscategorie = ''], string $email_sender, array $parsed_string_array)
|
|
Description : send an email / PM if an user want to be warned when a keyword appears in a topic title
Parameters
| int |
$cat |
current cat number |
| int |
$topic_id |
topic id |
| string |
$forum_rewritten_name |
rewritten name of the forum |
| string |
$subject |
title of the mail / PM |
| int |
$id_author |
id of the sender |
| string |
$author |
name of the sender |
| string |
$path1 |
domaine name of the forum |
| string |
$dir_install |
subdirectory where the forum is install (empty string if install at the root of the domaine name) |
| bool |
$modrewrite |
set to 1 to use rewritten url |
| bool |
$default |
set to 1 if the current forum is the default one |
| string |
$categorie |
categorie name |
| string |
$forum_name |
name of the current forum |
| string |
$email_sender |
email of the sender |
| array |
$parsed_string_array |
array of keyword part of the topic title |
| string |
$remote |
ip of the sender (behind a firewall if any) |
| resource |
$dbhw |
db link for master servers |
| resource |
$dbhr |
db link for slave servers (if any) |
| int |
$subcat |
|
| string |
$souscategorie |
|
| |
&$parsed_string_array |
|
md_check_modo_right [line 1286]
bool md_check_modo_right(
bool $use_current_db, string $current_forum, int $user_id, int $ban, int $cat, string $user, $status, resource $dbhr, int $stat)
|
|
Description : Check if the current moderator has enough right to punish a give user
Tags:
Parameters
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| string |
$current_forum |
db name of the forum |
| int |
$user_id |
id of the user to punish |
| int |
$ban |
sanction type : - 1 => teletubbies
- 2 => ban
- 3 => images forbidden
- 4 => signature forbidden
- 5 => smilies forbidden
- 6 => blabla
|
| int |
$cat |
cat number |
| string |
$user |
moderator name |
| int |
$stat |
status of the moderator ( - 1 => modo
- 2 => admin
- 3 => supadmin
- 4 => god assistant
- 5 => god)
|
| resource |
$dbhr |
db link for slave servers (if any) |
| |
$status |
|
md_check_moved_topic [line 5118]
array md_check_moved_topic(
int $idsite, int $cat, $post, resource $dbhr, resource $dbhw, int $topic_id)
|
|
Description : Check if the topic id has been moved
Tags:
Parameters
| int |
$idsite |
current id of site |
| int |
$cat |
current cat number |
| int |
$topic_id |
topic id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| |
$post |
|
md_check_mp_right [line 4141]
int md_check_mp_right(
int $id, int $topic_id, resource $dbhr, resource $dbhw)
|
|
Description : Check if the user has the right to read a private message
Tags:
Parameters
| int |
$id |
user id |
| int |
$topic_id |
topic id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_check_mp_user_ignored [line 4165]
int md_check_mp_user_ignored(
int $id, int $topic_id, resource $dbhr, resource $dbhw)
|
|
Description : Check if a user on the given topic is part of the ignore list of another user
Tags:
Parameters
| int |
$id |
user id |
| int |
$topic_id |
topic id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_check_multi [line 528]
void md_check_multi(
int $idu, int $id, resource $dbhr, resource $dbhw)
|
|
Description : Link together (multipseudo) the two given ids
Parameters
| int |
$idu |
id user 1 |
| int |
$id |
id user 2 |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_check_poll_participation [line 3004]
bool md_check_poll_participation(
string $current_forum, bool $use_current_db, int $cat, int $topic_id, int $iduser, resource $dbhr, resource $dbhw)
|
|
Description : Check if the given user has already participated to the given poll
Tags:
Parameters
| string |
$current_forum |
db name of the forum |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| int |
$cat |
current cat number |
| int |
$topic_id |
topic id |
| int |
$iduser |
pseudo id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_check_poll_participation_guest [line 3028]
bool md_check_poll_participation_guest(
string $current_forum, bool $use_current_db, int $cat, int $topic_id, $remote, resource $dbhr, resource $dbhw, int $iduser)
|
|
Description : Check if the guest with this IP adress has already participated to the given poll
Tags:
Parameters
| string |
$current_forum |
db name of the forum |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| int |
$cat |
current cat number |
| int |
$topic_id |
topic id |
| int |
$iduser |
pseudo id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| |
$remote |
|
md_check_right_and_get_mp_infos [line 4232]
array md_check_right_and_get_mp_infos(
int $id, int $topic_id, resource $dbhr, resource $dbhw)
|
|
Description : Return mp infos and check access
Tags:
Parameters
| int |
$id |
user id |
| int |
$topic_id |
topic id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_check_subcat [line 6062]
bool md_check_subcat(
string $current_forum, int $subcat, bool $use_current_db, resource $dbhr, resource $dbhw)
|
|
Description : Check if a subcat exists in the current forum
Tags:
Parameters
| string |
$current_forum |
db name of the forum |
| int |
$subcat |
subcat id |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_check_topic_has_vip [line 4902]
bool md_check_topic_has_vip(
string $current_forum, bool $use_current_db, int $cat, int $topic_id, resource $dbhr, resource $dbhw)
|
|
Description : Check if a topic contains VIP posts
Tags:
Parameters
| string |
$current_forum |
db name of the forum |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| int |
$cat |
current cat number |
| int |
$topic_id |
topic id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_check_vip [line 3713]
bool md_check_vip(
int $idu, int $target_cat, bool $use_current_db, string $forum_name, resource $dbhr, resource $dbhw)
|
|
Description : Check if the given user is allowed to enter into a VIP cat
Tags:
Parameters
| int |
$idu |
user id |
| int |
$target_cat |
vip cat id |
| bool |
$use_current_db |
change the current db to forum_$forum_name if set to 0 |
| string |
$forum_name |
db name of the forum |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_check_vip_exist [line 3734]
bool md_check_vip_exist(
int $target_cat, bool $use_current_db, string $forum_name, resource $dbhr, resource $dbhw)
|
|
Description : Check if the given cat is restricted to VIP members
Tags:
Parameters
| int |
$target_cat |
cat id |
| bool |
$use_current_db |
change the current db to forum_$forum_name if set to 0 |
| string |
$forum_name |
db name of the forum |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_check_wysiwyg [line 1942]
bool md_check_wysiwyg(
int $idu, resource $dbhr, resource $dbhw)
|
|
Description : Check if the wysiwyg is allowed for the given user
Tags:
Parameters
| int |
$idu |
user id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_close_poll [line 340]
void md_close_poll(
bool $use_current_db, string $current_forum, int $cat, int $topic_id, resource $dbhr, resource $dbhw)
|
|
Description : Close the poll associated with the given topic id
Parameters
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| string |
$current_forum |
db name of the forum |
| int |
$cat |
current cat number |
| int |
$topic_id |
topic id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_convert_numreponse_to_offset [line 4970]
int md_convert_numreponse_to_offset(
bool $use_current_db, string $current_forum, int $cat, int $numreponse, int $topic_id, resource $dbhr, resource $dbhw)
|
|
Description : Convert a post_id to an offset
Tags:
Parameters
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| string |
$current_forum |
db name of the forum |
| int |
$cat |
current cat number |
| int |
$numreponse |
post id |
| int |
$topic_id |
topic id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_convert_offset_to_numreponse [line 4998]
int md_convert_offset_to_numreponse(
bool $use_current_db, string $current_forum, int $cat, int $offset, int $topic_id, resource $dbhr, resource $dbhw)
|
|
Description : Convert an offset to a post_id
Tags:
Parameters
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| string |
$current_forum |
db name of the forum |
| int |
$cat |
current cat number |
| int |
$offset |
the post offset |
| int |
$topic_id |
topic id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_count_alerts [line 5874]
int md_count_alerts(
bool $use_current_db, string $current_forum, int $id_cat, int $status, resource $dbhr, resource $dbhw, bool $is_admin)
|
|
Description : Get the number of alerts of a given status
Tags:
Parameters
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| string |
$current_forum |
db name of the forum |
| int |
$id_cat |
cat id |
| int |
$status |
count the number of alerts with this status (0 : pending; 1 : in progress; 2 : done; NULL : all) |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| bool |
$is_admin |
set to 1 if the user is admin |
md_count_multi [line 3068]
int md_count_multi(
int $idu, resource $dbhr, resource $dbhw)
|
|
Description : Get the number of multi a pseudo have
Tags:
Parameters
| int |
$idu |
pseudo id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_count_online [line 1783]
int md_count_online(
resource $dbhr, resource $dbhw, [int $id_forum = '0'])
|
|
Description : Count the number of online user
Tags:
Parameters
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| int |
$id_forum |
default 0 : count the user on all the forums; if != 0, count the user on the given forum |
md_count_posts_to_check [line 5749]
int md_count_posts_to_check(
bool $use_current_db, string $current_forum, int $cat, bool $apriori, resource $dbhr, resource $dbhw)
|
|
Description : Get the number of posts to be validated by the moderation
Tags:
Parameters
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| string |
$current_forum |
db name of the forum |
| int |
$cat |
cat id |
| bool |
$apriori |
if set to 1, count the nb of posts to be validated apriori |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_count_private_thread [line 4080]
int md_count_private_thread(
int $topic_id, resource $dbhr, resource $dbhw)
|
|
Description : Return the number of posts of the given topic id
Tags:
Parameters
| int |
$topic_id |
topic id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_count_private_topic [line 4044]
int md_count_private_topic(
int $idu, bool $lu, bool $nonlu, resource $dbhr, resource $dbhw)
|
|
Description : Count the number of private topic of a kind of type
Tags:
Parameters
| int |
$idu |
user id |
| bool |
$lu |
if set to 1, return the number of read private messages |
| bool |
$nonlu |
if set to 1, return the number of not read private messages |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_count_topics [line 4704]
int md_count_topics(
int $subcat, bool $poll, string $current_forum, bool $use_current_db, int $cat, resource $dbhr, resource $dbhw, [int $index_of_first_topic = 20], [int $topicParPage = 1], [int $subcat_group = 0])
|
|
Description : Count the total number of topics into a cat/subcat (if current page < 15, is only an estimation)
Tags:
Parameters
| int |
$subcat |
return the topics from this subcat; set to NULL for no subcat filter |
| bool |
$poll |
only return poll if set to true |
| string |
$current_forum |
db name of the forum |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| int |
$cat |
current cat number |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| int |
$index_of_first_topic |
offset of topic start |
| int |
$topicParPage |
number of topic per page |
| int |
$subcat_group |
restrict the count to a subcat_group |
md_count_topics_in_trash [line 4417]
int md_count_topics_in_trash(
string $current_forum, bool $use_current_db, int $cat, bool $use_found_rows, bool $poll, resource $dbhr, resource $dbhw)
|
|
Description : Count the total number of topics into the trash of a cat/subcat (if $use_found_rows is set to false, is only an estimation)
Tags:
Parameters
| string |
$current_forum |
db name of the forum |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| int |
$cat |
current cat number |
| bool |
$use_found_rows |
set to 1 if md_get_topics_in_trash has been called just before this function |
| bool |
$poll |
only return poll if set to true |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_delete_mp [line 4095]
void md_delete_mp(
int $idu, int $topic_id, resource $dbhr, resource $dbhw)
|
|
Description : Delete the reference to the given private message for the given user
Parameters
| int |
$idu |
user id |
| int |
$topic_id |
topic id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_del_post [line 6327]
Nothing md_del_post(
int $id_deleter, bool $use_current_db, string $current_forum, int $idsite, int $cat, int $idtopic, int $numreponse, resource $dbhr, resource $dbhw)
|
|
Description : Delete definitively post or topic (if post is the first of the topic)
Parameters
| int |
$id_deleter |
user id of deleter |
| bool |
$use_current_db |
change the current db to forum_$forum_name if set to 0 |
| string |
$current_forum |
db name of the forum |
| int |
$idsite |
ID of the forum |
| int |
$cat |
ID of the section |
| int |
$idtopic |
db name of the forum |
| int |
$numreponse |
db name of the forum |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_detect_sms_fr [line 831]
array md_detect_sms_fr(
string $text)
|
|
Description : Detect if the given text is written in SMS style [fr only]
Tags:
Parameters
| string |
$text |
text to be analyzed |
md_display_mp_link [line 5597]
string md_display_mp_link(
bool $modrewrite, string $forum_rewritten_name_origine, bool $defaut, int $postParPage, int $cat, int $id, resource $dbhr, resource $dbhw)
|
|
Description : Return the HTML code which displays the new MP notification
Tags:
Parameters
| bool |
$modrewrite |
set to 1 to activate the modrewrite code |
| string |
$forum_rewritten_name_origine |
rewritten name of the forum |
| bool |
$defaut |
set to 1 if it's the default forum |
| int |
$postParPage |
number of post per page |
| int |
$cat |
cat id |
| int |
$id |
user id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_display_superadmin [line 3537]
string md_display_superadmin(
bool $modrewrite, string $current_forum, bool $default, resource $dbhr, resource $dbhw)
|
|
Description : Return the supadmin list with the proper links
Tags:
Parameters
| bool |
$modrewrite |
set to 1 to activate the modrewrite |
| string |
$current_forum |
db name of the forum |
| bool |
$default |
set to 1 if it's the default forum |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_edit_post [line 6410]
Nothing md_edit_post(
bool $use_current_db, string $current_forum, int $idsite, int $cat, int $subcat, int $idtopic, int $numreponse, string $subject, string $contenu, int $editby, string $date, resource $dbhr, $dbhs, resource $dbhw)
|
|
Description : Edit post or/and title of topic (if post is the first of the topic and var subject is not empty)
Parameters
| bool |
$use_current_db |
change the current db to forum_$forum_name if set to 0 |
| string |
$current_forum |
db name of the forum |
| int |
$idsite |
ID of the forum |
| int |
$cat |
ID of the section |
| int |
$subcat |
ID of the subsection |
| int |
$idtopic |
db name of the forum |
| int |
$numreponse |
db name of the forum |
| string |
$subject |
New subject for the topic |
| string |
$contenu |
New content for the post |
| int |
$editby |
ID of user that edit the message |
| string |
$date |
date if editor must be specified |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| |
$dbhs |
|
md_forbidden_word [line 5340]
string md_forbidden_word(
string $content, string $current_forum, bool $use_current_db, resource $dbhr, resource $dbhw)
|
|
Description : Update the given string according to the forbidden rules set
Tags:
Parameters
| string |
$content |
input string |
| string |
$current_forum |
db name of the forum |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_forum_sig_must_validate [line 3624]
booleen md_forum_sig_must_validate(
$idforum, resource $dbhr, int $id_site)
|
|
Description : Return if the forum want validate signature
Tags:
Parameters
| int |
$id_site |
id of the forum; set to NULL if you want the list for all the forums |
| resource |
$dbhr |
db link for slave servers (if any) |
| |
$idforum |
|
md_get_awaiting_pictures [line 3588]
int md_get_awaiting_pictures(
int $id_site, resource $dbhr, resource $dbhw)
|
|
Description : Return the number of pictures which should be validated
Tags:
Parameters
| int |
$id_site |
id of the forum; set to NULL if you want the list for all the forums |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_awaiting_registration [line 3656]
int md_get_awaiting_registration(
int $id_site, resource $dbhr, resource $dbhw)
|
|
Description : Return the number of registrations which should be validated
Tags:
Parameters
| int |
$id_site |
id of the forum; set to NULL if you want the list for all the forums |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_awaiting_signature [line 3606]
int md_get_awaiting_signature(
int $id_site, resource $dbhr, resource $dbhw)
|
|
Description : Return the number of signature which should be validated
Tags:
Parameters
| int |
$id_site |
id of the forum; set to NULL if you want the list for all the forums |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_awaiting_smilies [line 3638]
int md_get_awaiting_smilies(
int $id_site, resource $dbhr, resource $dbhw)
|
|
Description : Return the number of smileys which should be validated
Tags:
Parameters
| int |
$id_site |
id of the forum; set to NULL if you want the list for all the forums |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_cat_moderateur [line 5958]
resource md_get_cat_moderateur(
string $current_forum, string $user, bool $use_current_db, resource $dbhr, resource $dbhw)
|
|
Description : Return the list of cat of the given forum where the user is moderator
Tags:
Parameters
| string |
$current_forum |
db name of the forum |
| string |
$user |
user name (should be protected by md_mysqlw_real_escape_string) |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_cat_moderateur_and_animator [line 5978]
resource md_get_cat_moderateur_and_animator(
string $current_forum, string $user, bool $use_current_db, resource $dbhr, resource $dbhw)
|
|
Description : Return the list of cat of the given forum where the user is moderator
Tags:
Parameters
| string |
$current_forum |
db name of the forum |
| string |
$user |
user name (should be protected by md_mysqlw_real_escape_string) |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_cat_name [line 5817]
string md_get_cat_name(
bool $use_current_db, int $id_forum, int $id_cat, resource $dbhr, resource $dbhw)
|
|
Description : Get the cat name associated with the given id_forum and id_cat
Tags:
Parameters
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| int |
$id_forum |
forum id |
| int |
$id_cat |
cat id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_cat_status [line 3692]
void md_get_cat_status(
bool $use_current_db, string $current_forum_origine, int $numero, &$locke, &$visible, resource $dbhr, resource $dbhw, bool $locke, bool $visible)
|
|
Description : Check if the given cat is locked or visible
Parameters
| bool |
$use_current_db |
change the current db to forum_$current_forum_origine if set to 0 |
| string |
$current_forum_origine |
db name of the forum |
| int |
$numero |
cat number |
| bool |
$locke |
return 0 if the cat is locked, 1 otherwise |
| bool |
$visible |
return 0 if the cat is not visible, 1 otherwise |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| |
&$locke |
|
| |
&$visible |
|
md_get_count_private_unread [line 3165]
int md_get_count_private_unread(
int $idu, resource $dbhr, resource $dbhw)
|
|
Description : Return the number of unread private topic for the given user id
Tags:
Parameters
| int |
$idu |
user id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_custom_endmail [line 6096]
string md_get_custom_endmail(
int $idsite, resource $dbhr)
|
|
Description : Get customized email's end
Tags:
Parameters
| int |
$idsite |
actual forum id (if any) |
| resource |
$dbhr |
db link for slave servers (if any) |
md_get_firstpost_view [line 27]
string md_get_firstpost_view(
bool $use_current_db, string $current_forum, string $cat, int $topic_id, int $num_char, resource $dbhr, resource $dbhw)
|
|
Description : Get the x firsts chars of the first message in the topic
Tags:
Parameters
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| string |
$current_forum |
db name of the forum |
| string |
$cat |
current cat number (either an integer or 'prive' for private message) |
| int |
$topic_id |
topic id |
| int |
$num_char |
number of chars to get |
| resource |
$dbhw |
db link for master servers |
| resource |
$dbhr |
db link for slave servers (if any) |
md_get_flag_info [line 4764]
string md_get_flag_info(
&$list_topic, &$array_numrep, &$array_position, &$array_owntopic, string $current_forum, bool $use_current_db, int $cat, int $idu, int $owntopic, resource $dbhr, resource $dbhw, string $list_topic, array $array_numrep, array $array_position, array $array_owntopic)
|
|
Description : Get the list of topics with flags
Tags:
Parameters
| string |
$list_topic |
return the list of read/participated in/borkmarked post_ids separated by a comma |
| array |
$array_numrep |
latest read post_id associated with each topic id |
| array |
$array_position |
offset of the latest read post_id associated with each topic id |
| array |
$array_owntopic |
status of each topic id (0 => read, 1 => participated in, 3 => bookmarked) |
| string |
$current_forum |
db name of the forum |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| int |
$cat |
current cat number |
| int |
$idu |
id user; use to get the flag info associated to a topic |
| int |
$owntopic |
set to the type of topics which should be returned (1 => participated in + bookmarked, 2 => read, 3 => bookmarked only) |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| |
&$list_topic |
|
| |
&$array_numrep |
|
| |
&$array_position |
|
| |
&$array_owntopic |
|
md_get_flag_user [line 2910]
array md_get_flag_user(
string $current_forum, bool $use_current_db, int $cat, int $idu, int $topic_id, resource $dbhr, resource $dbhw)
|
|
Description : Return the latest read post_id and the read status for a given topic_id and user
Tags:
Parameters
| string |
$current_forum |
db name of the forum |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| int |
$cat |
current cat number |
| int |
$idu |
user id |
| int |
$topic_id |
topic id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_flood_param_message [line 1472]
void md_get_flood_param_message(
int $id_site, resource $dbhr, resource $dbhw, &$flood_message_nb, &$flood_message_time, &$flood_lastmessage_nb, &$flood_lastmessage_nb2, &$flood_lastmessage_time, int $flood_message_nb, int $flood_message_time, int $flood_lastmessage_nb, int $flood_lastmessage_nb2, int $flood_lastmessage_time)
|
|
Description : Insert a sanction into the moderation log
Parameters
| int |
$id_site |
forum id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| int |
$flood_message_nb |
return the number of allowed subsequent posts |
| int |
$flood_message_time |
return the time needed between two posts |
| int |
$flood_lastmessage_nb |
return the number of topics taken into account to test the last author |
| int |
$flood_lastmessage_nb2 |
return the number of allowed topics with the same last author within the number of topic of $flood_lastmessage_nb |
| int |
$flood_lastmessage_time |
return the time needed after an antiflood of last author type has been triggered |
| |
&$flood_message_nb |
|
| |
&$flood_message_time |
|
| |
&$flood_lastmessage_nb |
|
| |
&$flood_lastmessage_nb2 |
|
| |
&$flood_lastmessage_time |
|
md_get_flood_param_topic [line 1494]
void md_get_flood_param_topic(
int $id_site, resource $dbhr, resource $dbhw, &$flood_thread_nb, &$flood_thread_time, &$flood_thread, int $flood_thread_nb, int $flood_thread_time, int $flood_thread)
|
|
Description : Insert a sanction into the moderation log
Parameters
| int |
$id_site |
forum id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| int |
$flood_thread_nb |
return the number of allowed subsequent topic creation |
| int |
$flood_thread_time |
return the time needed between after subsequent $flood_thread_nb has been created |
| int |
$flood_thread |
return the time needed between two topics creation |
| |
&$flood_thread_nb |
|
| |
&$flood_thread_time |
|
| |
&$flood_thread |
|
md_get_forum_cat_infos [line 3438]
resource md_get_forum_cat_infos(
string $current_forum, int $cat, bool $registered, bool $use_current_db, int $id_user, resource $dbhr, resource $dbhw, [string $add_field = ''])
|
|
Description : Get infos about a cat
Tags:
Parameters
| string |
$current_forum |
db name of the forum |
| int |
$cat |
cat id |
| bool |
$registered |
registered user ? |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| int |
$id_user |
id_user |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| string |
$add_field |
fetch additional fields |
md_get_forum_id [line 3853]
string md_get_forum_id(
string $forum_name, resource $dbhr, resource $dbhw)
|
|
Description : Return the ID of the forum with name
Tags:
Parameters
| string |
$forum_name |
forum bdd extension |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_forum_list [line 4883]
resource md_get_forum_list(
bool $show_hidden, resource $dbhr, resource $dbhw)
|
|
Description : Get the forum list of the whole board
Tags:
Parameters
| bool |
$show_hidden |
display hidden forums |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_forum_name [line 3868]
string md_get_forum_name(
int $forum_id, resource $dbhr, resource $dbhw)
|
|
Description : Return the forum name associated to its id
Tags:
Parameters
| int |
$forum_id |
forum id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_forum_post_infos [line 3253]
array md_get_forum_post_infos(
string $current_forum, int $cat, bool $use_current_db, resource $dbhr, resource $dbhw)
|
|
Description : Get info about the latest post posted on a given cat
Tags:
Parameters
| string |
$current_forum |
db name of the forum |
| int |
$cat |
cat id; if set to NULL, return array[$num_cat] |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_forum_rewriting [line 3886]
array md_get_forum_rewriting(
int $forum_id, resource $dbhr, resource $dbhw)
|
|
Description : Return the forum rewritten name associated to its id
Tags:
Parameters
| int |
$forum_id |
forum id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_forum_subcat_infos [line 3324]
array|resource md_get_forum_subcat_infos(
string $current_forum, int $cat, bool $use_current_db, bool $show_only_visible, resource $dbhr, resource $dbhw, [bool $hide = 1], [int $subcatgroup = 0], [bool $hide_false_subcat = 0], [int $idsite = 0])
|
|
Description : Get info about the subcat of the given cat
Tags:
Parameters
| string |
$current_forum |
db name of the forum |
| int |
$cat |
cat id |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| bool |
$show_only_visible |
if set to 1 return only visible subcat |
| bool |
$hide |
return hidden subcat |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| int |
$subcatgroup |
return the given subcatgroup |
| bool |
$hide_false_subcat |
|
| int |
$idsite |
|
md_get_forum_subcat_url_infos [line 3391]
array md_get_forum_subcat_url_infos(
string $current_forum, int $subcat, bool $use_current_db, resource $dbhr, resource $dbhw)
|
|
Description : Get url and name associated with a subcat
Tags:
Parameters
| string |
$current_forum |
db name of the forum |
| int |
$subcat |
subcat id |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_global_read_infos [line 6294]
array md_get_global_read_infos(
int $idu, bool $use_current_db, string $forum_name, resource $dbhr, resource $dbhw)
|
|
Description : Return an array fill with global read info
Tags:
Parameters
| int |
$idu |
user id |
| bool |
$use_current_db |
change the current db to forum_$forum_name if set to 0 |
| string |
$forum_name |
db name of the forum |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_identification [line 1824]
array md_get_identification(
resource $dbhr, resource $dbhw, string $pseudo, string $password_md5, [int $get_nb_mp = '0'])
|
|
Description : Check the user identification is correct from given user and MD5 pass
Tags:
Parameters
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| string |
$pseudo |
user name |
| string |
$password_md5 |
MD5 password |
| int |
$get_nb_mp |
default 0 ; if set to 1, return the number of new PMs |
md_get_id_pseudo [line 5800]
int md_get_id_pseudo(
string $pseudo, resource $dbhr, resource $dbhw)
|
|
Description : Get the id associated with a pseudo
Tags:
Parameters
| string |
$pseudo |
user name |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_ignore_list [line 4865]
array md_get_ignore_list(
int $id, resource $dbhr, resource $dbhw)
|
|
Description : Get the ignore_list of the given user
Tags:
Parameters
| int |
$id |
id user |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_intermediate_page [line 6224]
string md_get_intermediate_page(
int $idsite, resource $dbhr, resource $dbhw)
|
|
Description : Get the code of intermediate page
Tags:
Parameters
| int |
$idsite |
idsite to get intermediate page |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_last_unread_private_topic [line 4066]
int md_get_last_unread_private_topic(
int $idu, resource $dbhr, resource $dbhw)
|
|
Description : Return the topic id of the latest unread private message
Tags:
Parameters
| int |
$idu |
user id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_list_topic [line 4813]
resource md_get_list_topic(
string $current_forum, bool $use_current_db, bool $check_vip, int $cat, int $subcat, string $list_topic, resource $dbhr, resource $dbhw, [bool $sticky = '0'], [bool $get_resolved_infos = '0'])
|
|
Description : Fetch topic infos from a list of topic_id
Tags:
Parameters
| string |
$current_forum |
db name of the forum |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| bool |
$check_vip |
check if a VIP member has already posted in the topic, and set contain_vip_posts accordingly |
| int |
$cat |
current cat number |
| int |
$subcat |
current subcat number |
| string |
$list_topic |
list of topics to be fetched, separated by a comma |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| bool |
$sticky |
return sticky only |
| bool |
$get_resolved_infos |
|
md_get_mail_contact [line 5997]
string md_get_mail_contact(
int $id_user, int $id_forum, resource $dbhr)
|
|
Description : Return the contact mail for the given modo id. If the mail should be hidden, return the global forum's email.
Tags:
Parameters
| int |
$id_user |
user id |
| int |
$id_forum |
forum id |
| resource |
$dbhr |
db link for slave servers (if any) |
md_get_max_numrep [line 3790]
int md_get_max_numrep(
int $target_cat, bool $use_current_db, string $forum_name, resource $dbhr, resource $dbhw)
|
|
Description : Return the max post_id of the given cat
Tags:
Parameters
| int |
$target_cat |
cat id |
| bool |
$use_current_db |
change the current db to forum_$forum_name if set to 0 |
| string |
$forum_name |
db name of the forum |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_max_numrep_read_infos [line 3756]
int md_get_max_numrep_read_infos(
int $idu, int $target_cat, bool $use_current_db, string $forum_name, resource $dbhr, resource $dbhw, array &$global_infos)
|
|
Description : Return the max between the read post_id and the post_id marked as read on the given cat
Tags:
Parameters
| int |
$idu |
user id |
| int |
$target_cat |
cat id |
| bool |
$use_current_db |
change the current db to forum_$forum_name if set to 0 |
| string |
$forum_name |
db name of the forum |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| array |
&$global_infos |
pass a variable initialized to NULL |
md_get_mesimages_weight [line 1848]
int md_get_mesimages_weight(
int $user_id)
|
|
Description : Get the total file size of a given user images directory
Tags:
Parameters
md_get_min_numrep_in_topic [line 1876]
int md_get_min_numrep_in_topic(
string $current_forum, bool $use_current_db, string $cat, int $topic_id, resource $dbhr, resource $dbhw)
|
|
Description : Get the min post id of the given topic id
Tags:
Parameters
| string |
$current_forum |
db name of the forum |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| string |
$cat |
current cat number (either an integer or 'prive' for private message) |
| int |
$topic_id |
topic id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_modo_predefined_reasons [line 6079]
array md_get_modo_predefined_reasons(
resource $dbhr)
|
|
Description : Get moderation predefined reasons
Tags:
Parameters
| resource |
$dbhr |
db link for slave servers (if any) |
md_get_multi_quote_infos [line 2285]
resource md_get_multi_quote_infos(
string $current_forum, bool $use_current_db, int $cat, string $quotes, resource $dbhr, resource $dbhw)
|
|
Description : Get basic infos from a list of topics
Tags:
Parameters
| string |
$current_forum |
db name of the forum |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| int |
$cat |
current cat number |
| string |
$quotes |
list of id_topic separated by a comma |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_multi_topparent [line 3053]
int md_get_multi_topparent(
int $idu, resource $dbhr, resource $dbhw)
|
|
Description : Get the top parent associated with a given id pseudo
Tags:
Parameters
| int |
$idu |
pseudo id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_nb_days_old [line 488]
int md_get_nb_days_old(
int $id_user, resource $dbhr, resource $dbhw)
|
|
Description : Get how long a user is registered to the forum
Tags:
Parameters
| int |
$id_user |
user id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_nb_stars [line 472]
int md_get_nb_stars(
int $id_user, resource $dbhr, resource $dbhw)
|
|
Description : Get the number of stars associated with a given user
Tags:
Parameters
| int |
$id_user |
user id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_new_topic [line 1744]
resource md_get_new_topic(
string $current_forum, bool $use_current_db, int $cat, int $idu, int $id_sujet_max, resource $dbhr, resource $dbhw, bool $get_resolved_infos)
|
|
Description : Get the list of new topics created after the given topic id
Tags:
Parameters
| string |
$current_forum |
db name of the forum |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| int |
$cat |
cat number |
| int |
$idu |
check topics of the given user id |
| int |
$id_sujet_max |
show new topic created after this topic |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| bool |
$get_resolved_infos |
|
md_get_poll_expire [line 391]
array md_get_poll_expire(
bool $use_current_db, string $current_forum, int $cat, int $topic_id, resource $dbhr, resource $dbhw)
|
|
Description : Get informations about the expiration of the poll associated with the given topic id
Tags:
Parameters
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| string |
$current_forum |
db name of the forum |
| int |
$cat |
current cat number |
| int |
$topic_id |
topic id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_poll_infos [line 2979]
array md_get_poll_infos(
string $current_forum, bool $use_current_db, int $cat, int $topic_id, resource $dbhr, resource $dbhw)
|
|
Description : Return poll information associated with a given topic id
Tags:
Parameters
| string |
$current_forum |
db name of the forum |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| int |
$cat |
current cat number |
| int |
$topic_id |
topic id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_poll_result [line 2933]
resource md_get_poll_result(
string $current_forum, bool $use_current_db, int $cat, int $topic_id, resource $dbhr, resource $dbhw)
|
|
Description : Return the poll results associated with a given topic id
Tags:
Parameters
| string |
$current_forum |
db name of the forum |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| int |
$cat |
current cat number |
| int |
$topic_id |
topic id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_post_quick_view [line 5926]
array md_get_post_quick_view(
bool $use_current_db, string $current_forum, string $cat, int $topic_id, int $post_id, int $num_char, resource $dbhr, resource $dbhw)
|
|
Description : Get the x firsts chars of a message in a topic + the id of the author
Tags:
Parameters
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| string |
$current_forum |
db name of the forum |
| string |
$cat |
current cat number (either an integer or 'prive' for private message) |
| int |
$topic_id |
topic id |
| int |
$post_id |
post id |
| int |
$num_char |
number of chars to get |
| resource |
$dbhw |
db link for master servers |
| resource |
$dbhr |
db link for slave servers (if any) |
md_get_post_short_infos [line 1903]
array md_get_post_short_infos(
string $current_forum, bool $use_current_db, string $cat, int $numrep, resource $dbhr, resource $dbhw)
|
|
Description : Return basic information about a given post
Tags:
Parameters
| string |
$current_forum |
db name of the forum |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| string |
$cat |
current cat number (either an integer or 'prive' for private message) |
| int |
$numrep |
post id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_private_maxnumrep [line 4203]
int md_get_private_maxnumrep(
int $topic_id, int $idu, resource $dbhr, resource $dbhw)
|
|
Description : Return the max post_id of a given private topic
Tags:
Parameters
| int |
$topic_id |
topic id |
| int |
$idu |
user id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_private_multi_quote_infos [line 2307]
resource md_get_private_multi_quote_infos(
string $quotes, int $idu, resource $dbhr, resource $dbhw)
|
|
Description : Get basic infos from a list of private topics
Tags:
Parameters
| string |
$quotes |
list of id_topic separated by a comma |
| int |
$idu |
user id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_private_pseudo_unread [line 3183]
string md_get_private_pseudo_unread(
int $idu, int $topic_id, resource $dbhr)
|
|
Description : Return the list of pseudo which has not yet read the private topic (separated by comma)
Tags:
Parameters
| int |
$idu |
user id |
| int |
$topic_id |
topic id |
| resource |
$dbhr |
db link for slave servers (if any) |
md_get_private_title [line 4188]
string md_get_private_title(
int $topic_id, resource $dbhr, resource $dbhw)
|
|
Description : Get the title of the given private topic
Tags:
Parameters
| int |
$topic_id |
topic id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_private_topic [line 4030]
resource md_get_private_topic(
int $idu, int $index_of_first_topic, int $topicParPage, resource $dbhr, resource $dbhw)
|
|
Description : Return the private topic of the given user
Tags:
Parameters
| int |
$idu |
user id |
| int |
$index_of_first_topic |
begin the listing at this # |
| int |
$topicParPage |
number of topic per page |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_private_topic_content [line 2337]
array md_get_private_topic_content(
int $topic_id, int $start, int $postParPage, int $gotfirst, int $gotnextpage, string $post_filter, bool $citationActive, bool $get_signature, resource $dbhr, resource $dbhw, [int $number_rep = 0])
|
|
Description : Get private topic infos
Tags:
Parameters
| int |
$topic_id |
topic id ; |
| int |
$start |
number of post start |
| int |
$postParPage |
number of posts per page |
| int |
$gotfirst |
set to 0 |
| int |
$gotnextpage |
set to 0 |
| string |
$post_filter |
list of post_id to be displayed, separated by a comma |
| bool |
$citationActive |
return the user citation if set to 1, an empty string otherwise |
| bool |
$get_signature |
return the user signature if set to 1, an empty string otherwise |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| int |
$number_rep |
expected number of posts |
md_get_private_topic_content_short [line 2412]
array md_get_private_topic_content_short(
int $topic_id, int $start, int $postParPage, int $gotfirst, int $gotnextpage, resource $dbhr, resource $dbhw)
|
|
Description : Get private topic short infos
Tags:
Parameters
| int |
$topic_id |
topic id ; |
| int |
$start |
number of post start |
| int |
$postParPage |
number of posts per page |
| int |
$gotfirst |
set to 0 |
| int |
$gotnextpage |
set to 0 |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_pseudo [line 4936]
string md_get_pseudo(
int $idu, resource $dbhr, resource $dbhw, [bool $use_cache = 0])
|
|
Description : Get the pseudo with an user id
Tags:
Parameters
| int |
$idu |
id user |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| bool |
$use_cache |
|
md_get_pseudo_and_status [line 4921]
array md_get_pseudo_and_status(
int $idu, resource $dbhr, resource $dbhw)
|
|
Description : Get the pseudo and status associated with an user id
Tags:
Parameters
| int |
$idu |
id user |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_pseudo_cookie [line 1692]
array md_get_pseudo_cookie(
string $current_forum, int $cat, int $user_id, bool $use_current_db, resource $dbhr, resource $dbhw, [bool $temp = '0'])
|
|
Description : Get infos about last topic marked as old
Tags:
Parameters
| string |
$current_forum |
db name of the forum |
| int |
$cat |
cat number |
| int |
$user_id |
check topic of the given user_id |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| bool |
$temp |
|
md_get_rep_count_in_cat [line 3817]
int md_get_rep_count_in_cat(
int $target_cat, bool $use_current_db, string $forum_name, resource $dbhr, resource $dbhw)
|
|
Description : Return the number of post in a given cat
Tags:
Parameters
| int |
$target_cat |
cat id |
| bool |
$use_current_db |
change the current db to forum_$forum_name if set to 0 |
| string |
$forum_name |
db name of the forum |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_star_rating [line 6117]
array md_get_star_rating(
int $iduser, int $iduview, resource $dbhr, resource $dbhw)
|
|
Description : Get the Star Rating Display
Tags:
Parameters
| int |
$iduser |
iduser for star rating |
| int |
$iduview |
iduser to show |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_star_rating_infos [line 6152]
array md_get_star_rating_infos(
int $idsite, resource $dbhr, resource $dbhw)
|
|
Description : Get the Star Rating Infos
Tags:
Parameters
| int |
$idsite |
idsite to show |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_sum_and_max_poll [line 2955]
array md_get_sum_and_max_poll(
string $current_forum, bool $use_current_db, int $cat, int $topic_id, resource $dbhr, resource $dbhw)
|
|
Description : Return the sum of results and max value for a poll with a given topic id
Tags:
Parameters
| string |
$current_forum |
db name of the forum |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| int |
$cat |
current cat number |
| int |
$topic_id |
topic id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_topics [line 4556]
resource md_get_topics(
bool $orderby_creation, int $subcat, int $idu, string $current_forum, bool $use_current_db, bool $check_vip, int $cat, bool $poll, int $index_of_first_topic, int $topicParPage, resource $dbhr, resource $dbhw, int $result_count, [int $subcatgroup = 0], [boot $get_resolved_infos = 0])
|
|
Description : Get a list of topics
Tags:
Parameters
| bool |
$orderby_creation |
if set to true, order the topic list by date, instead of (sticky,max_post_id) |
| int |
$subcat |
return the topics from this subcat; set to NULL for no subcat filter |
| int |
$idu |
id user; use to get the flag info associated to a topic |
| string |
$current_forum |
db name of the forum |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| bool |
$check_vip |
check if a vip user has posted in a topic if set to true |
| int |
$cat |
current cat number |
| bool |
$poll |
only return poll if set to true |
| int |
$index_of_first_topic |
offset of topic start |
| int |
$topicParPage |
number of topic per page |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| int |
$result_count |
total nb of topic in the cat/subcat |
| int |
$subcatgroup |
|
| boot |
$get_resolved_infos |
|
md_get_topics_in_trash [line 4351]
resource md_get_topics_in_trash(
bool $post_in_trash, string $current_forum, bool $use_current_db, int $cat, bool $poll, int $index_of_first_topic, int $topicParPage, resource $dbhr, resource $dbhw, [bool $get_resolved_infos = 0])
|
|
Description : Get a list of topics in trash / topics which contain posts in the trash
Tags:
Parameters
| bool |
$post_in_trash |
if set to 1, it returns the topics which contain posts in the trash |
| string |
$current_forum |
db name of the forum |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| int |
$cat |
current cat number |
| bool |
$poll |
only return poll if set to true |
| int |
$index_of_first_topic |
offset of topic start |
| int |
$topicParPage |
number of topic per page |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| bool |
$get_resolved_infos |
|
md_get_topics_sticky [line 4461]
resource md_get_topics_sticky(
bool $orderby_creation, int $subcat, int $idu, string $current_forum, bool $use_current_db, bool $check_vip, int $cat, bool $poll, int $index_of_first_topic, int $topicParPage, resource $dbhr, resource $dbhw, int $result_count, [int $subcatgroup = 0], [boot $get_resolved_infos = 0])
|
|
Description : Get a list of topics
Tags:
Parameters
| bool |
$orderby_creation |
if set to true, order the topic list by date, instead of (sticky,max_post_id) |
| int |
$subcat |
return the topics from this subcat; set to NULL for no subcat filter |
| int |
$idu |
id user; use to get the flag info associated to a topic |
| string |
$current_forum |
db name of the forum |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| bool |
$check_vip |
check if a vip user has posted in a topic if set to true |
| int |
$cat |
current cat number |
| bool |
$poll |
only return poll if set to true |
| int |
$index_of_first_topic |
offset of topic start |
| int |
$topicParPage |
number of topic per page |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| int |
$result_count |
total nb of topic in the cat/subcat |
| int |
$subcatgroup |
|
| boot |
$get_resolved_infos |
|
md_get_topic_content [line 2530]
array md_get_topic_content(
string $current_forum, bool $use_current_db, int $cat, int $topic_id, bool $moderateur, int $start, int $postParPage, bool $trash_post, int $gotfirst, int $gotnextpage, bool $quote_only, int $numreponse, string $post_filter, bool $citationActive, bool $get_signature, resource $dbhr, resource $dbhw, [int $number_rep = 0])
|
|
Description : Get normal topic infos
Tags:
Parameters
| string |
$current_forum |
db name of the forum |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| int |
$cat |
current cat number |
| int |
$topic_id |
topic id |
| bool |
$moderateur |
set to 1 if the user has moderator right |
| int |
$start |
number of post start |
| int |
$postParPage |
number of posts per page |
| bool |
$trash_post |
get the topic in the trash |
| int |
$gotfirst |
set to 0 |
| int |
$gotnextpage |
set to 0 |
| bool |
$quote_only |
display only quotes of $numreponse |
| int |
$numreponse |
post id, only used if $quote_only is set to 1 |
| string |
$post_filter |
list of post_id to be displayed, separated by a comma |
| bool |
$citationActive |
return the user citation if set to 1, an empty string otherwise |
| bool |
$get_signature |
return the user signature if set to 1, an empty string otherwise |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| int |
$number_rep |
expected number of posts |
md_get_topic_content_short [line 2458]
array md_get_topic_content_short(
string $current_forum, bool $use_current_db, int $cat, int $topic_id, int $start, int $postParPage, int $gotfirst, int $gotnextpage, resource $dbhr, resource $dbhw)
|
|
Description : Get normal topic short infos
Tags:
Parameters
| string |
$current_forum |
db name of the forum |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| int |
$cat |
current cat number |
| int |
$topic_id |
topic id ; |
| int |
$start |
number of post start |
| int |
$postParPage |
number of posts per page |
| int |
$gotfirst |
set to 0 |
| int |
$gotnextpage |
set to 0 |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_topic_infos [line 5087]
array md_get_topic_infos(
bool $use_current_db, string $current_forum, int $cat, int $subcat, int $topic_id, bool $in_trash, bool $get_in_cache, resource $dbhr, resource $dbhw)
|
|
Description : Get topic basic informations
Tags:
Parameters
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| string |
$current_forum |
db name of the forum |
| int |
$cat |
current cat number |
| int |
$subcat |
subcat id |
| int |
$topic_id |
topic id |
| bool |
$in_trash |
search the topic in the trash |
| bool |
$get_in_cache |
unused, set to 0 |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_topic_num_private [line 4217]
int md_get_topic_num_private(
int $numreponse, resource $dbhr, resource $dbhw)
|
|
Description : Return the private topic id associate with the given post id
Tags:
Parameters
| int |
$numreponse |
post id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_topic_title [line 5026]
string md_get_topic_title(
bool $use_current_db, string $current_forum, int $cat, int $topic_id, bool $in_trash, resource $dbhr, resource $dbhw)
|
|
Description : Get a topic title
Tags:
Parameters
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| string |
$current_forum |
db name of the forum |
| int |
$cat |
current cat number |
| int |
$topic_id |
topic id |
| bool |
$in_trash |
search the topic in the trash |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_topic_title_and_subcat [line 5054]
array md_get_topic_title_and_subcat(
bool $use_current_db, string $current_forum, int $cat, int $topic_id, bool $in_trash, bool $cache, resource $dbhr, resource $dbhw)
|
|
Description : Get a topic title, id of subcat and rewritten title
Tags:
Parameters
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| string |
$current_forum |
db name of the forum |
| int |
$cat |
current cat number |
| int |
$topic_id |
topic id |
| bool |
$in_trash |
search the topic in the trash |
| bool |
$cache |
Search before in cachetable |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_top_posters [line 6189]
resource md_get_top_posters(
int $nbrep, int $idsite, resource $dbhr, resource $dbhw)
|
|
Description : Get the Top Posted messages member since 10 days
Tags:
Parameters
| int |
$nbrep |
Number of top in reponse |
| int |
$idsite |
idsite to show |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_top_star_rating [line 6168]
resource md_get_top_star_rating(
int $nbrep, int $idsite, resource $dbhr, resource $dbhw)
|
|
Description : Get the Star Rating Top membre
Tags:
Parameters
| int |
$nbrep |
Number of top in reponse |
| int |
$idsite |
idsite to show |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_top_viewed_profil [line 6207]
resource md_get_top_viewed_profil(
int $nbrep, int $nbday, int $idsite, resource $dbhr, resource $dbhw)
|
|
Description : Get the Top viewved profil member
Tags:
Parameters
| int |
$nbrep |
Number of top in reponse |
| int |
$nbday |
Number of days to show result (1 between 30 days) |
| int |
$idsite |
idsite to show |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_total_messages [line 3916]
int md_get_total_messages(
resource $dbhr, resource $dbhw, [int $forum_id = 0])
|
|
Description : Return the number of posts on the whole board or a given forum
Tags:
Parameters
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| int |
$forum_id |
|
md_get_total_registered [line 3835]
int md_get_total_registered(
resource $dbhr, resource $dbhw, [int $forum_id = NULL])
|
|
Description : Return the number of register user to the given forum
Tags:
Parameters
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| int |
$forum_id |
forum id; set to NULL if you want the whole number of registered users |
md_get_url_cat_name [line 5846]
string md_get_url_cat_name(
string $current_forum, bool $use_current_db, int $cat, resource $dbhr, resource $dbhw)
|
|
Description : Get the url cat name associated with the given id_forum and id_cat
Tags:
Parameters
| string |
$current_forum |
current forum name |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| int |
$cat |
cat id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_user_groups [line 1714]
array md_get_user_groups(
resource $dbhr, resource $dbhw, int $user_id)
|
|
Description : Return the list of groups an user belong to
Tags:
Parameters
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| int |
$user_id |
check topic of the given user_id |
md_get_user_infos [line 2078]
array md_get_user_infos(
string $current_forum, bool $use_current_db, bool $one_database, string $cat, int $moderateur, int $ida, int $topic_id, bool $reduced_infos, int $idu, bool $check_vip, bool $visible, bool $smilies_in_sign, bool $pictures_in_sign, string $certif, string $grade, bool $onlineNA, &$textsignature, &$author, $writer_status, &$pseudo_cache1, resource $dbhr, resource $dbhw, [bool $star_activated = 0], [bool $star_rating_forum = 0], string $textsignature, string $author, string $status, array $pseudo_cache1)
|
|
Description : Get user infos displayed in a topic
Tags:
Parameters
| string |
$current_forum |
db name of the forum |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| bool |
$one_database |
forum is configured to only use one database |
| string |
$cat |
current cat number (either an integer or 'prive' for private message) |
| int |
$moderateur |
moderator status |
| int |
$ida |
id of the user we want the infos |
| int |
$topic_id |
topic id ; only needed if $check_vip is set to 1 |
| bool |
$reduced_infos |
return reduced info (pseudo only) if set to 1 |
| int |
$idu |
id of the loggued user |
| bool |
$check_vip |
check if a user should be considered as VIP inside the given topic |
| bool |
$visible |
visible status of the cat |
| bool |
$smilies_in_sign |
filter smilies in the user signature if set to 0 |
| bool |
$pictures_in_sign |
filter pictures in the user signature if set to 0 |
| string |
$certif |
citation set by the admin associated with a user profile |
| string |
$grade |
grade associated with a user profile |
| bool |
$onlineNA |
display online status to N/A if set to 1 |
| string |
$textsignature |
return user signature |
| string |
$author |
return user pseudo |
| string |
$status |
citation set by the user |
| array |
$pseudo_cache1 |
cache used to return user profile infos |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| bool |
$star_activated |
default to 0, return star infos if set to 1 |
| bool |
$star_rating_forum |
default to 0, return star infos if set to 1 |
| |
&$textsignature |
|
| |
&$author |
|
| |
$writer_status |
|
| |
&$pseudo_cache1 |
|
md_get_user_last_day_log [line 6238]
string md_get_user_last_day_log(
int $iduser, resource $dbhr, resource $dbhw)
|
|
Description : Get the last day of display intermediate page
Tags:
Parameters
| int |
$iduser |
id of member |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_user_related_topic [line 2868]
resource md_get_user_related_topic(
string $current_forum, bool $use_current_db, int $cat, int $topic_id, resource $dbhr, resource $dbhw)
|
|
Description : Return the titles and topic ids of topics to be read associated with the given topic_id
Tags:
Parameters
| string |
$current_forum |
db name of the forum |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| int |
$cat |
current cat number |
| int |
$topic_id |
topic id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_user_related_topic_id [line 2845]
array md_get_user_related_topic_id(
string $current_forum, bool $use_current_db, int $cat, int $topic_id, resource $dbhr, resource $dbhw)
|
|
Description : Return the list of topics to be read associated with the given topic_id
Tags:
Parameters
| string |
$current_forum |
db name of the forum |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| int |
$cat |
current cat number |
| int |
$topic_id |
topic id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_get_vignette_fullweight [line 1927]
int md_get_vignette_fullweight(
int $id_site, resource $dbhr, resource $dbhw)
|
|
Description : Return the max weight of a thumbnail
Tags:
Parameters
| int |
$id_site |
forum id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_has_blabla_sanction [line 5204]
bool md_has_blabla_sanction(
bool $use_current_db, string $current_forum, int $idu, int $cat, resource $dbhr, resource $dbhw)
|
|
Description : Check if a user has the "blabla" sanction
Tags:
Parameters
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| string |
$current_forum |
db name of the forum |
| int |
$idu |
user id |
| int |
$cat |
current cat number |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_has_picture_sanction [line 5160]
bool md_has_picture_sanction(
bool $use_current_db, string $current_forum, int $idu, int $cat, resource $dbhr, resource $dbhw)
|
|
Description : Check if a user is not allowed to post pictures
Tags:
Parameters
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| string |
$current_forum |
db name of the forum |
| int |
$idu |
user id |
| int |
$cat |
current cat number |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_has_sanction [line 5135]
bool md_has_sanction(
bool $use_current_db, string $current_forum, int $idu, int $cat, resource $dbhr, resource $dbhw)
|
|
Description : Check if a user has a sanction
Tags:
Parameters
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| string |
$current_forum |
db name of the forum |
| int |
$idu |
user id |
| int |
$cat |
current cat number |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_has_sig_sanction [line 5182]
bool md_has_sig_sanction(
bool $use_current_db, string $current_forum, int $idu, resource $dbhr, resource $dbhw, int $cat)
|
|
Description : Check if a user is not allowed to have a signature
Tags:
Parameters
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| string |
$current_forum |
db name of the forum |
| int |
$idu |
user id |
| int |
$cat |
current cat number |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_implode_topics [line 1518]
void md_implode_topics(
int $id_site, array $topics_src, array $cat_src, int $topic_dest, int $cat_dest, string $current_forum, bool $use_current_db, resource $dbhr, resource $dbhw, [int $idu = ''], [string $user = ''], [string $remote = ''])
|
|
Description : Merge several topics together
Parameters
| int |
$id_site |
forum id |
| array |
$topics_src |
array of source topics id |
| array |
$cat_src |
array of source cat id |
| int |
$topic_dest |
id of the target topic |
| int |
$cat_dest |
id of the target cat |
| string |
$current_forum |
db name of the forum |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| int |
$idu |
id user |
| string |
$user |
user name |
| string |
$remote |
user ip |
md_increase_view_count [line 3474]
void md_increase_view_count(
string $current_forum, int $cat, int $subcat, int $topic_id, bool $use_current_db, resource $dbhr, resource $dbhw)
|
|
Description : Increment the view count of a topic
Parameters
| string |
$current_forum |
db name of the forum |
| int |
$cat |
cat id |
| int |
$subcat |
subcat id |
| int |
$topic_id |
topic id |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_insert_in_guest_table [line 3150]
void md_insert_in_guest_table(
string $remote, int $id_site, resource $dbhr, resource $dbhw)
|
|
Description : Insert the user ip in the guest user online table
Parameters
| string |
$remote |
user ip |
| int |
$id_site |
forum id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_insert_in_online_table [line 3133]
void md_insert_in_online_table(
int $idu, int $cat, int $id_site, resource $dbhr, resource $dbhw)
|
|
Description : Insert the given user id in the user online table
Parameters
| int |
$idu |
user id |
| int |
$cat |
cat id |
| int |
$id_site |
forum id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_is_admin [line 4008]
bool md_is_admin(
$idforum, string $user, resource $dbhr, int $idsite, bool $use_current_db)
|
|
Description : Check if the given user name is admin on the given forum
Tags:
Parameters
| int |
$idsite |
id of forum |
| string |
$user |
user name |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| resource |
$dbhr |
db link for slave servers (if any) |
| |
$idforum |
|
md_is_banned [line 5288]
bool md_is_banned(
bool $use_current_db, string $current_forum, int $idu, int $cat, resource $dbhr, resource $dbhw)
|
|
Description : Check if a user is banned
Tags:
Parameters
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| string |
$current_forum |
db name of the forum |
| int |
$idu |
user id |
| int |
$cat |
current cat number |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_is_mail_activated [line 4324]
bool md_is_mail_activated(
string $current_forum, bool $use_current_db, int $topic_id, int $cat, int $idu, resource $dbhr, resource $dbhw)
|
|
Description : Check if the mail notification is activated for the given user and topic
Tags:
Parameters
| string |
$current_forum |
db name of the forum |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| int |
$topic_id |
topic id |
| int |
$cat |
id cat |
| int |
$idu |
id user |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_is_moderateur [line 3971]
bool md_is_moderateur(
string $current_forum, string $user, int $cat, bool $use_current_db, resource $dbhr, resource $dbhw, [int $idforum = 0])
|
|
Description : Check if the given user name is moderator on the given cat
Tags:
Parameters
| string |
$current_forum |
db name of the forum |
| string |
$user |
user name |
| int |
$cat |
id cat; set to NULL to check on the current forum |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| int |
$idforum |
forum id (if given, override $current_forum) |
md_is_newly_registered [line 3375]
bool md_is_newly_registered(
int $idu, resource $dbhr, resource $dbhw)
|
|
Description : Check if a user is newly registered (less than 50 posts and less than 15 days on the forum)
Tags:
Parameters
| int |
$idu |
user id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_is_private_mail_activated [line 4306]
bool md_is_private_mail_activated(
int $topic_id, int $idu, resource $dbhr, resource $dbhw)
|
|
Description : Check if the mail notification is activated for the given user and private topic
Tags:
Parameters
| int |
$topic_id |
topic id |
| int |
$idu |
user id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_is_rss_allowed [line 1591]
bool md_is_rss_allowed(
string $current_forum, int $cat, bool $use_current_db, resource $dbhr, resource $dbhw)
|
|
Description : Check if rss display is allowed
Tags:
Parameters
| string |
$current_forum |
db name of the forum |
| int |
$cat |
cat number |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_is_subcat_hidden [line 3282]
int md_is_subcat_hidden(
int $subcatid, string $current_forum, resource $dbhr)
|
|
Description : Get if subcat is hidden in topic list
Tags:
Parameters
| int |
$subcatid |
id of the subcat |
| string |
$current_forum |
db name of the forum |
| resource |
$dbhr |
db link for slave servers (if any) |
md_is_subcat_hiddenB [line 3293]
void md_is_subcat_hiddenB(
$subcatid, $one_database, $current_forum, $dbhr)
|
|
Parameters
| |
$subcatid |
|
| |
$one_database |
|
| |
$current_forum |
|
| |
$dbhr |
|
md_loguer [line 1445]
void md_loguer(
bool $use_current_db, string $current_forum, int $id_author, int $id_victime, int $id_action, string $info, date $dateban, resource $dbhw)
|
|
Description : Insert an action to the admin log
Parameters
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| string |
$current_forum |
db name of the forum |
| int |
$id_author |
id of the user which has done the action |
| int |
$id_victime |
id of the poor victime of this action |
| int |
$id_action |
id of the action - 1 => "No picture directory"
- 2 => "Allow picture directory"
- 3 => "Delete last messages"
- 4 => "blablabla"
- 5 => "Sent in a teletubbize cure"
- 6 => "Came back from the teletubbize cure"
- 7 => "Delete threads without posts"
- 8 => "ban with mass delete"
- 9 => "ban"
- 10 => "Can't post images"
- 11 => "Can't display signature"
- 12 => "Can't post smileys"
- 13 => "unban"
- 14 => "Can post images"
- 15 => "Can display signature"
- 16 => "Can post smileys"
- 17 => "Unblablabla"
- 18 => "Delete a thread"
- 19 => "Delete a post"
- 20 => "massdelete some posts in a thread"
- 21 => "purge a thread"
- 22 => "suppress in a thread after a position"
- 23 => "purge the trash"
- 24 => "restore a thread"
- 25 => "close a thread"
- 26 => "reopen a thread"
- 27 => "move a thread"
- 28 => "Restore a message"
- 29 => "A priori moderation : delete a thread"
- 30 => "A priori moderation : delete a post"
- 31 => "A priori moderation : validate a thread"
- 32 => "A priori moderation : validate a post"
- 34 => "Update password of an user"
- 35 => "Change author of topic or message"
- 36 => "Change VIP list"
- 37 => "Borrow pseudo"
- 38 => "Edit profile"
- 39 => "Edit a message"
- 50 => "Hide user posts"
- 51 => "Unhide user posts"
|
| string |
$info |
information about the action |
| date |
$dateban |
date of the action |
| resource |
$dbhw |
db link for master servers |
md_maj_modo [line 3084]
void md_maj_modo(
bool $modrewrite, bool $use_current_db, resource $dbhr, resource $dbhw)
|
|
Description : Update the moderator list
Parameters
| bool |
$modrewrite |
set to 1 to enable the modrewrite |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_manage_intermediate_page [line 6266]
display md_manage_intermediate_page(
int $iduser, date $date, int $idsite, resource $dbhr, resource $dbhw)
|
|
Description : Intermediate page display once by day
Tags:
Parameters
| int |
$iduser |
id of member |
| date |
$date |
date of the day in format %Y%m%d |
| int |
$idsite |
idsite to get intermediate page |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_nb_messages [line 5480]
int md_nb_messages(
date $begin, date $end, resource $dbhr, resource $dbhw)
|
|
Description : Get the total number of posts between given dates
Tags:
Parameters
| date |
$begin |
begin date (YYYY-MM-DD) |
| date |
$end |
end date (YYYY-MM-DD) |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_points2stars [line 427]
int md_points2stars(
int $point)
|
|
Description : Convert number of points to star level
Tags:
Parameters
| int |
$point |
number of points |
md_posting_sanctions [line 5232]
void md_posting_sanctions(
bool $use_current_db, string $pseudo, string $current_forum, &$sanction_blabla, &$sanction_sm, &$sanction_im, string $data, int $idu, int $cat, resource $dbhr, resource $dbhw, [boolean $return_message = false], bool $sanction_blabla, bool $sanction_sm, bool $sanction_im)
|
|
Description : Return infos about user sanctions. Exit / redirect in case of ban / teletubbies sanction.
Parameters
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| string |
$pseudo |
user pseudo |
| string |
$current_forum |
db name of the forum |
| bool |
$sanction_blabla |
set to 1 if the user has the "blabla" sanction |
| bool |
$sanction_sm |
set to 1 if the user is not allowed to post smilies |
| bool |
$sanction_im |
set to 1 if the user is not allowed to post images |
| string |
$data |
leave it empty |
| int |
$idu |
user id |
| int |
$cat |
current cat number |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| boolean |
$return_message |
true = return message instead md_html_page |
| |
&$sanction_blabla |
|
| |
&$sanction_sm |
|
| |
&$sanction_im |
|
md_post_to_trash [line 6474]
Nothing md_post_to_trash(
bool $use_current_db, string $current_forum, int $cat, int $post, int $iduser, int $trash, resource $dbhr, resource $dbhw)
|
|
Description : Put topic in trash or purge if in trash
Parameters
| bool |
$use_current_db |
change the current db to forum_$forum_name if set to 0 |
| string |
$current_forum |
db name of the forum |
| int |
$cat |
ID of the section |
| int |
$post |
ID of the topic |
| int |
$iduser |
ID of the author of topic. Use only if cat is 'prive' (MP) |
| int |
$trash |
specify if topic is in trash (0 = no/1 = yes) |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_process_url_and_subcat [line 3499]
void md_process_url_and_subcat(
&$subcat_array, string $forum_rewritten_name, string $url_nom, bool $modrewrite, int $target_cat, &$url_forum_simple, &$subc, &$url_sondage, bool $default, [int $target_subcat = ''], [string $url_target_subcat_nom = ''], array $subcat_array, string $url_forum_simple, string $subc, string $url_sondage)
|
|
Description : Construct url for a given cat and its associated subcat
Parameters
| array |
$subcat_array |
array returned by md_get_forum_subcat_infos |
| string |
$forum_rewritten_name |
rewritten name of the forum |
| string |
$url_nom |
rewritten name of the cat |
| bool |
$modrewrite |
set to 1 to activate the modrewrite |
| int |
$target_cat |
cat the forum should redirect to |
| string |
$url_forum_simple |
return the constructed url to the cat |
| string |
$subc |
return the list of all the subcat with the proper url associated |
| string |
$url_sondage |
return the constructed url to the cat with poll only |
| bool |
$default |
set to 1 if it's the default forum |
| int |
$target_subcat |
|
| string |
$url_target_subcat_nom |
|
| |
&$subcat_array |
|
| |
&$url_forum_simple |
|
| |
&$subc |
|
| |
&$url_sondage |
|
md_put_user_last_day_log [line 6252]
void md_put_user_last_day_log(
$iduser, $date, resource $dbhr, resource $dbhw, int $idsite)
|
|
Description : Put the date into display intermediate page
Parameters
| int |
$idsite |
idsite to get intermediate page |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| |
$iduser |
|
| |
$date |
|
md_reopen_poll [line 371]
void md_reopen_poll(
bool $use_current_db, string $current_forum, int $cat, int $topic_id, resource $dbhr, resource $dbhw)
|
|
Description : Reopen the poll associated with the given topic id
Parameters
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| string |
$current_forum |
db name of the forum |
| int |
$cat |
current cat number |
| int |
$topic_id |
topic id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_restore_post [line 6534]
Nothing md_restore_post(
bool $use_current_db, string $current_forum, int $cat, int $post, resource $dbhr, resource $dbhw)
|
|
Description : Restore topic in trash in a section
Parameters
| bool |
$use_current_db |
change the current db to forum_$forum_name if set to 0 |
| string |
$current_forum |
db name of the forum |
| int |
$cat |
ID of the section |
| int |
$post |
ID of the topic |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_set_allread [line 1665]
void md_set_allread(
resource $dbhr, resource $dbhw, bool $use_current_db, string $current_forum, int $cat, int $user_id, [bool $temp = '0'])
|
|
Description : Mark all the topics as read
Parameters
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| string |
$current_forum |
db name of the forum |
| int |
$cat |
cat number |
| int |
$user_id |
check topic of the given user_id |
| bool |
$temp |
|
md_set_topic_subcat [line 3414]
Nothing md_set_topic_subcat(
string $current_forum, bool $use_current_db, $idcat, $idsubcat, int $idtopic, resource $dbhr, resource $dbhw, int $cat, int $subcat)
|
|
Description : Set subcat of topic
Parameters
| string |
$current_forum |
db name of the forum |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| int |
$cat |
cat id |
| int |
$subcat |
subcat id |
| int |
$idtopic |
topic id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
| |
$idcat |
|
| |
$idsubcat |
|
md_stars2image [line 416]
string md_stars2image(
int $stars)
|
|
Description : Convert star number value (from 0 to 5) to the corresponding image
Tags:
Parameters
| int |
$stars |
number of stars, from 0 to 5 |
md_stars2points [line 442]
int md_stars2points(
$stars, int $point)
|
|
Description : Convert star level to number of points
Tags:
Parameters
| int |
$point |
stars level |
| |
$stars |
|
md_update_cat_lastpost_infos [line 136]
void md_update_cat_lastpost_infos(
bool $use_current_db, string $current_forum, string $cat, resource $dbhw, [bool $nocache = 0])
|
|
Description : update the cat info with the last topic infos. To be called after a delete of posts inside a topic or a delete of topic
Parameters
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| string |
$current_forum |
db name of the forum |
| string |
$cat |
current cat number (either an integer or 'prive' for private message) |
| resource |
$dbhw |
db link for master servers |
| bool |
$nocache |
|
md_update_db [line 6021]
void md_update_db(
string $old_pseudo, string $new_pseudo, resource $dbhr, resource $dbhw)
|
|
Description : Rename a pseudo in the db
Parameters
| string |
$old_pseudo |
|
| string |
$new_pseudo |
|
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_update_edit_right [line 5572]
void md_update_edit_right(
bool $use_current_db, string $current_forum, int $cat, int $post_id, bool $allow_edit, resource $dbhw)
|
|
Description : Update the edit authorisation for the owner of a given post
Parameters
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| string |
$current_forum |
db name of the forum |
| int |
$cat |
cat id |
| int |
$post_id |
post id |
| bool |
$allow_edit |
if set to 1, allow edition, otherwise do not allow. |
| resource |
$dbhw |
db link for master servers |
md_update_flags [line 2016]
void md_update_flags(
string $current_forum, bool $use_current_db, string $cat, int $id, int $cookie_numreponse, int $position, int $page, int $ref, int $postParPage, int $nbdrap, int $mem_numreponse, int $topic_id, resource $dbhr, resource $dbhw)
|
|
Description : Update user flag with the given informations
Parameters
| string |
$current_forum |
db name of the forum |
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| string |
$cat |
current cat number (either an integer or 'prive' for private message) |
| int |
$id |
user id |
| int |
$cookie_numreponse |
currently recorded post id in the flag; NULL if no record |
| int |
$position |
position inside a topic |
| int |
$page |
page inside a topic |
| int |
$ref |
position inside the current page |
| int |
$postParPage |
number of posts displayed per page |
| int |
$nbdrap |
max number of flag allowed by type and by user |
| int |
$mem_numreponse |
new post id which should be saved in the flag |
| int |
$topic_id |
topic id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_update_sanctions [line 5311]
void md_update_sanctions(
bool $use_current_db, string $current_forum, resource $dbhr, resource $dbhw)
|
|
Description : Update automatically the sanctions (if they have now expired)
Parameters
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| string |
$current_forum |
db name of the forum |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_update_starpoint [line 460]
void md_update_starpoint(
int $id_user, int $starpoint, resource $dbhr, resource $dbhw)
|
|
Description : Update the star point in the db
Parameters
| int |
$id_user |
user id |
| int |
$starpoint |
number of star points |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
md_update_topic_lastpost_infos [line 63]
void md_update_topic_lastpost_infos(
bool $use_current_db, string $current_forum, string $cat, int $topic_id, int $deleted_rows, resource $dbhw, resource $dbhr)
|
|
Description : update the topic info with the last poster infos. To be called after a delete of posts inside a topic
Parameters
| bool |
$use_current_db |
change the current db to forum_$current_forum if set to 0 |
| string |
$current_forum |
db name of the forum |
| string |
$cat |
current cat number (either an integer or 'prive' for private message) |
| int |
$topic_id |
topic id |
| int |
$deleted_rows |
number of deleted posts inside the topic |
| resource |
$dbhw |
db link for master servers |
| resource |
$dbhr |
db link for slave servers (if any) |
md_update_total_messages [line 3904]
void md_update_total_messages(
int $total, int $id_site, resource $dbhr, resource $dbhw)
|
|
Description : Set the number of posts for a given forum
Parameters
| int |
$total |
number of posts |
| int |
$id_site |
forum id |
| resource |
$dbhr |
db link for slave servers (if any) |
| resource |
$dbhw |
db link for master servers |
|