VSNS Lemon uses MySQL tables to store all of its data. To compensate for a custom table prefix set by the user, the names of the tables are stored as constants in settings.php in the form of vsns_tablename.
When writing more queries for VSNS Lemon, take care to use the constant (i.e., use vsns_comments for the comments table) rather than the table's actual name. That way you won't have to edit the script if you decide to change your table prefixes or if you redistribute it to others.
Comment data that is not stored in the _common table.
| Field Name | Type | Notes |
|---|---|---|
| ID | INT(10) unsigned | Primary key. Relates to ID in _common. |
| article_id | INT(10) unsigned | ID of article to which the comment belongs. |
| ip | VARCHAR(15) | IP address of commenter. |
| commentemail | VARCHAR(255) | Email address of commenter. |
| website | VARCHAR(255) | URL (optional) of commenter's website. |
Contains the fields common to both articles and comments. They are combined in order to make searching easier; the search engine only has to search one table (specifically, the heading and content fields, which are indexed).
| Field Name | Type | Notes |
|---|---|---|
| ID | INT(10) unsigned | Primary key, auto increment |
| heading | VARCHAR(255) | Article titles. NULL for comments. |
| content | LONGTEXT | |
| author | VARCHAR(50) | |
| pubDate | INT(11) unsigned | UNIX timestamp |
| queue | TINYINT(1) unsigned | 0 if an article is unqueued; 1 if it is queued. |
| type | SMALLINT(3) unsigned | The type of article/comment. 0-100 means some form of article (2 = important article.) >101 means some form of comment. |
Configuration variables for VSNS Lemon.
| Field Name | Type | Notes |
|---|---|---|
| config_name | VARCHAR(255) | Variable name. |
| config_value | TEXT | Its value. |
Contains all article data not stored in _common.
| Field Name | Type | Notes |
|---|---|---|
| ID | INT(10) unsigned | Primary key. Corresponds to article ID in _common. |
| expires | DATE | Date an article expires (UNIX timestamp). |
| comments | TINYINT(1) | 0 - closed, 1 - open, 2 - password protected, 3 - comments get queued |
| password | VARCHAR(255) | Password for commenting. |
| article_password | VARCHAR(255) | Password to view article. |
| num_comments | INT(10) unsigned |