This is the documentation for the some of the classes used by FUDforum and explanation of what they do.
Contents |
This class is used to retrieve the user information as well to update some of the more common user data variables such as post counts, etc.
| id | (int) | User account id |
|---|---|---|
| login | (int) | Login name |
| passwd | (char 32) | Password, MD5 |
| plaintext_passwd | (char) | Password, plain text (only used during regisration) |
| name | (char) | "Real" name |
| (char) | ||
| location | (char) | Location |
| occupation | (char) | Occupation |
| interests | (char) | Interests |
| display_email | (ENUM Y/N) | Whether to hide or show user's email |
| notify | (ENUM Y/N) | Whether to select reply notification by default |
| notify_method | (ENUM ICQ/EMAIL) | How to send notifications, ICQ or E-mail |
| email_messages | (ENUM Y/N) | Whether or not other forum members can use the forum's built it mailer to send this user emails. |
| gender | (ENUM MALE/FEMALE) | Gender |
| icq | (long) | ICQ uin |
| aim | (char) | AIM id |
| yahoo | (char) | Yahoo id |
| msnm | (char) | MSN Messanger id |
| jabber | (char) | Jabber id |
| avatar | (int) | Id of the avatar if user's avatar is from the forum's avatar gallery |
| avatar_loc | (char) | URL of the avatar for remote avatars |
| avatar_approved | (ENUM(Y/N/NO) | Whether the user has an avatar is if has been approved. "NO" means no avatar |
| append_sig | (ENUM Y/N) | Whether or not to append the signature by default to every message posted |
| show_sigs | (ENUM Y/N) | Whether or not to show other people's signatures when viewing messages |
| show_avatars | (ENUM Y/N) | Whether or not to show other people's avatars |
| posts_ppg | (int) | How many messages to display per page |
| time_zone | (char) | The timezone identification string of thise user's timestamp |
| invisible_mode | (ENUM Y/N) | Whether or not to show the user on the online list, actions list |
| ignore_admin | (ENUM Y/N) | Whether to accept or decline mass emails sent by the admin |
| bday | (int) | Birthday in YYYYMMDD format |
| blocked | (ENUM Y/N) | Shows if the user has been banned or not. |
| home_page | (char) | Homepage URL |
| sig | (char) | Signature |
| bio | (char) | Biography |
| posted_msg_count | (int) | Number of messages posted by this user |
| last_visit | (int) | The UNIX timestamp of when the user has last visited the forum |
| last_event | ||
| email_conf | (ENUM Y/N) | Whether or not this account has been confirmed |
| conf_key | (char) | MD5 confirmation key |
| coppa | (ENUM Y/N) | Whether or not the owner of this account has been COPPA confirmed |
| user_image | (char) | URL to the user's image of choice |
| join_date | (int) | The UNIX timestamp of when the user has registered the forum |
| style | (int) (internal) | |
| last_read | (int) | The UNIX timestamp of the last message user had read |
| default_view | (ENUM TREE/MSG) | What is the user's default message view |
| mod_list | ||
| mod_cur | ||
| is_mod | (ENUM Y/N/A) | Whether this is a regular user (N), moderators (Y) or an admin (A) |
| level_id | (int) | The id of the level, which is based on post count, the user belongs to. |
| u_last_post_id | (int) | The id of the last post made by this user |
Retrieves a user based on a passed user id:
int get_user_by_id( int user_id )
Retrieves a user based on a passed user id, the user settings will be imported into the class.
Returns user_id on success, NULL on failure.
Sets the user's post count:
void set_post_count( int msg_count, int u_last_post_id )
The function will increase or decrease the user's post count based on the value passed by msg_count. The function will also re-calculate the id the message last message posted by the user if u_last_post_id is empty.
Mark topic as read:
void register_thread_view( int thread_id, int msg_id )
This function will mark a topic read by inserting or updating an entry inside the read table. If a msg_id is passed only messages up until msg_id will be marked read.
Mark forum as read:
void register_forum_view( int forum_id )
This function will mark a forum read.
Mark all messages read:
void mark_all_read ( )
This function will mark all messages read.
This function is deprecated and will be removed from future releases. For FUDforum 3.0.3 and higher, please use add() instead.
Adds a new user:
int add ( )
This function will create a new user based on the information stored inside the class.
Returns the id of the created user.
Retrieves a user based on user login:
int get_user_by_login( char user_login )
This function will retrieve a user based on the provided user_login.
Returns user object on success, NULL on failure.