diff --git a/admin.md b/admin.md deleted file mode 100644 index 3f12794..0000000 --- a/admin.md +++ /dev/null @@ -1,15 +0,0 @@ -# Administration functions - -## Checking for updates -Once you have your forum installed it is very important that it be kept up-to-date. While Luna has a good history with security and we always aim to release any security fixes as fast as possible, it is no good if you don't apply the updates. Luna will check for updates on it's own and will notice you about them in the Backstage. It will show you a direct download link for the update. - -## Pruning -

Pruned comments, notifications and users can never be restored.

-The prune feature can be used to delete old inactive comments from your forums, notifications or inactive users. - -

For best performance, you should put the forum in maintenance mode during pruning.

- -## Rebuilding search index -If you have added, edited or removed comments manually in the database or if you are having problems searching, you should rebuild the search index. This can be accessed under the "maintenance" menu item, and basically involves looking at all the comments in your forum and indexing the words that make them up in an efficient way to facilitate fast and efficient searching. - -

For best performance, you should put the forum in maintenance mode during pruning.

\ No newline at end of file diff --git a/antispam.md b/antispam.md index 8839fee..edd0df7 100644 --- a/antispam.md +++ b/antispam.md @@ -25,7 +25,4 @@ Many spambots are able to fill out forms, making it fairly easy to create new ac * Click on the tab 'Registration' * Check the option 'Verify registrations' -You can easly remove unverified accounts through the prune options under 'Maintenance'. - -### Enable questions -Another option we strongly recommend you to customize are the questions Luna will ask when registrating a new user. By default, Luna provides a limit set of questions that will be asked at random while creating a new account, but it is always safer to also include your own questions. \ No newline at end of file +You can easly remove unverified accounts through the prune options under 'Maintenance'. \ No newline at end of file diff --git a/appearance.md b/appearance.md new file mode 100644 index 0000000..ba7502e --- /dev/null +++ b/appearance.md @@ -0,0 +1,26 @@ +# Appearance +## General +* __Accent color__: allow users to set another accent color in their profile. +* __Night mode__: allow users to enable night mode. +* __Default__: the default accent color used for the front-end for guests and new accounts. Changing the accent color won't change the color of any registered users. +* __Custom CSS__: use custom CSS to add some more styling to your theme. +* __CSS code__: the actual CSS used for you custom CSS. +* __Header background__: a background used by your theme and the Backstage. Themes need to provide support for this functionality. +* __Font Awesome Pro__: tell Luna that this board has access to Font Awesome Pro. This will also enable the "light" icon option. For more information, see [Font Awesome](fontawesome). + +## Display +* __User info__: show information about the user under the username in threads, requires theme support. +* __User comment count__: show the number of comments made in threads, profiles and user list. +* __Index settings__: show a "Mderated by" list in the forum list, requires theme support. +* __Threads per page__: the number of threads before pagination appears. +* __Comments per page__: the number of comments in a thread before pagination appears. + +## Header +* __Notifications__: show a fly-out when clicking on the notification icon, requires theme support. +* __Search__: show a search bar in the heading, requires theme support. + +## Footer +* __Statistics__: show statistics about your board in the footer, requires theme support. +* __Back to top__: show a "Back to top" link in the footer, requires theme support. +* __Copyright__: show a copyright notice in the footer. +* __Copyright content__: show the default copyright message or customize it yourself. \ No newline at end of file diff --git a/backstage.md b/backstage.md index a52c93a..bb9fe30 100644 --- a/backstage.md +++ b/backstage.md @@ -1,83 +1,71 @@ -# Using Backstage -The Backstage is the place where you can manage your board. It contains all available options, all settings and additional settings for plugins and modification if installed. - -The Backstage contains everywhere the same ellements when required. Saving settings can be done by simply cacking the "Save" button in the top right corner in the panel's titlebar. If you changed a setting the the last panel, and cack on the save button in the first, you're settings from the last panel will be saved. Either way, here's an overview off the Backstage: +# Backstage +Backstage is your hub to control your board. Anything your board can do, can be changed here. ## Backstage +The Backstage page contains all features and functions that don't have a direct impact on the working of the forum. ### Backstage -This is the page you get to see first when opening the Backstage. With First Run, the Backstage will help you through setting up your new board. You can also find notes here. +The main Backstage page shows you new reports your users have left behind. Here you can also make "Admin notes", these notes are visible to all users with access to the Backstage. It can be used as a simple communication dashboard. When you first visit Backstage, a "First run" panel will be shown with a number of recommended settings to check out. -### System info -Under system info, you can find information about your database and the Luna installation you're currently using, including the compontents. +The sidebar will show you issues that may occure with your board. This includes problems with folder permissions that prevent Luna from working as expected or the `install.php` file still being present in the directory, which is a security risk. It also shows a small panel detailing the number of comments, threads and users. ### Update -Update contains an update check. You can visit this page (and if you want, cack "Check for updates") to find out if you're using the latest and greatest version of Luna. +The Update section contains all information about your current board's system. This includes an overview of the multiple internal versionnumbers Luna uses (for the software version, core version and database version) as well as which version of Bootstrap, Font Awesome, jQuery and Prism is being used. + +Further more it allows you to check for updates and provides links to downloads and release notes whenever a new update is available. Server statistics will show you some information about your server including the system load, operating system, PHP version, database system and the size of the database. Not that not all environments might support all these features. ### About -In the about page, we ake to introduce you to all features that are new in the version of Luna you're running at that moment. +About shows you what's new in the release you're using. This page is updated with every major, minor and patch update to list all notable changes. If you're using a Preview release, it will show all previews up until the preview you are using and all stable versions of the previous minor update. When a new major or minor version ships, all old release notes are removed and the preview notes are merged into one list for the release. Previous changelogs can be found on [releases](../releases). ## Content - ### Board -See [categories and forums](organizing) for more information +_See [categories](categories) and [forums](forums)_ -### Censoring -With censoring, you can easily manage which words need to be replaced with another word. On this page, you are able to add, update and remove censored words. Remember that this also affects usernames. +The board page allows for adding new categories and forums, as well as changing the position of categories and forums and removing them. The main page allows for changing a number of settings related to forums like the name, position, icon and forum color. ### Reports -Whenever an user thinks a comment shouldn't be on your board, they can report it, and these reports will cause it to appear on this page, where you can moderate them. +Whenever an user thinks a comment shouldn't be on your board, they can report it, and these reports will cause it to appear on this page, where you can moderate them. Previously moderated reports are also visible here. -### Moderate -This page isn't accesseble from the Backstage itself. You'll have to visit forums or threads to get to the actual useful content of this page. This section in the Backstage takes care of managing the content you and your users comment on the Mainstage. +### Censoring +With censoring, you can easily manage which words need to be replaced with another word. On this page, you are able to add, update and remove censored words. Remember that this also affects usernames and any content user can post on your board. ## Users - ### Search -Search helps you by giving you an advanced search field to search through your users. - -### Tools -This page contains tools related to users. +Search helps you by giving you an advanced search field to search through your users. From here out, you can change a number of user-specific settings. ### Ranks -See [ranks](organizing) +See [ranks](ranks) -### Groups -See [groups](organizing) +### User groups +See [groups](ranks) -### Permissions Probably the most critical part of setting up a new forum is getting the permissions right. -To setup a working and useful permission hierarchy, you can create user groups in the administration panel. Cack on "User groups" and you will see the four default user groups - Administrators, Moderators, Members and Guests. +To setup a working and useful permission hierarchy, you can create user groupsl. Click on "User groups" and you will see the four default user groups - Administrators, Moderators, Members and Guests. ### Bans -Here you can add, search and manage banned users. +Here you can add, search and manage banned users. You can ban users, IP-addresses and IP-address ranges. ## Settings - ### Settings -Change basic setting ake the title and discription. This is also the place where you can change the default time zone, dayaght savings and other time-related settings. Also, you can change the default language of your forum (for guests and new users), feed settings, how Luna should handle reported comments, avatar settings, and finally, announcements. +Change basic setting like the title and discription. This is also the place where you can change the default time zone, daylight savings and other time-related settings. Also, you can change the default language of your forum (for guests and new users), feed settings, how Luna should handle reported comments, avatar settings, and finally, announcements. -### Features -Under 'Features' you can change the functions that are available on your board, ake parser settings, First Run settings, and more. Also, you can activate censoring. +Here, you can disable new registrations. Also, you can activate a security features that asks at new members to verify themselfs. You also can add here forum rules, when you activate 'User forum rules', a new button, 'Rules', will be added to the menu of your Luna installation. -### Appearance -Here you can change the appearance of your board. Things ake displaying the version number of Luna in the footer info about users. Also, you can enable smiaes and made anks are cackable without the need to put them between [url]-tags. Also, you can change here the number of threads and comments on one page. +Change email settings, like the adres of the forums admin and webmaster, the abbility to subscribe to forums and threads and your SMTP settings. -### Registration -Here, you can disable new registrations. Also, you can activate a security features that asks at new members to verify themselfs. You also can add here forum rules, when you activate 'User forum rules', a new button, 'Rules', will be added to the menu of your Luna installation. +### Features +Under 'Features' you can change the functions that are available on your board, like parser settings, First Run settings, and more. Also, you can activate censoring. + +### Theme +Here you can change the appearance of your board. Things like displaying the version number of Luna in the footer info about users. Also, you can enable smilies and made links are clickable without the need to put them between [url]-tags. Also, you can change here the number of threads and comments on one page. -### Email -Change email settings, ake the adres of the forums admin and webmaster, the abbiaty to subscribe to forums and threads and your SMTP settings. +This page contains an overview of all themes that are available to your installation. You can change the look of your board here and change settings of themes in case they have their own settings. ### Menu Under the menu settings, you can change to items in the menu. You can't delete default items, but you can hide them. -### Themes -This page contains an overview of all themes that are available to your installation. You can change the look of your board here and change settings of themes in case they have their own settings. - ## Maintenance - ### Maintenance Under "Maintenance", you can disable users from entering your forum so you can work on it, for example, update Luna, change settings, etc. When your forum is in maintenance, it's recommended that you stay logged in. If you log out, you will not be able to log in again. You can find more information about this under See [troubleshooting](troubleshooting). diff --git a/bans.md b/bans.md new file mode 100644 index 0000000..f7987be --- /dev/null +++ b/bans.md @@ -0,0 +1,24 @@ +# Bans +By banning people, you can lock them out of your board. They will no longer be able to login, react, etc. + +## Add ban +You can ban users by their username by entering the username and clicking "Add". However, if you want to ban a user by their IP, IP-range or e-mail address, leave the field blank and click "Add". + +### Ban range +You can now enter an username, IP address or IP-address range. You may ban multiple IP addresses at once by separating them with a space. You can also ban users by their e-mail address or their domain (e.g. `@mail.com`). + +### Ban details +You can specify a message users that are banned should get to see as well as the duration of the ban. If you want to ban a user without an expiration date, you can leave the field blank. + +## Ban search +Here you can search for banned users. If you want to see all banned users, you can simply leave all fields blank and click "Search". Otherwise you can fill in any of the following options. All search fields support wildcards. + +* __Username__: the username you are looking for. +* __IP address/IP-range__: the IP-address or IP-range. +* __E-mail__: the e-mail address. +* __Message__: the message left to the user when they attempt to login. +* __Expire after__: a date before the ban's expiration date that you're looking for. +* __Expire before__: a date after the ban's expiration date that you're looking for. +* __Order by__: the order by which to sort the search results. + +After clicking "Search", you'll get to see a table containing the username, e-mail address, IP-address, expiration date, message and who banned the user. Here you can also change the details of the ban or remove the ban entirely, which will restore access to your board for the user(s) affected by the ban. \ No newline at end of file diff --git a/branches.md b/branches.md index 0aa37e5..09ac932 100644 --- a/branches.md +++ b/branches.md @@ -4,6 +4,6 @@ When you go to our repository on GitHub, you'll see that there are a couple of b ## Branches | Name | Description | | --- | --- | -| lunadev | The main branch, every branch is based upon this branch. | +| master | The main branch, every branch is based upon this branch. | | preview | When a nightly build is stable enough, it gets released as an official preview release (Preview, Beta, RC) in this branch. | | version _number_ | The branches as, for example, `version1.2` are used to develop these respective versions and their updates. | \ No newline at end of file diff --git a/caching.md b/caching.md index 4d47123..080f9fb 100644 --- a/caching.md +++ b/caching.md @@ -8,7 +8,7 @@ To load cached data, all you have to do is including the cache file (if it exist ```php // Load cached configuration if (file_exists(LUNA_CACHE_DIR.'cache_config.php')) -include LUNA_CACHE_DIR.'cache_config.php'; + include LUNA_CACHE_DIR.'cache_config.php'; ``` If the file does not exist, the cache has to be regenerated first. @@ -18,7 +18,7 @@ In order to not show old data on the forum, you need to make sure that the cache ```php if (!defined('LUNA_CACHE_FUNCTIONS_LOADED')) -require luna_ROOT.'include/cache.php'; + require luna_ROOT.'include/cache.php'; // Regenerate the config cache generate_config_cache(); @@ -29,6 +29,7 @@ These functions are available to generate caches: * `generate_bans_cache()` * `generate_censoring_cache()` * `generate_config_cache()` +* `generate_emoji_cache()` * `generate_ranks_cache()` * `generate_stopwords_cache()` * `generate_update_cache()` diff --git a/categories.md b/categories.md new file mode 100644 index 0000000..f720838 --- /dev/null +++ b/categories.md @@ -0,0 +1,9 @@ +# Categories +## Add categories +Before you can create new forums, you need to create one or more categories. You can add new categories in the in the Backstage under Content > Board. Under 'Add categories' you type the name in the text box of the category you want to create. Click on 'Add'. The category appears under 'Manage board' panel with number as a block. Here you can change the title and the position of the category. + +## Delete categories +To delete categories, you simply select the categorie you want to delete in the drop down menu under 'Delete categories'. Then, you click on 'Remove'. Notice that all forums, threads and comments inside the categorie you remove, also will be removed. This is an irreversable action. + +## Edit categories +You can change 2 settings for your categories. The name, and the position. You can easily change the name of you category by changing the name in the text box. The position of the category is set with the number in the second field. How higher the number in the field, how lower the category is ranked in your forum. \ No newline at end of file diff --git a/censoring.md b/censoring.md new file mode 100644 index 0000000..aa02f4d --- /dev/null +++ b/censoring.md @@ -0,0 +1,14 @@ +# Censoring +With censoring, you can easily manage which words need to be replaced with another word. On this page, you are able to add, update and remove censored words. Remember that this also affects usernames and any content user can post on your board. + +## Add censored word +You can add a new censored word by entering a "Censored word" in the sidebar followed by a "Replacement word". + +Note that censoring a word affects the username, threads, comments, signatures and any other content an user can post. Additionally, Luna will censor only full appearance, so censoring "Lu" and replacing it with "Nu" won't result in "Luna" being written as "Runa". You can however use wildcards if you would like to achieve such an effect. + +If you censor a word and the replacement word itself is already censored as well, Luna will replace the word with the replacement word of your censored replacement wordn. + +## Editing and removing words +On the right hand side you can see an overview of all censored words and their replacement. Here you can change which words are censored and update them. Additionally, you can remove a word by clicking "Delete". + +Note that you cannot edit and remove multiple words at a time. Editing multiple words is possible, but removing words while doing that will cause the page to reset. First save your changes before removing words. \ No newline at end of file diff --git a/constants.md b/constants.md index 02cba76..d700f1e 100644 --- a/constants.md +++ b/constants.md @@ -68,17 +68,12 @@ require LUNA_ROOT.'include/common.php'; ``` ### `LUNA_DEBUG` -Defining `LUNA_DEBUG` enables debug mode, which makes Luna display more detailed/sensitive error messages. Script generation time and number of queries executed will also be shown in the footer. Debug mode should not be enabled on a production site, since it can potentially give a malicious user sensitive information about a server. However, enabling debug mode is an integral step to reporting/diagnosing forum errors. Without the information it provides, it can be nearly impossible for the developers to figure out the underlying cause of an issue. +Defining `LUNA_DEBUG` enables debug mode, which makes Luna display more detailed/sensitive error messages. Script generation time and number of queries executed will also be shown in the footer. Additionally, it makes all the queries executed during a pageview display in the footer. This feature is only useful for developing and should _never_ be used in a production environment because of the potential for disclosure of sensitive information. -```php -define('LUNA_DEBUG', 1); -``` - -### `LUNA_SHOW_QUERIES` -Defining `LUNA_SHOW_QUERIES` makes all the queries executed during a pageview display in the footer. This feature is only useful for developing and should never be used in a production environment because of the potential for disclosure of sensitive information. +However, enabling debug mode is an integral step to reporting/diagnosing forum errors. Without the information it provides, it can be nearly impossible for the developers to figure out the underlying cause of an issue. ```php -define('LUNA_SHOW_QUERIES', 1); +define('LUNA_DEBUG', 1); ``` ### `LUNA_TURN_OFF_MAINT` diff --git a/contributing.md b/contributing.md index c8d4b1a..5fe74f1 100644 --- a/contributing.md +++ b/contributing.md @@ -2,15 +2,44 @@ Do you want to make a pull request to Luna? Great! Through it is important to follow some rules. ## Where do I publish my pull request? -If you're pull request contains bugfixes, you can add the pull request to the then current branch (for example: version3.1), do not add a pull request to master, stable or unsupported branches. When a bugfix alters the way Luna functions, you're probably better of adding the pull request to the branch that's then in development. +If you're pull request contains bugfixes, you can add the pull request to the then current branch (for example: version2.1), do not add a pull request to master, stable or unsupported branches. When a bugfix alters the way Luna functions, you're probably better of adding the pull request to the branch that's then in development. If you're pull request contains new features, changes in behavior, code additions or large amounts of revised code, please add the pull request to the then current development branch, if you create a pull request to any other branch, we'll have to close your merge request as we can not add features to a stable and already released version of Luna or any other branch that is not named "versionX.X". If the current development branch is comment beta, you'll have to add your pull request to the next development branch instead. -## Do I have to create a ticket for a feature I want to see in Luna? +## Do I have to create a ticket for a feature I want to see in Luna? Wath about bugs? Depends on it, if you're able to code it yourself and think: "Why not, even if it isn't allowed, at least I've a working example for my own fork!", then no. If you create this feature and add a pull request to the official Luna repository, it will create a ticket for you. Describe properly what the pull request contains, how better explained, the more is the chance that it will make it to the official Luna core. +For bugs, you best make a ticket, unless you are able to fix it yourself and are willing to push that to Luna with a pull request. + +
+ +
+
+

Report a bug

+

Found a bug? Report it on GitHub!

+
+
+ +
+
+
+ +
+
+

Request a feature

+

Woud you like to see something new? Request it on GitHub!

+
+
+ +
+
+
+
+ ## Can I make changes to the Luna core in my own coding style? -If you want you're code to become part of the official Luna core, no, you can't. We have to keep the Luna core readable and consitent. That is very important. That's why we have [coding conventions](php_conventions). They are very important, and if your code doesn't apply to them, we can't merge your pull request in any case. Of course, if you have no intention to pull your changes to the Luna core, go ahead, you're free to do whatever you want. +If you want you're code to become part of the official Luna core, no, you can't. We have to keep the Luna core readable and consitent. That is very important. That's why we have [coding conventions](php_conventions). They are very important, and if your code doesn't comply to them, we can't merge your pull request in any case. Of course, if you have no intention to push your changes to the Luna core, go ahead, you're free to do whatever you want. ## Under which license will my code be released? For the forseable future, we release our code under the GPLv2 license. However, every contribution to Luna will be concidered as duallicensed under both GPLv2 and MIT. This accounts for all contributions to the Luna core as of July 22, 2014. Further, changes to the language files are also not binded to be released under GPLv2 and by contributing to the Luna core, you allow us to release these contributions under the MIT license, too. \ No newline at end of file diff --git a/conventions.md b/conventions.md index fa86d83..f76809c 100644 --- a/conventions.md +++ b/conventions.md @@ -1,54 +1,48 @@ # Coding conventions
These coding conventions apply for Luna 2.0 and higher versions.
-The rules and recommendations set forth in this section apply to PHP, Javascript, SQL and any other programming language (where applicable) in use by Luna. Please note that tabs in this document have been substituted by spaces for visual reasons only. +The rules and recommendations set forth in this section apply to PHP, Javascript, SQL and any other programming language (where applicable) in use by Luna. ## Naming convention The naming rules apply to the naming of variables, functions, classes, attributes, arrays, array elements, HTML form fields, query string parameters, database tables, database fields as well as any other applicable entities. * All names should be all lowercase. * Use `_` (underscore) as word separator. E.g. `date_format`. Never start a name with the underscore character (except for nested functions, which should always start with an underscore character). -* Use the prefix `num` for entities that represent a count. E.g. `num_users`. Use the prefix `cur` for entities that represent the current element when iterating through any type of collection (database result set, array etc). E.g. `cur_user`. +* Use the prefix `num` for entities that represent a count. E.g. `num_users`. +* Use the prefix `cur` for entities that represent the current element when iterating through any type of collection (database result set, array etc). E.g. `cur_user`. * Avoid all forms of Hungarian notation or derivatives or variations thereof. * Use common sense. If in doubt, look at similar sections in the Luna source code. +Starting with Luna 3, some of these conventions change: + +* Function names should be in `CamelCasing` +* Use the prefix `count` for entities that represent a count. E.g. `count_users`. +* Use the plural name of the object you're looping though when iterating through any type of collection (database result set, array, etc.) en the singular name when manipulating a single object. E.g. `users` and `user`. + ## Brace policy and indentation -The indent style and brace policy of choice for the Luna project is the [Allman style](http://en.wikipedia.org/wiki/Indent_style#Allman_style_.28bsd_in_Emacs.29). All indentation should be made using tabs (with a tab size of 4), not spaces. +All indentation should be made using 4 spaces. Here's an example: ```php -if ($a == $b) -{ - do_something(); -} -else -{ - do_something_else(); +if ($a == $b) { + do_something(); +} else { + do_something_else(); } ``` -Note the whitespace between the keyword and the parenthesis. One allowed exception from the standard Allman style is "braceless" blocks. The use of braceless blocks is actually encouraged. - -For example: - -```php -if ($a == $b) - do_something(); -else - do_something_else(); -``` +Note the whitespace between the keyword and the parenthesis. Braceless blocks are strictly forbidden. ## Line breaks and encoding -All line breaks should be LF `(n)` only. Set your editor to save files with UNIX style line breaks. All files should be saved using UTF-8 encoding. - +All line breaks should be CR LF Windows only. Set your editor to save files with Windows style line breaks. All files should be saved using UTF-8 encoding. ## PHP-specific The following rules apply only to PHP. * Use singlequotes as opposed to doublequotes when working with strings. E.g. `$str = 'Users: '.$num_users;` as opposed to `$str = "Users: $num_users";`. -* Leave one line of whitespace above and below each block of markup, provided the block constitutes multiple lines of markup. I.e. one empty line above each `?>` and below each `<?php`. The exception to this is when there is only one line of code, in which case the entire section of code should be on one line. -* Don't use PHP's short tags (`<?`, `<?=`), but use its full equivalent (`<?php`, `<?php echo`). +* Leave one line of whitespace above and below each block of markup, provided the block constitutes multiple lines of markup. I.e. one empty line above each `?>` and below each `These coding conventions apply for Luna 2.0 and higher versions. -The rules and recommendations set forth in this section apply to CSS and any other CSS-based programming language (where applicable) in use by Luna. Please note that tabs in this document have been substituted by spaces for visual reasons only. +The rules and recommendations set forth in this section apply to CSS and SCSS in use by Luna. ## Naming convention The naming rules apply to the naming of ids and classes. @@ -14,14 +14,14 @@ The naming rules apply to the naming of ids and classes. * Use `.js-*` classes to denote behavior (as opposed to style), but keep these classes out of your CSS. ## Brace policy and indentation -Braces are placed behind the last selector to which the declaration applies. Each selector and property has its own rule. All indentation should be made using tabs (with a tab size of 4), not spaces. +Braces are placed behind the last selector to which the declaration applies. Each selector and property has its own rule. All indentation should be made using 4 spaces, not tabs. Here's an example: ```css .navbar-default .navbar-brand, .navbar-default .navbar-nav > li > a { - color: #fff; + color: #fff; } ``` @@ -37,31 +37,31 @@ All line breaks should be CR LF Windows only. Set your editor to save files with * Each declaration should have its own line for more accurate error reporting. * End all declarations with a semi-colon, including the last one. * Comma-separated property values should include a space after each comma (e.g., `box-shadow`). -* Don't include spaces after commas within `rgb()`, `rgba()`, `hsl()`, `hsla()`, or `rect()` values. +* Don't include spaces after commas _within_ `rgb()`, `rgba()`, `hsl()`, `hsla()`, or `rect()` values. * Don't prefix property values or color parameters with a leading zero (e.g., `.5` instead of `0.5` and `-.5px` instead of `-0.5px`). * Use hex values to describe colors as much as possible. If you need a transparent color, use `rgba()`. * Lowercase all hex values, e.g., `#fff`. Lowercase letters are easier to discern when scanning a document as they tend to have more unique shapes. * Use shorthand hex values where available, e.g., `#fff` instead of `#ffffff`. -* Quote attribute values in selectors, e.g., `input[type="text"]`. They’re only optional in some cases, and it’s a good practice for consistency. +* Quote attribute values in selectors, e.g., `input[type="text"]`. [They are only optional in some cases](http://mathiasbynens.be/notes/unquoted-attribute-values#css), and it's a good practice for consistency. * Avoid specifying units for zero values, e.g., `margin: 0;` instead of `margin: 0px;`. ```css /* The bad way */ .selector, .selector-secondary, .selector[type=text] { - padding:15px; - margin:0px 0px 15px; - background-color:rgba(0, 0, 0, 0.5); - box-shadow:0px 1px 2px #CCC,inset 0 1px 0 #FFFFFF + padding:15px; + margin:0px 0px 15px; + background-color:rgba(0, 0, 0, 0.5); + box-shadow:0px 1px 2px #CCC,inset 0 1px 0 #FFFFFF } /* The good way */ .selector, .selector-secondary, .selector[type="text"] { - padding: 15px; - margin-bottom: 15px; - background-color: rgba(0,0,0,.5); - box-shadow: 0px 1px 2px #ccc, inset 0 1px 0 #fff; + padding: 15px; + margin-bottom: 15px; + background-color: rgba(0,0,0,.5); + box-shadow: 0px 1px 2px #ccc, inset 0 1px 0 #fff; } ``` @@ -75,27 +75,52 @@ Related property declarations should be grouped together following the order: * Misc (`opacity`) ## Media query usage -Place media queries as close to their relevant rule sets whenever possible. Don't bundle them all in a separate stylesheet or at the end of the document. Doing so only makes it easier for folks to miss them in the future. Here's a typical setup. - +Place media queries as close to their relevant rule sets whenever possible. Don't bundle them all in a separate stylesheet or at the end of the document. Doing so only makes it easier for folks to miss them in the future. + +Media queries that only alter one specific class that already has non-queried properties should be put in that class and not repeat the class. These queries should only contain properties. If the class only contains properties that apply to a media query, the class itself should also be listed within the query. + +If a media query manipulates multiple classes, it should wrap around all of them and its parent if it does not manipulate any other properties for style. + +```scss +.tab-content .form-group { + .col-sm-3 { + padding-left: 0; + + @media (max-width:767px) { + padding-right: 0; + } + } + + @media (min-width:768px) { + .col-sm-6 { + &:first-child { + padding-left: 15px; + } + + &:last-child { + padding-right: 15px; + } + } + } +} +``` ## Prefixed properties -When using vendor prefixed properties, indent each property such that the declaration's value lines up vertically for easy multi-line editing. However, don't use prefixes when they aren't necessary for the functionality. If a radius, gradient or shadow isn't displayed by one of the browsers, than that's "to bad". +Prefixes is not something to worry about in SCSS. Any tool set up to compile the SCSS should have auto-prefixing enabled. ```css /* The bad way */ .selector { - -webkit-border-raius: 5px; - border-radius: 5px; - box-shadow: 0 1px 2px rgba(0,0,0,.15); - -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.15); + -webkit-border-raius: 5px; + border-radius: 5px; + box-shadow: 0 1px 2px rgba(0,0,0,.15); + -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.15); } /* The good way */ .selector { - -webkit-border-raius: 5px; - border-radius: 5px; - -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.15); - box-shadow: 0 1px 2px rgba(0,0,0,.15); + border-radius: 5px; + box-shadow: 0 1px 2px rgba(0,0,0,.15); } ``` @@ -108,6 +133,7 @@ Strive to limit use of shorthand declarations to instances where you must explic * `background` * `border` * `border-radius` + Often times we don't need to set all the values a shorthand property represents. For example, HTML headings only set top and bottom margin, so when necessary, only override those two values. Excessive use of shorthand properties often leads to sloppier code with unnecessary overrides and unintended side effects. The Mozilla Developer Network has a great article on [shorthand properties](https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties) for those unfamiliar with notation and behavior. @@ -115,18 +141,34 @@ The Mozilla Developer Network has a great article on [shorthand properties](http ```css /* The bad way */ .selector { - margin: 0 0 10px; - background: red; - background: url("image.jpg"); - border-radius: 3px 3px 0 0; + margin: 0 0 10px; + background: red; + background: url("image.jpg"); + border-radius: 3px 3px 0 0; +} + +/* The good way */ +.selector { + margin-bottom: 10px; + background-color: red; + background-image: url("image.jpg"); + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} +``` + +However, do not take this as a rule to never use shorthand notations. If what yo uwant to write can be written in a simpeler way by using the shorthand notation, use it. + +```css +/* The bad way */ +.selector { + border-width: 1px; + border-style: solid; + border-color: #000; } /* The good way */ .selector { - margin-bottom: 10px; - background-color: red; - background-image: url("image.jpg"); - border-top-left-radius: 3px; - border-top-right-radius: 3px; + border: 1px solid #000; } ``` \ No newline at end of file diff --git a/customizing.md b/customizing.md index 30af18f..7b21da7 100644 --- a/customizing.md +++ b/customizing.md @@ -2,19 +2,19 @@ There are four main ways in which you can modify Luna. The first three, themes, language packs, and plugins, simply require dropping a file or folder into the right directory. Modifications however often involve modifying the core files, and hence are harder to install and remove. ## Themes -Themes are packages that can be used to alter the look and feel of your forum. A theme should consist of 1 CSS file named `style.css`, and all required templates (unless it's a child theme), images etc. (where `<theme>` is the name of the theme). To install a theme simply upload the theme foldere into the `/theme/` folder inside your forum root directory. +Themes are packages that can be used to alter the look and feel of your board. A theme should consist of 1 CSS file named `style.css`, and all required templates (unless it's a child theme), images etc. To install a theme simply upload the theme's folder into the `/theme/`-folder inside your board root directory. -Once installed the theme will be available within Backstage to set as the forum theme. For information on developing your own themes, please see the [themes](themes) section of the developer wiki. +Once installed the theme will be available within Backstage to set as the board theme. For information on developing your own themes, please see the [themes](themes) section of the developer wiki. ## Language packs -Language packs are used to translate your forum into a different language. A language pack should consist of 1 folder named after the language it contains. It should contain a `luna.mo` and `luna.mp` file which contain the actual translation strings. It should also contain a `stopwords.txt` file, which contains a list of words which should not be indexed by the search engine. +Language packs are used to translate your board into a different language. A language pack should consist of 1 folder named after the language it contains. It should contain a `luna.mo` and `luna.mp` file which contain the actual translation strings. It should also contain a `stopwords.txt` file, which contains a list of words which should not be indexed by the search engine. -To install a language pack simply upload the folder into the `/lang/` folder inside your forum root directory. +To install a language pack simply upload the folder into the `/lang/` folder inside your board root directory. -Once installed the language will be available within the administration console to set as the forum default, as well as within everyone's profile allowing them to use it if they wish. For information on developing your own language pack, please see the [translations](translations) section. +Once installed the language will be available within the administration console to set as the board default, as well as within everyone's profile allowing them to use it if they wish. For information on developing your own language pack, please see the [translations](translations) section. ## Plugins -Plugins allow you to add features to your Backstage. While modifications allow you to add features to the actual forum core or modify its behaviour, you cannot do the same with plugins. However, they offer benefits like simplifying typical administrator tasks or providing additional features that Luna cannot and will not provide (due to its philosophy). +Plugins allow you to add features to your Backstage. While modifications allow you to add features to the actual board core or modify its behaviour, you cannot do the same with plugins. However, they offer benefits like simplifying typical administrator tasks or providing additional features that Luna cannot and will not provide (due to its philosophy). Another benefit of plugins is that they are very easy to install. All you have to do is drop the plugin file into the directory `/plugins/` and you can immediately start using it. @@ -23,6 +23,6 @@ Some plugins are restricted to administrator access, while others may be used my For information on developing your own plugin, please see the [plugins](plugins) section. ## Modifications -Modifications allow you to modify Luna's core or add features to it. While they are very flexible, because basically everything can be altered, they are also very prone to errors. They can be harder to apply and make it harder to update your forum. All packages have installation instructions and exactly explain how the modification should be installed. +Modifications allow you to modify Luna's core or add features to it. While they are very flexible, because basically everything can be altered, they are also very prone to errors. They can be harder to apply and make it harder to update your board. All packages have installation instructions and exactly explain how the modification should be installed. For information on developing your own modification, please see the [modifications](modifications) section. \ No newline at end of file diff --git a/data.md b/data.md deleted file mode 100644 index c101358..0000000 --- a/data.md +++ /dev/null @@ -1,25 +0,0 @@ -# Data collection -To make Luna a better place that's more optimized for the places where it is used, you have the option to send some data to our servers for analyses. - -## Why collect data? -We collect some data - with your permission - that helps us improve Luna for future version. This data gives us a basic sense of in what kind of environments Luna is being used. Sending this data is fully optional and we'll ask you every time we do so if it's fine with you, unless you've said we don't need to ask anymore. - -## Which data do we collect? -The data we collect isn't personalized. Below we have a list of the collected data: - -* Luna version, core and name -* Basic statistics: number of threads, comments and members -* Your PHP version and database type (including its version) -* You board URL as a unique identifier -* The moment of collection (though that's generated on our part and not data we actually collect) - -## What are you options? -For the obvious reasons, data collection is only opt-in. However, we give you a couple of options for what you want to do, these options are: - -* __Yes, always__ - we'll remember you preference and won't ask again. The data mentioned above will be send to us every time your board jumps to a new version. You will be able to disable this so that we'll ask again next time under Settings > Settings > System. -* __Yes, just now__ - we won't remember your preference and ask again the next time you update your board. The data mentioned above will be send to use. -* __No, not now__ - we won't remember your preference and ask again the next time you update your board. No data is send. - -That might beg the question: why not allow you do disable it always? The answer is that we encourage you to send that data. There really is no downside to it. We understand it if you don't want us to get that data, but it will benefit everyone, and maybe mostly you. Imagen that you're running a very old version of PHP, receiving data of your installation might be the tipping point for us to continue to provide support for that particular version of PHP. - -What do we understand under "next time you update". Because we do not consider every time you get the "Luna update" screen in front of you as an update. In fact, only when the `LUNA_VERSION` goes up, is an update. While the `LUNA_CORE_VERSION` is actually the thing we check on to determine if an update is required. This way, we prevent our users from sending us data to often. So every time the Update-page lists something as an update, than we'll ask. diff --git a/dbstructure.md b/dbstructure.md index ed21195..9dbf7b6 100644 --- a/dbstructure.md +++ b/dbstructure.md @@ -11,6 +11,7 @@ The following is a complete list of all Luna database tables and their structure * censoring * comments * config +* emoji * forums * forum_perms * forum_subscriptions @@ -24,6 +25,7 @@ The following is a complete list of all Luna database tables and their structure * search_cache * search_matches * search_words +* themes * threads * thread_subscriptions * users @@ -37,7 +39,7 @@ The bans table is used to hold details of all current bans. It is important to n | Field | Type | Default | Description | | --- | --- | --- | --- | -| _`id`_ | `int(10)` | ` ` | The auto-incrementing primary key for this table. | +| *`id`* | `int(10)` | ` ` | The auto-incrementing primary key for this table. | | `username` | `varchar(200)` | `NULL` | The username this ban applies to, or `NULL` for none. | | `ip` | `varchar(255)` | `NULL` | The IP address(es) this ban applies to, or `NULL` for none. | | `email` | `varchar(80)` | `NULL` | The email address this ban applies to, or `NULL` for none. | @@ -48,17 +50,34 @@ The bans table is used to hold details of all current bans. It is important to n ### categories | Field | Type | Default | Description | | --- | --- | --- | --- | -| _`id`_ | `int(10)` | ` ` | The auto-incrementing primary key for this table. | +| *`id`* | `int(10)` | ` ` | The auto-incrementing primary key for this table. | | `cat_name` | `varchar(80)` | `"New Category"` | The name of the category. | | `disp_position` | `int(10)` | `0` | The position of this category in relation to the others. | ### censoring | Field | Type | Default | Description | | --- | --- | --- | --- | -| _`id`_ | `int(10)` | ` ` | The auto-incrementing primary key for this table. | +| *`id`* | `int(10)` | ` ` | The auto-incrementing primary key for this table. | | `search_for` | `varchar(60)` | `""` | The term to search for. | | `replace_with` | `varchar(60)` | `""` | The term to replace with. | +### comments +| Field | Type | Default | Description | +| --- | --- | --- | --- | +| *`id`* | `int(10)` | ` ` | The auto-incrementing primary key for this table. | +| `commenter` | `varchar(200)` | `""` | The username of the user who created this comment. | +| `commenter_id` | `int(10)` | `1` | The ID of the user who created this comment. | +| `commenter_ip` | `varchar(39)` | `NULL` | The IP address of the user who created this comment. | +| `commenter_email` | `varchar(80)` | `NULL` | If the comment was created by a guest, their email address. If it was created by a logged in user, then `NULL`. | +| `message` | `mediumtext` | `NULL` | The contents of the comment. | +| `hide_smilies` | `tinyint(1)` | `0` | Should smilies be hidden in this comment? | +| `commented` | `int(10)` | `0` | A UNIX timestamp representing the time this comment was created. | +| `edited` | `int(10)` | `NULL` | A UNIX timestamp representing the time this comment was last edited, or `NULL` if it hasn't been edited. | +| `edited_by` | `varchar(200)` | `NULL` | The username of the user who last edited this comment, or `NULL` if it hasn't been edited. | +| `thread_id` | `int(10)` | `0` | The ID of the parent thread for this comment. | +| `marked` | `tinyint(1)` | `0` | If the message is reported, this will be 1. | +| `soft` | `tinyint(1)` | `0` | If the message has been soft deleted, this will be 1. | + ### config The config table holds key, value pairs for all the main configuration options. For performance reasons Luna caches these values and will only refresh the cache when they are updated via the admin panel. @@ -66,13 +85,20 @@ For more information about the actual contents of the config table, see the $lun | Field | Type | Default | Description | | --- | --- | --- | --- | -| _`conf_name`_ | `varchar(255)` | `""` | The name of the configuration variable. General configuration options start with the prefix o_ and general permission options start with the prefix p_. | +| *`conf_name`* | `varchar(255)` | `""` | The name of the configuration variable. General configuration options start with the prefix o_ and general permission options start with the prefix p_. | | `conf_value` | `text` | `NULL` | The value of the configuration variable. | +### emoji +| Field | Type | Default | Description | +| --- | --- | --- | --- | +| *`id`* | `int(10)` | ` ` | The auto-incrementing primary key for this table. | +| `unicode` | `varchar(40)` | `""` | The unicode without `U+` that generates the emoji. | +| `text` | `varchar(20)` | `""` | The string that needs to be replaced by the unicode. | + ### forums | Field | Type | Default | Description | | --- | --- | --- | --- | -| _`id`_ | `int(10)` | ` ` | The auto-incrementing primary key for this table. | +| *`id`* | `int(10)` | ` ` | The auto-incrementing primary key for this table. | | `forum_name` | `varchar(80)` | `"New forum"` | The name of the forum. | | `forum_desc` | `text` | `NULL` | A description of the forum (may contain HTML). | | `moderators` | `text` | `NULL` | A serialized associative PHP array with moderator names ⇒ user IDs. | @@ -86,12 +112,15 @@ For more information about the actual contents of the config table, see the $lun | `cat_id` | `int(10)` | `0` | The ID of the category in which this forum resides. | | `color` | `varchar(25)` | `#0d4382` | The color of the forum. | | `parent_id` | `int(11)` | `0` | The ID of the parent forum. | +| `solved` | `tinyint(1` | `1` | Allow users to set threads to solved. | +| `icon` | `varchar(50)` | `""` | The name of the icon wihtout a prefix that this forum will use. | +| `icon_style` | `int(10)` | `0` | The used style of the icon. | ### forum_perms | Field | Type | Default | Description | | --- | --- | --- | --- | -| _`group_id`_ | `int(10)` | `0` | The ID of the group this permission set applies to. | -| _`forum_id`_ | `int(10)` | `0` | The ID of the forum this permission set applies to. | +| *`group_id`* | `int(10)` | `0` | The ID of the group this permission set applies to. | +| *`forum_id`* | `int(10)` | `0` | The ID of the forum this permission set applies to. | | `read_forum` | `tinyint(1)` | `1` | Allow members of the group to view this forum? | | `comment_replies` | `tinyint(1)` | `1` | Allow members of the group to comment replies in this forum? | | `comment_threads` | `tinyint(1)` | `1` | Allow members of the group to start new threads in this forum? | @@ -99,15 +128,15 @@ For more information about the actual contents of the config table, see the $lun ### forum_subscriptions | Field | Type | Default | Description | | --- | --- | --- | --- | -| _`user_id`_ | `int(10)` | `0` | The ID of the user which this subscription belongs to. | -| _`forum_id`_ | `int(10)` | `0` | The ID of the forum which this subscription belongs to. | +| *`user_id`* | `int(10)` | `0` | The ID of the user which this subscription belongs to. | +| *`forum_id`* | `int(10)` | `0` | The ID of the forum which this subscription belongs to. | ### groups All fields in the groups table are prefixed with g_. This is to allow them to be easily combined with all the fields from the users table without any conflicting field names. | Field | Type | Default | Description | | --- | --- | --- | --- | -| _`g_id`_ | `int(10)` | ` ` | The auto-incrementing primary key for this table. | +| *`g_id`* | `int(10)` | ` ` | The auto-incrementing primary key for this table. | | `g_title` | `varchar(50)` | `""` | The name of this group. | | `g_user_title` | `varchar(50)` | `NULL` | The user title to be used for members of this group. | | `g_moderator` | `tinyint(1)` | `0` | Does this group have moderator privileges? | @@ -117,8 +146,7 @@ All fields in the groups table are prefixed with g_. This is to allow them to be | `g_mod_ban_users` | `tinyint(1)` | `0` | If g_moderator, can members of this group ban users? | | `g_read_board` | `tinyint(1)` | `1` | Can members of this group view boards? If this is 0 the group basically has no access to the forums. | | `g_view_users` | `tinyint(1)` | `1` | Can members of this group view the user list? | -| `g_comment_replies` | `tinyint(1)` | `1` | Can members of this group comment replies? | -| `g_comment_threads` | `tinyint(1)` | `1` | Can members of this group start new threads? | +| `g_comment` | `tinyint(1)` | `1` | Can members of this group comment | | `g_edit_comments` | `tinyint(1)` | `1` | Can members of this group edit their own comments? | | `g_delete_comments` | `tinyint(1)` | `1` | Can members of this group delete their own comments? | | `g_delete_threads` | `tinyint(1)` | `1` | Can members of this group delete their own threads (including all replies)? | @@ -129,8 +157,8 @@ All fields in the groups table are prefixed with g_. This is to allow them to be | `g_comment_flood` | `smallint(6)` | `30` | How many seconds members of this group must wait between making comments. | | `g_search_flood` | `smallint(6)` | `30` | How many seconds members of this group must wait between making search requests. | | `g_email_flood` | `smallint(6)` | `60` | How many seconds members of this group must wait between sending emails. | -| `g_pm` | `tinyint(1)` | `1` | Wheter or not the user is allowed to use Inbox. | -| `g_pm_limit` | `int(11)` | `20` | The maximum amount of Inbox items an user can store. | +| `g_inbox` | `tinyint(1)` | `1` | Whether or not the user is allowed to use Inbox. | +| `g_inbox_limit` | `int(11)` | `20` | The maximum amount of Inbox items an user can store. | | `g_report_flood` | `smallint(6)` | `60` | Amount of seconds that have to pass between reports. | | `g_soft_delete_view` | `tinyint(1)` | `1` | Allow the group to view soft deleted items. | | `g_soft_delete_comments` | `tinyint(1)` | `1` | Allow the group to soft delete comments. | @@ -139,17 +167,17 @@ All fields in the groups table are prefixed with g_. This is to allow them to be ### menu | Field | Type | Default | Description | | --- | --- | --- | --- | -| _`id`_ | `int(10)` | `NULL` | The ID of the menu item. | +| *`id`* | `int(10)` | `NULL` | The ID of the menu item. | | `url` | `varchar(200)` | `NULL` | The URL to which the menu item should point. | | `name` | `varchar(200)` | `NULL` | The title of the menu item. | | `disp_position` | `int(10)` | `0` | The order in which the item should be displayed. | | `visible` | `int(10)` | `NULL` | Disable or enable the menu item. | -| `sys_entry` | `int(10)` | `NULL` | Check wheter or not this is pre-installed item that can't be removed. | +| `sys_entry` | `int(10)` | `NULL` | Check Whether or not this is pre-installed item that can't be removed. | ### messages | Field | Type | Default | Description | | --- | --- | --- | --- | -| _`id`_ | `int(10)` | `NULL` | The ID of the message. | +| *`id`* | `int(10)` | `NULL` | The ID of the message. | | `shared_id` | `int(10)` | `0` |   | | `last_shared_id` | `int(10)` | `0` |   | | `last_comment` | `int(10)` | `0` | The latest comment in the message. | @@ -171,13 +199,13 @@ All fields in the groups table are prefixed with g_. This is to allow them to be ### notifications | Field | Type | Default | Description | | --- | --- | --- | --- | -| _`id`_ | `int(10)` | `NULL` | The ID of the notificiation. | +| *`id`* | `int(10)` | `NULL` | The ID of the notificiation. | | `user_id` | `int(10)` | `0` | The ID of the user to which to notification has been send. | | `message` | `varchar(255)` | `0` | The content of the message within the notification. | | `icon` | `varchar(255)` | `0` | The Font Awesome icon used by the message. | | `link` | `varchar(255)` | `0` | The link to which the notification should point. | | `time` | `int(11)` | `0` | The time when to notifcation was received. | -| `viewed` | `tinyint(1)` | `0` | Wheter or not the notification has been seen. | +| `viewed` | `tinyint(1)` | `0` | Whether or not the notification has been seen. | ### online | Field | Type | Default | Description | @@ -189,34 +217,17 @@ All fields in the groups table are prefixed with g_. This is to allow them to be | `last_comment` | `int(10)` | `NULL` | A UNIX timestamp representing the time the user last made a comment. | | `last_search` | `int(10)` | `NULL` | A UNIX timestamp representing the time the user last performed a search. | -### comments -| Field | Type | Default | Description | -| --- | --- | --- | --- | -| _`id`_ | `int(10)` | ` ` | The auto-incrementing primary key for this table. | -| `commenter` | `varchar(200)` | `""` | The username of the user who created this comment. | -| `commenter_id` | `int(10)` | `1` | The ID of the user who created this comment. | -| `commenter_ip` | `varchar(39)` | `NULL` | The IP address of the user who created this comment. | -| `commenter_email` | `varchar(80)` | `NULL` | If the comment was created by a guest, their email address. If it was created by a logged in user, then `NULL`. | -| `message` | `mediumtext` | `NULL` | The contents of the comment. | -| `hide_smilies` | `tinyint(1)` | `0` | Should smilies be hidden in this comment? | -| `commented` | `int(10)` | `0` | A UNIX timestamp representing the time this comment was created. | -| `edited` | `int(10)` | `NULL` | A UNIX timestamp representing the time this comment was last edited, or `NULL` if it hasn't been edited. | -| `edited_by` | `varchar(200)` | `NULL` | The username of the user who last edited this comment, or `NULL` if it hasn't been edited. | -| `thread_id` | `int(10)` | `0` | The ID of the parent thread for this comment. | -| `marked` | `tinyint(1)` | `0` | If the message is reported, this will be 1. | -| `soft` | `tinyint(1)` | `0` | If the message has been soft deleted, this will be 1. | - ### ranks | Field | Type | Default | Description | | --- | --- | --- | --- | -| _`id`_ | `int(10)` | ` ` | The auto-incrementing primary key for this table. | +| *`id`* | `int(10)` | ` ` | The auto-incrementing primary key for this table. | | `rank` | `varchar(50)` | `""` | The rank title. | | `min_comments` | `mediumint(8)` | `0` | The number of comments a user must attain in order to reach the rank. | ### reports | Field | Type | Default | Description | | --- | --- | --- | --- | -| _`id`_ | `int(10)` | ` ` | The auto-incrementing primary key for this table. | +| *`id`* | `int(10)` | ` ` | The auto-incrementing primary key for this table. | | `comment_id` | `int(10)` | `0` | The ID of the reported comment. | | `thread_id` | `int(10)` | `0` | The ID of thread in which the reported comment is contained. | | `forum_id` | `int(10)` | `0` | The ID of the forum in which the reported comment is contained. | @@ -229,7 +240,7 @@ All fields in the groups table are prefixed with g_. This is to allow them to be ### search_cache | Field | Type | Default | Description | | --- | --- | --- | --- | -| _`id`_ | `int(10)` | ` ` | The auto-incrementing primary key for this table. | +| *`id`* | `int(10)` | ` ` | The auto-incrementing primary key for this table. | | `ident` | `varchar(200)` | `""` | An identifier for the user who initiated the search. For a guest their IP address is used, for a logged in user, their username. | | `search_data` | `mediumtext` | `NULL` | A serialized array containing search results. | @@ -243,13 +254,20 @@ All fields in the groups table are prefixed with g_. This is to allow them to be ### search_words | Field | Type | Default | Description | | --- | --- | --- | --- | -| `id` | `int(10)` | `0` | The auto-incrementing primary key for this table. | -| `_`word`_ | `varchar(20)` | `""` | The word to be indexed. | +| *`id`* | `int(10)` | `0` | The auto-incrementing primary key for this table. | +| `word` | `varchar(20)` | `""` | The word to be indexed. | + +### themes +| Field | Type | Default | Description | +| --- | --- | --- | --- | +| *`id`* | `int(10)` | `0` | The auto-incrementing primary key for this table. | +| `name` | `varchar(40)` | `""` | The id of the theme. | +| `version` | `varchar(20)` | `""` | The version that was last set for the database. | ### threads | Field | Type | Default | Description | | --- | --- | --- | --- | -| _`id`_ | `int(10)` | ` ` | The auto-incrementing primary key for this table. | +| *`id`* | `int(10)` | ` ` | The auto-incrementing primary key for this table. | | `commenter` | `varchar(200)` | `""` | The username of the user who commented this thread. | | `subject` | `varchar(255)` | `""` | The subject of the thread. | | `commented` | `int(10)` | `0` | A UNIX timestamp representing the time this thread was commented. | @@ -264,21 +282,23 @@ All fields in the groups table are prefixed with g_. This is to allow them to be | `sticky` | `tinyint(1)` | `0` | Is this thread a sticky? | | `moved_to` | `int(10)` | `NULL` | If the thread has been moved, the ID of the new thread (this one now solely acts as a redirect). | | `forum_id` | `int(10)` | `0` | The ID of the forum this thread is within. | -| `soft` | `tinyint(1)` | `0` | Wheter or not this thread has been soft deleted. | +| `soft` | `tinyint(1)` | `0` | Whether or not this thread has been soft deleted. | +| `solved` | `int(10)` | `0` | The ID of the comment that is the answer for the thread. | ### thread_subscriptions | Field | Type | Default | Description | | --- | --- | --- | --- | -| _`user_id`_ | `int(10)` | `0` | The ID of the user which this subscription belongs to. | -| _`thread_id`_ | `int(10)` | `0` | The ID of the thread which this subscription belongs to. | +| *`user_id`* | `int(10)` | `0` | The ID of the user which this subscription belongs to. | +| *`thread_id`* | `int(10)` | `0` | The ID of the thread which this subscription belongs to. | ### users | Field | Type | Default | Description | | --- | --- | --- | --- | -| _`id`_ | `int(10)` | ` ` | The auto-incrementing primary key for this table. | +| *`id`* | `int(10)` | ` ` | The auto-incrementing primary key for this table. | | `group_id` | `int(10)` | `3` | The ID of the group to which this user belongs. The default is LUNA_MemBER. | | `username` | `varchar(200)` | `""` | The users username. | -| `password` | `varchar(40)` | `""` | The users password hash. | +| `password` | `varchar(512)` | `""` | The users password hash. | +| `salt` | `varchar(8)` | `""` | The salt used on the password. | | `email` | `varchar(80)` | `""` | The users email address. | | `title` | `varchar(50)` | `NULL` | The user title. If this field is empty, the title from the user's usetgroup will be used. | | `realname` | `varchar(40)` | `NULL` | The real name of the user. | @@ -299,12 +319,10 @@ All fields in the groups table are prefixed with g_. This is to allow them to be | `show_img_sig` | `tinyint(1)` | `1` | Should images in signatures be shown to the user? | | `show_avatars` | `tinyint(1)` | `1` | Should avatars be shown to the user? | | `show_sig` | `tinyint(1)` | `1` | Should signatures to shown to the user? | -| `timezone` | `float` | `0` | The users timezone. | -| `dst` | `tinyint(1)` | `0` | Is the user currently observing daylight saving time? | +| `php_timezone` | `float` | `"UTC"` | The users timezone. | | `time_format` | `tinyint(1)` | `0` | The time format that the user uses. | | `date_format` | `tinyint(1)` | `0` | The date format that the user uses. | | `language` | `varchar(25)` | `"English"` | The language that should be used for this user. | -| `style` | `varchar(25)` | `"Luna"` | The name of the style that should be used for this user. | | `num_comments` | `int(10)` | `0` | The number of comments the user has made. Note: This is the number made, not the number that currently exist (i.e. when a comment is deleted this isn't decremented). | | `last_comment` | `int(10)` | `NULL` | A UNIX timestamp representing the time the user last made a comment. | | `last_search` | `int(10)` | `NULL` | A UNIX timestamp representing the time the user last performed a search. | @@ -316,9 +334,14 @@ All fields in the groups table are prefixed with g_. This is to allow them to be | `admin_note` | `varchar(30)` | `NULL` | A note that the administrator has entered. | | `activate_string` | `varchar(80)` | `NULL` | A temporary storage string for new passwords and new e-mail addresses. | | `activate_key` | `varchar(8)` | `NULL` | A temporary storage string for new password and new e-mail address activation keys. | -| `use_pm` | `tinyiny(1)` | `1` | Allow the user to use Inbox. | -| `notify_pm` | `tinyiny(1)` | `1` | Notify the user for now received Inbox items. | -| `notify_pm_full` | `tinyiny(1)` | `0` | Notify the user for new received Inbox items (full). | -| `num_pms` | `int(10)` | `0` | The amount of Inbox items for this user. | +| `use_inbox` | `tinyiny(1)` | `1` | Allow the user to use Inbox. | +| `notify_inbox` | `tinyiny(1)` | `1` | Notify the user for now received Inbox items. | +| `notify_inbox_full` | `tinyiny(1)` | `0` | Notify the user for new received Inbox items (full). | +| `num_inbox` | `int(10)` | `0` | The amount of Inbox items for this user. | | `first_run` | `tinyiny(1)` | `0` | Show the First Run experience. | -| `color_scheme` | `int(25)` | `3` | The color used by the theme for this user. | \ No newline at end of file +| `color_scheme` | `int(25)` | `1`* | The color used by the theme for this user. | +| `adapt_time` | `tinyiny(1)` | `0` | Whether or not the time should adapt automatically. | +| `accent` | `int(25)` | `1`* | The color used by the Backstage for this user. | +| `enforce_accent` | `tinyiny(1)` | `0` | If the accent should be enforced. | + +*This is a random number between 1 and 15, `color_scheme` and `accent` will always use the same random number. \ No newline at end of file diff --git a/editor.md b/editor.md index a84c616..9af6a68 100644 --- a/editor.md +++ b/editor.md @@ -1,9 +1,9 @@ # Editor and BBCode Luna has a very simple editor to use its BBCode features. This editor shows and allows you to include most of the supported BBCodes into your comments, however, it also contains a couple of additional features. -![Luna editor](https://getluna.org/docs/img/editor.png) +![Luna editor](https://getluna.org/img/editor.png) -# Basic features +## Basic features From left to right, the upper toolbar has the following features: * Pin the thread to its forum, this will make the thread stay on the top of the list, only available for admins and moderators with the required permissions when creating a new thread and editing the opening comment. @@ -26,12 +26,12 @@ From left to right, the upper toolbar has the following features: The bottom toolbar allows you to preview and submit your comment. -# Other BBCode features +## Other BBCode features Additional to the features listed above, Luna supports other features in its BBCode implementation that are not included in the editor. -* A range of emoticons. +* A range of emojis, including but not limited to `:)`, `:(`, `:@`, `;)` and `:P`. * `[ins][/ins]` Insert text, visual identical to strike-through text in most browsers. -* `[color=<color>][/color]` Where `<color>` is a color in either hexadecimal notation or name, changes the color of the text. +* `[color=][/color]` Where `` is a color in either hexadecimal notation or name, changes the color of the text. * `[email][/email]` Add an email address. * `[list=1][/list]` Make an ordered list. * `[list=*][/list]` Another notation for an unordered list. @@ -39,5 +39,7 @@ Additional to the features listed above, Luna supports other features in its BBC Additional to those options, there is a third set of features that have to be enabled in the Backstage to be used, just like the list above, these options do not appear in the editor. * `[center][/center]` Center the content. -* `[size=<size>][/size]` Where `<size>` in percentage relative to normal text in which size the text has to be displayed. -* `[spoiler][/spoiler]` Will hide content by default until clicked. \ No newline at end of file +* `[size=][/size]` Where `` in percentage relative to normal text in which size the text has to be displayed. +* `[spoiler][/spoiler]` Will hide content by default until clicked. + +Note that it is possible to disable the use of emojis, images and urls as well. \ No newline at end of file diff --git a/emoji.md b/emoji.md new file mode 100644 index 0000000..1eb5384 --- /dev/null +++ b/emoji.md @@ -0,0 +1,10 @@ +# Emoji +Luna 2.1 replaces the old emoji implementation with a customizable system that you can manage from the Backstage + +## Add emoji +You can add a new emoji by entering a BBCode (e.g. `:)`) in the sidebar followed by the Unicode that represents that emoji (e.g. `1f601`). A full list of emoji can be found on the [Unicode website](http://unicode.org/emoji/charts/full-emoji-list.html). You can reuse the same Unicode to match multiple BBCode. Also note that Luna already takes care of the prefix `U+`, you don't need to add it yourself. + +## Editing and removing emoji +On the right hand side you can see an overview of all emoji. Here you can change which BBCode should create which emoji. Additionally, you can remove an emoji by clicking "Delete". + +Note that you cannot edit and remove multiple emoji at a time. Editing multiple emoji is possible, but removing an emoji while doing that will cause the page to reset. First save your changes before removing an emoji. \ No newline at end of file diff --git a/features.md b/features.md new file mode 100644 index 0000000..727938c --- /dev/null +++ b/features.md @@ -0,0 +1,52 @@ +# Features +## General +* __Censoring__: censor words set in the censoring feature. +* __Number of views__: show the number of views each thread has, requires theme support. +* __Mark used threads__: shows a small icon in front of threads an user has interacted with. +* __Index statistics__: show information about the users that are currently on the board. +* __Ranks__: use ranks. +* __Advanced search__: allow users to use the advanced search feature which contains a number of filters and sorting options. +* __Search forums__: allow users to search in only one forum at a time or all of them. + +## Inbox +* __Inbox__: allow users to use the buit-in private messaging system "Inbox". +* __Receivers__: the maximum number of users one message can be send to. + +## Subscriptions +* __Forums__: allow users to subscribe to forums, any new thread in the forum will generate a subscription message. +* __Threads__: allow users to register to individual threads. + +## First run +* __Show to users__: shows the "First run" panel with user's profile picture, a welcome text and a number of actions to start using the board. +* __Show to guests__: shows the "First run" panel to guests with the default avatar, links to register or restore a password and a login form. +* __Welcome text__: the text that will be shown in the middle of the "First run" panel for new users. + +## BBCode +* __Center__: allow users to use the `[center]`-tag to center content in their comments. +* __Size__: allow users to use the `[size]`-tag to make text of different sizes. +* __Clickable links__: automatically finds URLs in comments and makes them clickable. +* __Img__: allow users to use the `[img]`-tag to add images in their comments. +* __Spoiler__: allow users to use the `[spoiler]`-tag to hide content behind a collapsable panel in their comments. +* __Signature emojis__: automatically convert emojis to a graphical image. +* __Signature img__: allow the user of images in signatures. +* __Indent size__: the number of spaces that represent a tab in a `[code]`-block. +* __Maximum `[quote]` depth__: maximum number of times the `[quote]`-tag can be used within itself. + +## Commenting +* __All caps comments__: allows a comment to be written in all caps. +* __All caps subject__: allows subjects of new threads to be written in all caps. +* __Guests__: require guests to supply an e-mail address when they want to comment. This setting only has any effect if guests are allowed to comment in their group permissions. + +## Avatars +* __Use avatars__: allow users to have avatars to visually represent them on the board. +* __Upload directory__: the location where Luna will store the avatars used by users. When changing this folder, make sure that the permission is set to allow from writing to it. +* __Max width__: maximum width in pixels an avatar can be. +* __Max height__: maximum height in pixels an avatar can be. +* __Max size__: maximum size in bytes an avatar can be. +* __Default avatar__: the default avatar users will have when registering on your board or guests will if they place a comment. + +## Signatures +* __Signatures__: enable to allow users to have a default text close of their comments n the board. +* __All caps__: allows a signature to be written in all caps. +* __Maximum signature length__: maximum number of characters a signature can be. +* __Maximum signature lines__: number of lines a signature can maximum be. \ No newline at end of file diff --git a/first.md b/first.md new file mode 100644 index 0000000..d0f0007 --- /dev/null +++ b/first.md @@ -0,0 +1,38 @@ +# First steps + +You just started with a new Luna installation? Allow us to run you through a number if things you should do first. But before we get started, after the installation is done, you're not logged in. So do that first. + +## Remove `install.php` +After installing Luna, there is no need for the installer anymore, which is why you should remove it. Got to your website (through FTP or any other means) and remove the `install.php` file in the root folder. The Backstage will warn you if this file still exist and although it is not technically a threat, we highly recommend you remove it. + +## Setup categories and forums +A fresh Luna installation comes with no content. Including any categories or forums. To make new categories and forums you have to go to the Backstage. + +The Backstage is the first icon on the right side of the navbar, the tachometer-icon. When you click on it, the Backstage opens. You can now go to Content > Board to create new categories and forums. However, since you're new, Luna will show you a "Welcome to Luna" panel on the Backstage's home page. There is a button titled "Create new sections", which also brings you to this page. + +First, you'll have to add a new category. Fill in a name and then click "Add". Now that you've added a new category, options to add new forums have appeared on the page. Choose the category you want to add a forum to, fill in a name and click "Add" in the "Add forum" panel. + +Luna will show you a set of options that you can set to change your forum. This includes the name, a description to explain what the forum should be used for, the parent section if you want this forum to be a child of another forum, the category it should be in and the way the threads in it should be sorted. + +There are also a number of customization options to change the look of the forum. This includes setting a Font Awesome icon and the forum color. Note that you don't have to set an icon, it is just optional. Finally, you can allow users to mark threads as "Solved". This is a great option to leave enabled if a forum is used to help people with problems rather than just discussions. + +## Add board rules +A good board has a good set of rules. Rules can be added by going to Settings > Settings > Registration. Here you can manage everything that has to do with new users. For example, you can disable the registration form all together. Rules will be shown when users are registering for your board and they'll have to accept them to continue. + +## Branding +Your board should carry your look. In Settings > Settings > Branding you can change a number of important settings. You already set a number of these during the installation process, but I'd like to iterate over some of them: + +* __Description__: for Search Engine Optimization (SEO) purposes, it is important to have a description of what your board is about. +* __Tags__: tags are important for SEO as well. This should be a list of keywords separated by a comma that match the contents of your forum. +* __Favicon__: the icon that will make your board recognizable in the browser UI. We highly recommend you change it. + +_See [themes](themes)_ + +More style-related options can be found under Settings > Settings > Theme. Here you can choose the theme you're users see. Luna comes, by default, with 3 themes: Fifteen, Sunrise and Typography. + +You can also change a number of settings regarding accent colors. All themes included with Luna provide you with a set of 15 colors to choose from how your website looks. You can disable this at any time and force users to use the preset accent. Night mode, another option here, allows users to enable a dark design. + +Other options in this secion include custom CSS in case you are familiar with CSS options as well as setting a header background. The later option requires theme support to properly work. + +## Ranks +For users, it is often fun to get a "promotion" after posting a certain amount of threads and comments. In Users > Ranks you can do just that. Fill in a rank title and a minimum comments count and click "Add" to add new ranks to your board. Whenever a user passes a certain number of comments, their rank will increase. \ No newline at end of file diff --git a/forums.md b/forums.md new file mode 100644 index 0000000..9bd43e9 --- /dev/null +++ b/forums.md @@ -0,0 +1,28 @@ +# Forums +If you don't see any forum options under Content > Board you probably have yet to create a [category](categories). + +## Add forums +After you have at least one category, you can start creating forums. Under 'Add forum' you chose the category you want to add a forum to and the name you want it to have. Click on 'Add forum'. Your forum is now created and is already accessible for the users of your board. + +Luna will now redirect you to the forums details. For more information, see "Manage forums". + +## Manage forums +Under 'Manage board', Luna shows you all categories you have created with all forum order by category and order. + +### Quick edit +By clicking on a forum title in 'Manage board', you can see a number of quick settings. This includes the name, position, icon and forum color. Additionally, Luna will show you a quick button to delete the forum. Deleting a forum also deletes all threads and comments within the forum and is irreversable. + +### Forum details +By clicking on "Edit" in "Manage board", you can change all settings about the forum. + +* __Forum name__: the name of the forum as it will appear everywhere. +* __Description__: a short text that can be used to describe what the forum is for, depending on the theme, this will appear on the home page, within the forum itself or both. +* __Parent section__: if you want your forum to be a subforum, you can select another forum here. +* __Sort threads by__: the order in which threads need to be sorted. You can sort by "Last comment", "Thread start" and "Subject". Note that stickies can overwrite this order to appear first. +* __Icon__: the icon your forum uses. This consists out of 2 individual settings. + * __Style__: the first setting allows you to choose the style of the icon which can either be "`fas` (solid)", "`far` (regular)", "`fal` (light)" or "`fab` (brand)". Note that `fal` is only available when [Font Awesome Pro](fontawesome) is present. + * __Icon__: the icon itself can be any icon available in the [Font Awesome icon guide](https://fontawesome.com/icons) that is available in Font Awesome Free. If you have Font Awesome Pro enabled, all icons in the guide are available to you. +* __Forum color__: the color the forum can use on anywhere to set itself apart from other forums. The extensiveness of the use of this color is up to the theme. +* __Solved__: allow users to mark threads as solved and comments as the prefered solution. If your forum is just for discussions, it might be useful to turn this off. If your forum is a "question and answer" forum, this is very useful. + +Finally, there is a "Group permissions" panel. Here you see every group and can control their permission to read the forum and their permission to comment and create new threads. Clicking the "Revert to default" button will reset the forum's permissions. \ No newline at end of file diff --git a/groups.md b/groups.md new file mode 100644 index 0000000..58f83b5 --- /dev/null +++ b/groups.md @@ -0,0 +1,67 @@ +# Groups +Groups are a way to control the permissions the users of your board have. + +## Default groups +Luna, by default, presets 4 different groups. + +- __Guests__: guests have permission to view the forum, but not to perform any other actions. They can only search. +- __Members__: a member has a wide set of permissions, compared to Guest. A member can create new threads, respond to other threads, edit their comments and delete their comments and threads (and any comment on that thread, regardless of who posted it). +- __Moderators__: a moderator has full control over forum content. However, being a moderator doesn't give someone power to perform any moderator-tasks on their own. They do have access to the Backstage, but only to a very limited number of pages. Settings, forum configuration, maintenance and more are not available to them. To allow a moderator to actually perform moderation, you will need to assign them one or more forums in their profile. +- __Administrators__: admins have full access to the Mainstage and Backstage. They can moderate all forums. + +You can't set any of these groups as default group with the exception of Members, which is the default default group. None of these 4 groups can be removed. + +## New group +To add a new group, go to Backstage > User > Groups. Go to the "New group base" panel a choose a group on which to base your new group. When you've choosen one, click "Add". + +## Default group +By default, Luna will put all registered users in the "Members" group. If you want to change that, you can do so by choosing another group in the dropdown list in the "Default group" panel and clicking "Save". Note that Administrators, Moderators and Guests cannot be set as a default group. + +## Group settings +### Name options +* __Group title__: the title of the group, this will be visible in the user's profile. +* __User title__: a title you want to give to the users within this group, this will overwrite any title they may have from the ranks you've set + +### Moderator options +* __Moderator__: allow users in this group to have access to moderator settings for forums. Which forums a user can moderate have to be set in their profile. +* __Edit profiles__: allow a moderator te edit others profile (with limits). +* __Rename users__: allow a moderator to change the name of any user. +* __Change passwords__: allow a moderator to change the password of any user. +* __Ban__: allow a moderator to ban other users. + +### Inbox options +* __Inbox__: allow users in this group to use Inbox. +* __Receivers__: the number of messages a user can have in thier Inbox. If you set this to `0`, they will have an unlimited Inbox. + +## Permission options +* __Read__ + * Allow a user to read the content of the board. + * Allow a user to view the user list and profiles. +* __Create__ + * Allow a user to comment on a thread. + * Allow a user to create a new thread. +* __Edit__ + * Allow users to edit their own comments. +* __Delete__ + * Allow users to delete their own comments. + * Allow users to delete their own threads and all comments in that thread, including those not posted by them. +* __Hide__ + * Allow users to view comments and threads that have been hidden from the baord. + * Allow users to hide comments from other users. + * Allow users to hide threads from all users. + +### Title options +* __Set own user title__: allow users to change their title themselves, this overwrites both the user group's user title as well as the rank system. + +## Search options +* __Search content__: allow users to search through the board. +* __Search users__: allow users to perform a search request in the user list. + +### Mail options +* __Send e-mails__: allow users to view and use the "Send mail" button in user profiles. + +### Flood options +* __Comment flood interval__: require a number of seconds to have passed before a user can post their next comment. +* __Search flood interval__: require a number of seconds to have passed before search queries are accepted again. +* __Email flood interval__: require a number of seconds to ahve passed before they can send anther mail to the user. +* __Report flood interval__: require a number of seconds to ahve passed before they can file another post as a report. \ No newline at end of file diff --git a/identity.md b/identity.md index 0781696..be75e14 100644 --- a/identity.md +++ b/identity.md @@ -1,9 +1,9 @@ # Identity The Luna branding was designed by [Studio 384](https://studio384.be) for the launch of Luna. The logo has been with Luna ever since it got announced. The font has changed during that time. Earlier versions of the logo used the Segoe UI Regular fontface and was stylized as "Luna". In a later revision, the logo got stylized as "LUNA" and in the third and current revision, used as of the early Luna Previews, the fontface changed to Segoe UI Semibold. -![Logo](https://getluna.org/docs/img/logo_small_transparent.png) +![Logo](https://getluna.org/img/logo_small_transparent.png) ## Metrics The Logotype is composed of the moon-mark, and the “Luna” wordmark. The proportional relationship between the two are demonstrated below. The moon-mark dictates the set of proportions for the whole logotype, and the wordmark is half the height of the moon-mark. There is a set safety margin around the logo, that measures half the size of the moon-mark. This is very similar to the way others use metrics to define their logo proportions, like WordPress. -![Logo formats](https://getluna.org/docs/img/logo_small_format.png) \ No newline at end of file +![Logo formats](https://getluna.org/img/logo_small_format.png) \ No newline at end of file diff --git a/img/editor.png b/img/editor.png index c10fbfa..fd4485e 100644 Binary files a/img/editor.png and b/img/editor.png differ diff --git a/index.md b/index.md index 2912d3d..1ff98bc 100644 --- a/index.md +++ b/index.md @@ -1,21 +1,44 @@ # What do you want to do today? -
- + \ No newline at end of file diff --git a/index_design.md b/index_design.md deleted file mode 100644 index d6318a9..0000000 --- a/index_design.md +++ /dev/null @@ -1,10 +0,0 @@ -# Design guidelines -
-
-
-
Brand
- Identity - Colors -
-
-
\ No newline at end of file diff --git a/index_develop.md b/index_develop.md deleted file mode 100644 index ac68483..0000000 --- a/index_develop.md +++ /dev/null @@ -1,33 +0,0 @@ -# Develop Luna - \ No newline at end of file diff --git a/index_develop_for.md b/index_develop_for.md deleted file mode 100644 index 6a3715f..0000000 --- a/index_develop_for.md +++ /dev/null @@ -1,28 +0,0 @@ -# Develop for Luna -
-
-
-
Customize
- Themes - Plugins - Language packs -
-
-
-
-
Develop
- Troubleshooting -
-
- -
\ No newline at end of file diff --git a/index_use.md b/index_use.md deleted file mode 100644 index c79c120..0000000 --- a/index_use.md +++ /dev/null @@ -1,35 +0,0 @@ -# Use Luna -
-
-
-
Get started
- Installation - Setting up your board - Updating -
Develop
- Troubleshooting -
-
- -
-
-
Customize
- Font Awesome - Customizing -
General
- Cookies - Data collection -
-
-
\ No newline at end of file diff --git a/install.md b/install.md index c7e9bff..ab8283d 100644 --- a/install.md +++ b/install.md @@ -1,25 +1,39 @@ # Installation -## Install manually +## System requirements +You are going to need a number of things before you can run Luna. + +* PHP 5.4 or later, PHP 7.1 or later recommended +* A database running either + * MySQL Improved 5.5 or later + * SQLite 2 or 3 + * PostgreSQL 8.0 or later +* Recommended + * PHP accelerator such as APC or XCache + * PHP zlib module + +## Installation 1. Copy and/or upload all contents into the directory where you want to run your forums. 2. Create a database for the forum to use. * For MySQL: * Using your web host's control panel - * Using PHPMyAdmin + * Using [PHPMyAdmin](http://www.phpmyadmin.net) * For SQLite: * Do nothing, the install script will automatically create the database. 3. Run `install.php` from the forum root directory and follow the on-screen instructions. 4. Delete `install.php` after the installation is completed. The Backstage will warn you in case you forget this step. ### Write permissions -In order for Luna to run correctly PHP must have write permissions for `/cache/` and `/img/avatars/`. Under Windows, and certain Linux configurations this isn't a problem. If the install script notices these directories aren't writeable it will warn you. To fix this they must be set to CHMOD 777. +In order for Luna to run correctly PHP must have write permissions for `/cache/` and `/img/avatars/`. Under Windows, and certain Linux configurations this isn't a problem. If the install script notices these directories aren't writeable it will warn you. To fix this they must be set to `CHMOD 777`. ## Install options +When installing, Luna will ask you first which language you want to use to go through the installation process. This is not the language that Luna will use as the default system language. + ### Database type Luna will automatically check which database engines your server can support and provide a drop down menu with available options. Usually it is recommended to use "MySQL Improved" or "MySQL Improved (InnoDB)". ### Database server hostname -The address of the database server (example: localhost, db.myhost.com or 192.168.0.15). You can specify a custom port number if your database doesn't run on the default port (example: localhost:3580). For SQLite support this field is ignored. +The address of the database server (example: `localhost`, `db.myhost.com` or `192.168.0.15`). You can specify a custom port number if your database doesn't run on the default port (example: `localhost:3580`). For SQLite support this field is ignored. ### Database name The name of the database that Luna will be installed into. The database must exist. For SQLite, this is the relative path to the database file. If the SQLite database file does not exist, Luna will attempt to create it. @@ -28,13 +42,13 @@ The name of the database that Luna will be installed into. The database must exi Enter the username and password with which you connect to the database. Ignore for SQLite. ### Table prefix -If you like, you can specify a table prefix. This way you can run multiple copies of Luna in the same database (example: foo_). +If you like, you can specify a table prefix. This way you can run multiple copies of Luna in the same database (example: `foo_`). ### Administrator's username -This specifies the username for the forum's first user/administrator. +This specifies the username for the forum's first user; the administrator. ### Administrator's password (and confirmation) -These fields dictate what said administrator's password is. It is recommended that this be a strong password, as it is a strong user in regards to the forum. +These fields dictate what said administrator's password is. It is recommended that this be a strong password given that the administrator will have all control over the forum. ### Administrator's email This email is not only used for the administrator users account but it, by default, is set as the webmaster email, administrator email, and it is added to the mailing list for reports by the forum's users. @@ -42,14 +56,17 @@ This email is not only used for the administrator users account but it, by defau ### Board title This sets the title of the board which appears at the uppermost left corner of the forum and the title in the browser window as well as being included in forum-generated emails. +### Board slogan +This is for use within the site, here you can put your slogan. For example `You can do anything`. + ### Board description -The board description is located under the board title in the uppermost left corner. +The board description is located under the board title in the uppermost left corner. This is the text that will appear in search results for your board. ### Base url -This setting sets the base of the urls for the forum. It is vital that this is set correctly, as it can cause permission issues and/or cause the site to cease to function. In most cases the default should be okay. +This setting sets the base of the urls for the forum. It is vital that this is set correctly, as it can cause permission issues and/or cause the site to cease to function. In most cases the default should be okay. ### Default language -This setting dictates which translation of the board to use. +This setting dictates which language the board should use by default. ### Default style This sets the default style used by the board for new or non-registered users. \ No newline at end of file diff --git a/labels.md b/labels.md index d54bd00..8b66373 100644 --- a/labels.md +++ b/labels.md @@ -14,7 +14,7 @@ To indicate the status of a thread, Luna uses colored labels in front of the thr Threads marked with a check are solved according to the author. - + Pinned threads are usually important to read. It's worth it to take a look there. @@ -26,7 +26,7 @@ To indicate the status of a thread, Luna uses colored labels in front of the thr When a you see a closed label, it means you can't comment on that thread any more, unless you have a permission that overwrites this. The thread is still available to read, though. - + This thread has been moved to another forum. Admins and moderators can choose to show this notification, or simply not show it. The original forum where this thread was located in, won't show any thread stats anymore. diff --git a/maintenance.md b/maintenance.md new file mode 100644 index 0000000..d6b879e --- /dev/null +++ b/maintenance.md @@ -0,0 +1,22 @@ +# Maintenance +## Maintenance +Maintenance shows a message to your board visitors when enabled. When this message is active, you should not log out of Luna as the login page will be unavailable to you. If you did logout you can surpress maintenance mode by adding the following line to `config.php`: + +```php +define('LUNA_TURN_OFF_MAINT', 1); +``` + +## Cache +Clearing the cache will drop all files in the `/cache/`-folder in Luna's root. This will cause the first request to the various cached data to take a little longer to load. The following data will be cached by Luna: + +* Bans +* Censored words +* Configuration +* Emoji +* Ranks +* Stopwords +* Update information +* Users info + +## Rebuilding search index +If you have added, edited or removed comments manually in the database or if you are having problems searching, you should rebuild the search index. This can be accessed under the "maintenance" menu item, and basically involves looking at all the comments in your forum and indexing the words that make them up in an efficient way to facilitate fast and efficient searching. \ No newline at end of file diff --git a/menu.md b/menu.md new file mode 100644 index 0000000..84a9366 --- /dev/null +++ b/menu.md @@ -0,0 +1,17 @@ +# Menu +Luna comes with a fully customizable menu system. By default, there are 3 links availbale: + +* __index.php__: the link to the homepage of your board. +* __userlist.php__: the link to the user list of your board. +* __search.php__: the link to the search engine included in Luna. + +## New item +A new item can be added by filling out the "New item" panel with a name, url and position. + +* __Name__: this is the text that will be used in the menu to represent the menu item. +* __URL__: the URL that the item will link to, can be both internal and external. +* __Position__: the position of the item relative to the other items. +* __Visible__: whether or not to show the menu item. + +## Edit menu and delete items +In the "Menu" panel, yo ucan change the various details of ech menu item. The default links cannot be removed, however, you can disable them by unchecking "Show". All items can be saved together by clicking "Save", however, you can only delete one item at a time. \ No newline at end of file diff --git a/organizing.md b/organizing.md deleted file mode 100644 index 744812f..0000000 --- a/organizing.md +++ /dev/null @@ -1,34 +0,0 @@ -# Organizing -## Categories -### Add categories -When you have installed Luna. You would ake to start using it. Before you can create new forums, you need to create one or more category/ies. You can add new categories in the admin panel under 'Categories'. Under 'Add categories' you typ the name in the text box of the category you want to create. Cack on 'Add new'. The category appears under 'Edit categories' with number '0'. - -### Delete categories -To delete categories, you simply select the categorie you want to delete in the drop down menu under 'Delete categories'. Then, you cack at 'Delete'. Notice that all forums, threads and comments inside the categorie you remove, also will be removed. - -### Edit categories -You can change 2 settings at you categories. The name, and the position. You can easily change the name of you category by changing the name in the text box. The position of the category is set with the number in the second field. How higher the number in the field, how lower the category is ranked in your forum. - -## Forums -### Add forums -After you have at least one category, you can start creating forums. You can add a new forum in the admin panel under 'Forums'. Under 'Add categories' you chose the category you want to add a forum to. Cack on 'Add forum'. After that, your new forum appears under 'Edit forums'. Cack on 'Edit' to change the settings of your new forum. Here you can set the name, the description (the text below the forum name on the index), the category, the order of the threads, the Font Awesome icon and the forum's color. - -Under 'Edit group permissions for this forum', you can change the permission of moderators, users and guests. Notice that, if you turn off 'Read forum', the forum isn't visible for that group. - -### Delete forums -To delete a forum, you simply cack on 'Delete' under 'Edit forums'. Notice that all threads and comments inside the forum you remove, also will be removed. - -### Edit forums -You can change the position of forums at the same way as the position of categories. Just, by changing the number in behind the forum. How higher the number in the field, how lower the forum is ranked in the category. - -## Ranks -With ranks, you can give users a subtitle when they reach a comment count. You can easily add new ranks at the page 'Ranks' in the admin panel. - -### Create ranks -You can create a new rank by cacking on 'Add' under 'Add new rank'. - -### Edit ranks -You can edit a rank under 'Existing ranks'. You just need to cack on 'Edit' to see the settings of the rank. - -### Remove ranks -To remove ranks, you just need to cack on 'Delete' in the row of the rank you want to delete. \ No newline at end of file diff --git a/pages.json b/pages.json index c9a8686..315a727 100644 --- a/pages.json +++ b/pages.json @@ -4,85 +4,161 @@ "index": "index", "categories": [ { - "title": "Documentation", - "icon": "fal fa-fw fa-book", + "title": "Luna", + "icon": "fal fa-fw fa-moon", + "pages" : [ + { "id": "install", "title": "Get started" }, + { "id": "backstage", "title": "Backstage" }, + { "id": "editor", "title": "Mainstage" } + ] + }, { + "title": "Developers", + "icon": "fal fa-fw fa-code", + "pages" : [ + { "id": "themes", "title": "Extend Luna" }, + { "id": "tools", "title": "Develop Luna" } + ] + }, { + "title": "Design", + "icon": "fal fa-fw fa-swatchbook", "pages" : [ - { "id": "index_use", "title": "Use Luna" }, - { "id": "index_for", "title": "Develop for Luna" }, - { "id": "index_develop_for", "title": "Develop Luna" }, - { "id": "index_design", "title": "Design guidelines" } + { "id": "identity", "title": "Design guidelines" } + ] + }, { + "title": "More", + "icon": "fal fa-fw fa-plus", + "pages" : [ + { "id": "../releases", "title": "Release notes" }, + { "id": "https://github.com/GetLuna/Luna/issues/new?template=bug_report.md", "title": "Bug report" }, + { "id": "https://github.com/GetLuna/Luna/issues/new?template=feature_request.md", "title": "Feature request" } ] } ] }, { - "id": "use", - "index": "index_use", + "id": "getstarted", + "index": "install", "categories": [ { "title": "Get started", "icon": "fal fa-fw fa-moon", "pages" : [ { "id": "install", "title": "Installation" }, - { "id": "setup", "title": "Setting up your board" }, - { "id": "upgrading", "title": "Updating" } + { "id": "first", "title": "First steps" } + ] + } + ] + }, + { + "id": "backstage", + "index": "backstage", + "categories": [ + { + "title": "Backstage", + "icon": "fal fa-fw fa-tachometer-alt", + "pages" : [ + { "id": "backstage", "title": "Backstage" }, + { "id": "update", "title": "Update & about" } ] }, { - "title": "Mainstage", - "icon": "fal fa-fw fa-home", + "title": "Content", + "icon": "fal fa-fw fa-file", "pages" : [ - { "id": "editor", "title": "Editor & BBCode" }, - { "id": "labels", "title": "Thread labels" } + { "id": "categories", "title": "Categories" }, + { "id": "forums", "title": "Forums" }, + { "id": "reports", "title": "Reports" }, + { "id": "censoring", "title": "Censoring" } ] }, { - "title": "Backstage", - "icon": "fal fa-fw fa-tachometer-alt", + "title": "Users", + "icon": "fal fa-fw fa-users", "pages" : [ - { "id": "backstage", "title": "Backstage" }, - { "id": "organizing", "title": "Organizing" }, - { "id": "admin", "title": "Administration" }, - { "id": "antispam", "title": "Fighting spam" } + { "id": "ranks", "title": "Ranks" }, + { "id": "groups", "title": "Groups" }, + { "id": "bans", "title": "Bans" } ] }, { - "title": "Customize", - "icon": "fal fa-fw fa-paint-brush", + "title": "Settings", + "icon": "fal fa-fw fa-cogs", "pages" : [ - { "id": "fontawesome", "title": "Font Awesome" }, - { "id": "customizing", "title": "Customizing" } + { "id": "settings", "title": "Settings" }, + { "id": "features", "title": "Features" }, + { "id": "appearance", "title": "Appearance" }, + { "id": "theme", "title": "Theme" }, + { "id": "emoji", "title": "Emoji" }, + { "id": "menu", "title": "Menu" } ] }, { - "title": "Develop", - "icon": "fal fa-fw fa-wrench", + "title": "Maintenance", + "icon": "fal fa-fw fa-coffee", "pages" : [ + { "id": "maintenance", "title": "Maintenance" }, + { "id": "prune", "title": "Prune" } + ] + }, { + "title": "Extra's", + "icon": "fal fa-fw fa-plus", + "pages" : [ + { "id": "fontawesome", "title": "Font Awesome" }, + { "id": "antispam", "title": "Fighting spam" }, + { "id": "customizing", "title": "Customizing" }, { "id": "troubleshooting", "title": "Troubleshooting" } ] + } + ] + }, + { + "id": "use", + "index": "editor", + "categories": [ + { + "title": "Mainstage", + "icon": "fal fa-fw fa-home", + "pages" : [ + { "id": "editor", "title": "Editor & BBCode" }, + { "id": "labels", "title": "Thread labels" } + ] }, { "title": "General", "icon": "fal fa-fw fa-info-circle", "pages" : [ - { "id": "cookies", "title": "Cookies" }, - { "id": "data", "title": "Data collection" } + { "id": "cookies", "title": "Cookies" } ] } ] }, { "id": "for", - "index": "index_develop_for", + "index": "themes", "categories": [ - { - "title": "Customize", - "icon": "fal fa-fw fa-paint-brush", + { + "title": "Themes", + "icon": "fal fa-fw fa-palette", "pages" : [ { "id": "themes", "title": "Themes" }, - { "id": "plugins", "title": "Plugins" }, + { "id": "theming_footer", "title": "Theming footer.php"}, + { "id": "theming_header", "title": "Theming header.php"}, + { "id": "theming_profile", "title": "Theming profile.php"}, + { "id": "theming_settings", "title": "Theming settings.php"}, + { "id": "theming_pagination", "title": "Theming pagination" } + ] + }, { + "title": "Translations", + "icon": "fal fa-fw fa-language", + "pages" : [ { "id": "translations", "title": "Language packs" } ] + }, { + "title": "Plugins", + "icon": "fal fa-fw fa-puzzle-piece", + "pages" : [ + { "id": "plugins", "title": "Plugins" } + ] }, { "title": "References", - "icon": "fal fa-fw fa-bookmark", + "icon": "fal fa-fw fa-id-card", "pages" : [ - { "id": "constats", "title": "Constants" }, + { "id": "constants", "title": "Constants" }, { "id": "dbstructure", "title": "Database structure" }, { "id": "dblayer", "title": "Database layer" }, { "id": "variables", "title": "Global variables" }, @@ -94,14 +170,15 @@ }, { "id": "develop", - "index": "index_develop", + "index": "tools", "categories": [ { "title": "Develop", "icon": "fal fa-fw fa-wrench", "pages" : [ - { "id": "php_conventions", "title": "PHP coding conventions" }, - { "id": "css_conventions", "title": "CSS coding conventions" } + { "id": "tools", "title": "Developer tools" }, + { "id": "conventions", "title": "Coding conventions" }, + { "id": "css_conventions", "title": "(S)CSS coding conventions" } ] }, { "title": "Contributing", @@ -123,7 +200,7 @@ }, { "id": "design", - "index": "index_design", + "index": "identity", "categories": [ { "title": "Brand", diff --git a/php_conventions.md b/php_conventions.md deleted file mode 100644 index 26f38e7..0000000 --- a/php_conventions.md +++ /dev/null @@ -1,55 +0,0 @@ -# PHP coding conventions -
These coding conventions apply for Luna 2.0 and higher versions.
- -The rules and recommendations set forth in this section apply to PHP, Javascript, SQL and any other programming language (where applicable) in use by Luna. Please note that tabs in this document have been substituted by spaces for visual reasons only. - -## Naming convention -The naming rules apply to the naming of variables, functions, classes, attributes, arrays, array elements, HTML form fields, query string parameters, database tables, database fields as well as any other applicable entities. - -* All names should be all lowercase. -* Use `_` (underscore) as word separator. E.g. `date_format`. Never start a name with the underscore character (except for nested functions, which should always start with an underscore character). -* Use the prefix `num` for entities that represent a count. E.g. `num_users`. Use the prefix `cur` for entities that represent the current element when iterating through any type of collection (database result set, array etc). E.g. `cur_user`. -* Avoid all forms of Hungarian notation or derivatives or variations thereof. -* Use common sense. If in doubt, look at similar sections in the Luna source code. - -## Brace policy and indentation -The indent style and brace policy of choice for the Luna project is the [K&R 1TBS style](https://en.wikipedia.org/wiki/Indent_style#Variant:_1TB). All indentation should be made using tabs (with a tab size of 4), not spaces. - -Here's an example: - -```php -if ($a == $b) { - do_something(); -} else { - do_something_else(); -} -``` - -Note the whitespace between the keyword and the parenthesis. One allowed exception from the standard Allman style is "braceless" blocks. The use of braceless blocks is actually encouraged. - -For example: - -```php -if ($a == $b) - do_something(); -else - do_something_else(); -``` - -## Line breaks and encoding -All line breaks should be CR LF Windows only. Set your editor to save files with Windows style line breaks. All files should be saved using UTF-8 encoding. - -## PHP-specific -The following rules apply only to PHP. - -* Use singlequotes as opposed to doublequotes when working with strings. E.g. `$str = 'Users: '.$num_users;` as opposed to `$str = "Users: $num_users";`. -* Leave one line of whitespace above and below each block of markup, provided the block constitutes multiple lines of markup. I.e. one empty line above each `?>` and below each ` Download Example 2.1.0 Plugin for Luna + +It is important to naote that Luna 2.x does not provide official support for plugins. ## Available classes and ids to style your plugin -In the Backstage, you can use all Bootstrap 3.3 ellements to give your plugin a nice interface. However, Luna has its own ellements too, like the panel-header buttons. You can add more CSS to your templates, we recommend you to use the default Backstage style as much as possible. This will prevent further issues. \ No newline at end of file +In the Backstage, you can use all Bootstrap 4 elements to give your plugin a nice interface. However, Luna has its own elements too, like the card-header buttons. You can add more CSS to your templates, we recommend you to use the default Backstage style as much as possible. This will prevent further issues. \ No newline at end of file diff --git a/prune.md b/prune.md new file mode 100644 index 0000000..6a26bc3 --- /dev/null +++ b/prune.md @@ -0,0 +1,35 @@ +# Pruning +

Pruned comments, notifications and users can never be restored.

+The prune feature can be used to delete old inactive comments from your forums, notifications or inactive users. + +

For best performance, you should put the forum in maintenance mode during pruning.

+ +## Notifications +Pruning notifications can be useful if you have a large board and rather not have the notification table grow to much. + +* __Days old__: the number of days old a notifications should be before it is considered to be pruned. +* __Type__ + * __All notifications__: any notification that has the given age will be removed, no matter the stat it is in. + * __Sene notifications__: only notifications that already have been interacted with will be pruned as long as they are older than the days given. Any unseen notification that is beyond the given age will remain available. + * __New notifications__: only notifications that have not yet been interacted with will be pruned as long as they are older than the days given. Any seen notification that is beyond the given age will remain available. + +## Comments +Pruning comments is highly discourage as this might break some threads. + +* __Days old__: the number of days old a comment should be before it is considered to be pruned. +* __Prune pinned threads__: whether or not pinned threads should also be pruned. +* __Prune from__: the forum which you want to prune, or you could choose to prune all forums. + +## Users +Pruning users can be also be done but is once again highly discouraged. + +* __Minimum days__: minimum number of days since the action specified in "Since". +* __Since__ + * __Registration__: look at the registration date to remove the user. + * __Last login__: look at the last login date to remove the user. +* __Maximum number of comments__: maximum number of comments an user can have before he/she is pruned. +* __Delete management__: delete users with management access. +* __User status__ + * __Delete any__: delete any type of user, no matter their verification. + * __Delete only verified__: delete any user that matches the requirements and has been verified. + * __Delete only unverified__: delete any user that matches the requirements and has been unverified. \ No newline at end of file diff --git a/ranks.md b/ranks.md new file mode 100644 index 0000000..7781c7a --- /dev/null +++ b/ranks.md @@ -0,0 +1,11 @@ +# Ranks +With ranks, you can give users a subtitle when they reach a comment count. You can easily add new ranks at the page 'Ranks' in the admin panel. + +## Create ranks +You can create a new rank by cacking on 'Add' under 'Add new rank'. + +## Edit ranks +You can edit a rank under 'Existing ranks'. You just need to cack on 'Edit' to see the settings of the rank. + +## Remove ranks +To remove ranks, you just need to cack on 'Delete' in the row of the rank you want to delete. \ No newline at end of file diff --git a/reports.md b/reports.md new file mode 100644 index 0000000..2353857 --- /dev/null +++ b/reports.md @@ -0,0 +1,10 @@ +# Reports +Reports are a way for the users of your board to help you manage the content on it. When one of your users reports a comment, he/she can provide a reason. All of this is displayed under "Reprots". + +## New reports +New reports are listed under "New reports". Here you can see any of the reports that nobody has yet interacted with. The titlebar of a report shows you who reported it at what time. Below that is the breadcrumb path to where the comment that was reported originated from. + +Then you can see the reason the user reported the comment with the comment. From here on out, we give you 3 options: "Mark as read" to move it to "Old reports", "Edit" to edit the comment and "Remove" to remove the comment entirely. Note that "Remove" will remove an entire thread if the reported comment is the first comment in the thread. + +## Old reports +Old reports show you the same information as new reports, however the options have been swapped out by a text telling you who of your moderators managed the report. \ No newline at end of file diff --git a/settings.md b/settings.md new file mode 100644 index 0000000..8b8d647 --- /dev/null +++ b/settings.md @@ -0,0 +1,56 @@ +# Settings +## Branding +* __Title__: the title of your board, will be used in the page title as well as within the theme if supported. +* __Slogan__: the slogan of your brand, can be used by the theme if supported. +* __Description__: a text of 300 characters that describes your board, used for SEO purposes. This is the text that will appear is the results of search engines when people look for your board. +* __Default language__: the default language of your board is used for all guests and new accounts. If two or more languages are available in the `lang` folder in Luna's root, registered users can change their language. Changing the default language won't change the language for users that are already registered, unless it is the only available language. +* __Tags__: a list of keywords that best describe your board, use for SEO purposes. +* __Favicon__: an icon used by the browser and operating system of the user to visually identify your website. For more information on where browsers use the favicon, see [Wikipedia](https://en.wikipedia.org/wiki/Favicon#Use_of_favicon). We strongly recommend the use of `.png` files in a high resolution. + +## Announcement +* __Announcement__: shows an announcement at the top of the board. Its location may be different between themes. +* __Title__: the title of the announcement, optional field. +* __Type__: the type of the announcenment, mostly used within themes to decide a color. +* __Message__: the message of the announcement. This text has to be filled, otherwise Luna will set the default value. + +## Time and timeouts +* __Time format__: the time format in which the board should show all times by default, users can override this setting in their account. Changing the default time format won't change the time format for users that are already registered. +* __Date format__: the date format in which the board should show all dates by default, users can override this setting in their account. Changing the default date format won't change the time format for users that are already registered. +* __Default time zone__: the time zone in which the board should show all times by default, users can override this setting in their account. Changing the default time zone won't change the time zone for users that are already registered. +* __Visit timeout__: the number of seconds it takes before an user is no longer considered "visiting". +* __Online timeout__: the number of secconds before the users is no longer considered online. + +## Syndication +* __Default feed type__: the default type of feed you want your users to have access to. +* __Duration to cache feeds__: duration of how long the feed will be cached. + +## E-mail +* __Admin email__: the e-mail address of the main admin. +* __Webmaster email__: the e-mail address that will be used as address from which Luna will send e-mails to its users. +* __Reporting method__: the way you want to be kept up-to-date on new reports. +* __Mailing list__: a list of e-mail addresses separated by commas that will receive new reports. + +## Registration +* __New registrations__: allow guests to create new accounts. +* __Mailing list notifications__: send a mail to everyone on the mailing list when a new user is made. +* __Verify__: require new users to verify their e-mail address. +* __Banned addresses__: allow new users to use e-mail addresses or domains that have been banned, everyone on the mailing list will receive a warning. +* __Double address__: allow users to use an e-mail address that already has been used, everyone on the mailing list will receive a warning +* __Rules__: enables whether or not the board has rules. Enabling this option will also add a "Rules" panel to the help-section of your board. +* __Message__: the message with the rules. Will be shown during registration as well as in the help-section. +* __Default email setting__: default setting for new users on how visible their e-mail address is to other users. + +## Cookie bar +* __Cookie bar__: shows a bar at the bottom of your board with information about cookies. For more information, see [cookies](http://getluna.org/docs/cookies). +* __Cookie info URL__: the url with information about cookies, by default this links to this documentation's cookies document. + +## SMTP settings +* __SMTP server address__: the address of the external SMTP server with which Luna can send e-mails. +* __SMTP username__: the username of the SMTP server. +* __SMTP password__: the password of the SMTP server. If you want to delete a password, simply check the checkbox in this field. +* __SMTP encryption__: encyrpt the SMTP connection with SSL if supported. + +## System +* __Root URL__: the URL on which the homepage of your board can be reached. If this setting isn't correct, you won't be able to change most things and will receive a higher amount of errors. +* __CDN__: whether or not to use a CDN to get Bootstrap and jQuery. When enabled it may improve performance and lower bandwidth usage of your host. Note however that Luna becomes dependent on third party services when this is enable so when these services go down, so will parts of your board. +* __Gzip output__: Gzip output sent to the browser. This will reduce bandwidth usage, but use some more CPU. This feature requires that PHP is configured with zlib. If you already have one of the Apache modules (mod_gzip/mod_deflate) set up to compress PHP scripts, disable this feature. \ No newline at end of file diff --git a/setup.md b/setup.md deleted file mode 100644 index 27a042c..0000000 --- a/setup.md +++ /dev/null @@ -1,43 +0,0 @@ -# Setting up your board -Here are some pages in the Backstage you might want to stop by after you've set up your brand new forum. - -## Settings -### Settings -Change basic setting like the title and discription. This is also the place where you can change the default time zone, daylight savings and other time-related settings. Also, you can change the default language of your forum (for guests and new users), feed settings, how Luna should handle reported comments, avatar settings, and finally, announcements. - -### Features -Under 'Features' you can change the functions that are available on your board, like parser settings, First Run settings, and more. Also, you can activate censoring. - -### Appearance -Here you can change the appearance of your board. Things like displaying the version number of Luna in the footer info about users. Also, you can enable smilies and made links are clickable without the need to put them between [url]-tags. Also, you can change here the number of threads and comments on one page. - -### Registration -Here, you can disable new registrations. Also, you can activate a security features that asks at new members to verify themselfs. You also can add here forum rules, when you activate 'User forum rules', a new button, 'Rules', will be added to the menu of your Luna installation. - -### Email -Change email settings, like the adres of the forums admin and webmaster, the abbility to subscribe to forums and threads and your SMTP settings. - -### Menu -Under the menu settings, you can change to items in the menu. You can't delete default items, but you can hide them. - -### Themes -This page contains an overview of all themes that are available to your installation. You can change the look of your board here and change settings of themes in case they have their own settings. - -## Users -### Permissions -Probably the most critical part of setting up a new forum is getting the permissions right. - -To setup a working and useful permission hierarchy, you can create user groups in the administration panel. Click on "User groups" and you will see the four default user groups - Administrators, Moderators, Members and Guests. - -### Ranks -See [ranks](organizing) - -### User groups -See [groups](organizing) - -## Content -### Board -See [categories and forums](organizing) - -### Censoring -With censoring, you can easily manage which words need to be replaced with another word. On this page, you are able to add, update and remove censored words. Remember that this also affects usernames. \ No newline at end of file diff --git a/theme.md b/theme.md new file mode 100644 index 0000000..7f7359a --- /dev/null +++ b/theme.md @@ -0,0 +1,18 @@ +# Theme +Starting with Luna 2.1, themes required to be installed first. No worries when you're upgrading, though, Luna will take care of Typography, Fifteen and Sunrise when you cross the line between FluxBB/ModernBB/Luna 1.x-2.0 and 2.1 for the first time. + +## Installed themes +All themes that are installed are listed here. Luna will show you the title and version of the theme, as well as a description, the developer and a link to the developer's page. From here you can take a number of actions: + +* __Activate__: activating the theme will set it as your boards theme. This might have a number of side effects: + * If the theme supports less accents than your previous theme, you or your users might have set an accent `id` that no longer exists. For those users and the default accent setting, the accent will be reset to `1`, which every theme is required to have. +* __Uninstall__: uninstalls the theme. This will remove all data the theme might hold in the database. This action is irreversable. +* __Update__: if a theme's installed version is out of sync with the version available in the `/themes/`-folder, you will have to update it. Your theme might already work as expected, but an update might add new configuration options that previous versions did not have, or remove them. Note that Luna's updater will automatically take care of updating Typography, Fifteen and Sunrise is they are installed. + +Further, themes can add their own actions like "Settings" and more. + +## Available themes +Themes that are "available" have a folder in the `/themes/`-folder in the root of your Luna installation but have not been installed. From here, you can take a number of actions: + +* __Install__: installing the theme will add all configurations that the theme might have to your database and make it possible for you to activate it. +* __Delete__: delete will remove the entire folder of the theme from your installation, this action is irreversable. \ No newline at end of file diff --git a/themes.md b/themes.md index 7937b22..bdbaaf3 100644 --- a/themes.md +++ b/themes.md @@ -5,7 +5,7 @@ Unlike the old ModernBB Style Engine (version 5.2 and prior), the Luna Theme Eng This is a list of files that are required to be in your theme, grouped to show you which files are required for which type of theme. ### Required for parent and child themes -* `information.php` +* `theme.json` * `style.css` ### Required for parent theme, optional for child theme @@ -16,7 +16,6 @@ This is a list of files that are required to be in your theme, grouped to show y * `header.php` * `help.php` * `inbox.php` -* `inbox-delete.php` * `inbox-delete-comment.php` * `inbox-new.php` * `inbox-view.php` @@ -48,41 +47,127 @@ This is a list of files that are required to be in your theme, grouped to show y * `user.php` ### Optional for parent and child themes -* `theme_settings.php` * Any other file you can think of -## information.php -The `information.php`-file contains basic information about your theme that is used on the Backstage's Theme-page. The content of the file should look like the example below. This example is from the Sunrise child theme based on Fifteen. +## theme.json +The `theme.json`-file contains basic information about your theme that is used on the Backstage's Theme-page. The content of the file should look like the example below. This example is from the Sunrise child theme based on Fifteen. Note that prior to version 2.1, the `information.php`-file was used for this, themes still using this file without a `theme.json` file won't work in Luna 2.1 and higher. -```php - - +```json +{ + "id": "sunrise", + "name": "Sunrise", + "developer": "Studio 384", + "url": "https://getluna.org", + "description": "Sunset is a variant upon Fifteen, featuring a more classic design.", + "date": "14 June 2018", + "version": "3.1-alpha.3", + "minversion": "2.1-alpha.3", + "maxversion": "2.1-alpha.3", + "parent": "fifteen", + "features": { + "accents": [ + { "id": 1, "color": "#14a3ff" }, + { "id": 2, "color": "#2788cb" }, + { "id": 3, "color": "#0d4382" }, + { "id": 4, "color": "#c58be2" }, + { "id": 5, "color": "#ea69ae" }, + { "id": 6, "color": "#8bb805" }, + { "id": 7, "color": "#047a36" }, + { "id": 8, "color": "#ffcd21" }, + { "id": 9, "color": "#ff7521" }, + { "id": 10, "color": "#ff4444" }, + { "id": 11, "color": "#c71f1f" }, + { "id": 12, "color": "#c78d68" }, + { "id": 13, "color": "#ccc" }, + { "id": 14, "color": "#999" }, + { "id": 15, "color": "#444" } + ], + "announcement_types": true, + "back_to_top": true, + "copyright": true, + "custom_copyright": true, + "custom_css": true, + "first_run": true, + "header_background": true, + "header_search": true, + "moderated_by_list": false, + "night_mode": true, + "notification_flyout": true, + "statistics": true + }, + "config": [ + { "name": "sunrise_installed", "default": 1 }, + { "name": "activated_sunrise", "default": 1 } + ] +} +``` - +* __id__: the id of the theme, this has to be unique. While it is unlikely that 2 themes with the same ID will be on the same installation, it is perhaps best adviced to use the name of the theme in lowercase followed by a random string. +* __name__: the name of the theme. +* __developer__: the person, people or organization that developed the theme. +* __url__: the URL to the developer's page. +* __description__: a short description of what the theme has to offer. +* __date__: the date of release of the current version. +* __version__: the version of the theme. +* __minversion__: the minimum required version of Luna that this theme can run on. +* __maxversion__: the maximum required version of Luna that this theme can run on. +* __parent__: optional field to indicate that the theme is a child theme and what its parent is. Files that are required but are not present in the theme will be searched for in the team listed here. +* __features__: a list of features the theme supports. When not supported, Luna can show a warning next to the relevant setting in the Backstage to notify the user that these functions won't work. For a full liskt of options, see the features-table below. +* __config__: an array of values you want to add to the `config` table for your theme to manage. - -XML; -> -``` +### Theme features +Themes can declare in their `theme.json`-file which Luna features are supported by them in the `features`-field. + +| Name | Value type | Default | Required | Description | +| --- | --- | --- | +| `accents` | `array` | _none_ | Yes | A list consisting of `id` and `color` paires of accents supported by the theme | +| `announcement_types` | `boolean` | `false` | No | Whether or not different announcement types are supported | +| `back_to_top` | `boolean` | `false` | No | Whether or not "Back to top" is supported | +| `copyright` | `boolean` | `false` | No | Whether or not the theme shows a copyright message | +| `custom_copyright` | `boolean` | `false` | No | Whether or not the copyright message can be customized | +| `custom_css` | `boolean` | `false` | No | Whether or not the theme supports custom cSS | +| `first_run` | `boolean` | `false` | No | Whether or not the theme supports the First run experience | +| `header_background` | `boolean` | `false` | No | Whether or not the theme can use a header background | +| `header_search` | `boolean` | `false` | No | Whether or not the theme has a search field available outside the search page | +| `moderated_by_list` | `boolean` | `false` | No | Whether or not the "Moderated by" list is showsn | +| `night_mode` | `boolean` | `false` | No | Whether or not the theme support a dark mode | +| `notification_flyout` | `boolean` | `false` | No | Whether or not the theme supports a notification fly-out | +| `statistics` | `boolean` | `false` | No | Whether or not the theme supports showing statistics | + +#### Accents +Luna requires themes to at least support 1 accent color. If only 1 accent color is included in a theme, the Backstage will show the theme as not suppoting accent colors. + +| Name | Value type | Default | Required | Description | +| --- | --- | --- | +| `id` | `integer` | _none_ | Yes | An unique integer to identify the accent | +| `color` | `string ` | _none_ | Yes | Any valid value that can be set for the `background` property in CSS like `#2788cb` or go with a fancy gradient like `linear-gradient(141deg, #0fb8ad 0%, #1fc8db 51%, #2cb5e8 75%)`, or anthing else | + +### Theme config +Themes can declare in their `theme.json`-file which any new config they want to use and add to the database. Upon installation by the users thes configurations are added to the database, when uninstalled, they are dropped again. + +| Name | Value type | Default | Required | Description | +| --- | --- | --- | +| `name` | `string` | _none_ | Yes | The name of the configuration. Luna will automatically add `t_styleid_` as a prefix | +| `value` | `undefined` | _none_ | Yes | The default value opun installation | -The only optional parameter in this file is `` and is only used to identify the theme's parent to inherit all the files from that theme. +### Empty example +Below you can find the minimum required structure for the `theme.json`. -## theme_settings.php -The `theme_settings.php`-file will show theme settings on the Backstage's Themes-page. You can use this to show theme specific settings or instructions. You can do with it whatever you like. \ No newline at end of file +```json +{ + "id": "", + "name": "", + "developer": "", + "url": "", + "description": "", + "date": "", + "version": "", + "minversion": "", + "maxversion": "", + "features": { + "accents": [ + { "id": 1, "color": "" }, + ] + } +} +``` \ No newline at end of file diff --git a/theming_footer.md b/theming_footer.md new file mode 100644 index 0000000..3d991ed --- /dev/null +++ b/theming_footer.md @@ -0,0 +1,112 @@ +# Theming `footer.php` +Unlike all other views, `footer.php` does not have an in-core file. Instead, your themes `footer.php` is called by all other pages directly. + +## `$footer` +The `$footer`-variable contains all data that isn't part of `$luna_config` that you can expect in the footer, these are mostly statistics. Unlike any other page, you have to make this variable yourself within your view. + +```php +include_once LUNA_ROOT.'/include/class/footer.class.php'; + +$footer = new Footer(); +``` + +The `Footer`-object looks as followed: + +```php +class Footer { + int private $threads + int private $comments + int private $users + array private $latest_user + int private $guests_online + int private $users_online + array private $online + + void public __construct() + + // Setters + Footer function setThreads( int $threads ) + Footer function setComments( int $comments ) + Footer function setUsers( int $users ) + Footer function setLatestUser( array $latest_user ) + Footer function setGuestsOnline() + Footer function setUsersOnline() + Footer function setOnline() + + // Getters + int function getThreads( bool $raw ) + int function getComments( bool $raw ) + int function getUsers( bool $raw ) + array function getLatestUser() + int function getGuestsOnline( bool $raw ) + int function getUsersOnline( bool $raw ) + array function getOnline() +} +``` + +## Cookie bar +Luna supports the use of a cookie bar, your theme has to implement this functionality. Typography handles the implementation as followed: + +```php + + + +``` + +## Debug mode +Themes also need to support debug mode, once again, Luna's default theme's implementation can be seen here: + +```php + +
+
+
+ +
+
+
+ + +``` + +## Database transactions +Finally, your themes `footer.php`-file is the last file called by Luna before the page is completed. Given that the footer still has to handle some queries, we cannot close the database here. This is why you have to add the following line __before__ your debug-implementation: + +```php +$db->end_transaction(); +``` + +After everything, you also need to close of the database connection: + +```php +$db->close(); +``` \ No newline at end of file diff --git a/theming_header.md b/theming_header.md new file mode 100644 index 0000000..148255d --- /dev/null +++ b/theming_header.md @@ -0,0 +1,123 @@ +# Theming `header.php` +When developing themes, you will probably want to show the menu of Luna in a custom view. The menu can be accessed within your theme's `header.php`-view. From here, you have access to a number of variables. + +## `$menu` +The `$menu`-variable contains all relevant links that can be set in Backstage > Settings > Menu with the exception of invisible links. `$menu` returns a `Menu`-object. + +```php +class Menu { + private array private $items + + void public __construct( bool $show_invisible ) + + // Setters + Menu setItems( bool $show_invisible ) + + // Getters + array(MenuItem) public getItems( bool $visible ) + int public getBackstageUrl(); + int public getInboxUrl( int $id ); + int public getProfileUrl( int $id ); + int public getSettingsUrl( int $id ); + int public getHelpUrl(); + int public getNotificationsUrl( int $id ); + int public getLogoutUrl( int $id ); + int public getRegisterUrl(); + int public getLoginUrl(); +} +``` + +Themes can get access to the menu items by calling `$menu->getItems()`. This returns an array of `MenuItem`-objects, which have the markup as depicted below. Additionally, all relevant user-urls are also accessible from this object, like links to the user's profile, notifications and more. + +```php +class MenuItem { + int private $id + string private $url + string private $name + int private $position + bool private $visible + bool private $system + + void public __construct() + + MenuItem public static withId( int $id ) + MenuItem public static withRow( array $row ) + void protected getById( int $id ) + void protected fill( array $row ) + + // Setters + MenuItem public setId( int $id ) + MenuItem public setUrl( string $url ) + MenuItem public setName( string $name ) + MenuItem public setPosition( int $position ) + MenuItem public setVisible( bool $visible ) + MenuItem public setSystem( bool $system ) + + // Getters + int public getId() + string public getUrl() + string public getName() + int public getPosition() + bool public getVisible() + bool public getSystem() +} +``` + +As an example, a Bootstrap 4-based theme can access and implement this functionality in a `navbar`-component with the following code: + +```php +foreach( $menu->getItems() as $item ) { + echo ''; +} +``` + +## `$notifications` +A part of the menu is the notification flyout. This flyout shows the user's notifications. These notifications can be accessed by calling `$notifications`. `$notifications` returns an array of `Notification`-objects. A `Notification`-object has the following definition: + +```php +class Notification { + int private $id + int private $user + string private $url + string private $message + string private $icon + DateTime private $time + bool private $viewed + + void public __construct() + + Notificaiton public static withId( int $id ) + Notificaiton public static withRow( array $row ) + void protected getById( int $id ) + void protected fill( array $row ) + + // Setters + Notification public setId( int $id ) + Notification public setUser( int $user ) + Notification public setUrl( string $url ) + Notification public setMessage( string $message ) + Notification public setIcon( string $icon ) + Notification public setTime( DateTime $time ) + Notification public setViewed( bool $viewed ) + + // Getters + int public getId() + int public getUser() + string public getUrl() + string public getMessage() + string public getIcon() + DateTime public getTime() + bool public getViewed() +} +``` + +Looping through notifications can be done as followed: + +```php +foreach ($notifications as $notification) { + echo ''.$notification->getTime().' '.$notification->getMessage().''; +} +``` + +## `$notification_count` +To show the number of new notifications or as purpose for other actions, the `$notification_count` variable returns an integer with the number of unseen notifications for the current user. \ No newline at end of file diff --git a/theming_pagination.md b/theming_pagination.md new file mode 100644 index 0000000..efe0d4d --- /dev/null +++ b/theming_pagination.md @@ -0,0 +1,71 @@ +# Theming pagination +Pagination makes it easier for users to navigate through a board. Luna 2.1 provides an improved pagination system which works with objects. + +Given that themes will have to use pagination on a number of different locations, we strongly recommend you create an additional function to manipulate the array given to you by Luna. + +A pagination array is given for the following views: + +* `forum.php` +* `inbox.php` +* `inbox-view.php` +* `search-results.php` +* `thread.php` +* `users.php` + +For each of these views, the pagination array can be accessed by calling `$paging_links`. + +## Implementation +The `$paging_links`-variable contains all relevant pagination. `$paging_links` returns an array of `Page`-objects. + +```php +class Page { + string private $name; + string private $url; + string private $state; + string private $rel; + + void public __construct( string $name, string $url, string $state, string $rel ); + + // Setters + Page public setName( string $name ); + Page public setUrl( string $url ); + Page public setState( string $state ); + Page public setRel( string $rel ); + + // Getters + string public getName(); + string public getUrl(); + string public getState(); + string public getRel(); +} +``` + +Typography uses the following implementation for the pagination: + +```php +function typography_paginate($pages) { + if (!empty($pages)) { + echo '
'; + + foreach ($pages as $page) { + if ($page->getState() === 'disabled') + $class = 'btn btn-light disabled'; + elseif ($page->getState() === 'active') + $class = 'btn btn-light btn-light-active'; + else + $class = 'btn btn-light'; + + if ($page->getName() === 'Previous') + $name = ''; + elseif ($page->getName() === 'Next') + $name = ''; + else + $name = $page->getName(); + + echo 'getRel() !== null) ? 'rel="'.$page->getRel().'"' : '').' class="'.$class.'">'.$name.''; + } + + echo '
'; + } +} +``` \ No newline at end of file diff --git a/theming_profile.md b/theming_profile.md new file mode 100644 index 0000000..c6f470a --- /dev/null +++ b/theming_profile.md @@ -0,0 +1,249 @@ +# Theming `profile.php` +The profile is one of the more complex systems, however, to make theming as easy as possible, we've spend much work on making a fancy design for profiles as easy as possible. + +## `$user` +The `$user`-variable contains all relevant information about the user whos profile you are looking at, not to be confused with `$luna_user`. `$user` returns a `User`-object. + +

In Preview 5, the User-object contains functions that call data from the group of the user as well as the online information. These functions are introduced in Preview 5 but won't be available anymore in future previews.

+ +```php +class User { + int private $id + int private $group_id + string private $username + string private $password + string private $salt + string private $email + string private $title + string private $realname + string private $url + string private $facebook + string private $microsoft + string private $twitter + string private $google + string private $location + string private $signature + int private $email_setting + int private $notify_with_comment + int private $auto_notify + int private $show_img + int private $show_sig + private $php_timezone + string private $time_format + string private $date_format + string private $language + int private $num_comments + Timestamp private $last_comment + Timestamp private $last_search + Timestamp private $last_email_sent + Timestamp private $last_report_sent + Timestamp private $registered + string private $registration_ip + Timestamp private $last_visit + string private $admin_note + string private $activate_string + string private $activate_key + int private $use_inbox + int private $num_inbox + int private $first_run + int private $color_scheme + int private $adapt_time + int private $accent + + int private $g_id + string private $g_title + string private $g_user_title + int private $g_moderator + int private $g_mod_edit_users + int private $g_mod_rename_users + int private $g_mod_change_passwords + int private $g_mod_ban_users + int private $g_read_board + int private $g_view_users + int private $g_comment + int private $g_create_threads + int private $g_edit_comments + int private $g_delete_comments + int private $g_delete_threads + int private $g_set_title + int private $g_search + int private $g_search_users + int private $g_send_email + int private $g_comment_flood + int private $g_search_flood + int private $g_email_flood + int private $g_inbox + int private $g_inbox_limit + int private $g_report_flood + int private $g_soft_delete_view + int private $g_soft_delete_comments + int private $g_soft_delete_threads + + Timestamp private $o_logged + Timestamp private $o_idle + + void public __construct() + + MenuItem public static withId( int $id ) + MenuItem public static withRow( array $row ) + void protected getById( int $id ) + void protected fill( array $row ) + void public save() + + // Setters + User public setId( $id ) + User public setGroup( $group_id ) + User public setUsername( $username ) + User public setPassword( $password ) + User public setSalt( $salt ) + User public setEmail( $email ) + User public setTitle( $title ) + User public setRealname( $realname ) + User public setFacebook( $facebook ) + User public setMicrosoft( $microsoft ) + User public setTwitter( $twitter ) + User public setGoogle( $google ) + User public setLocation( $location ) + User public setSignature( $signature ) + User public setEmailSetting( $email_setting ) + User public setNotifyWithComment( $notify_with_comment ) + User public setAutoNotify( $auto_notify ) + User public setShowImg( $show_img ) + User public setShowSig( $show_sig ) + User public setPhpTimezone( $php_timezone ) + User public setTimeFormat( $time_format ) + User public setDateFormat( $date_format ) + User public setLanguage( $language ) + + User public setNumComments( $num_comments ) + User public setLastComment( $last_comment ) + User public setLastSearch( $last_search ) + User public setLastEmailSent( $last_email_sent ) + User public setLastReportSent( $last_report_sent ) + User public setRegistered( $registered ) + User public setRegistration_ip( $registration_ip ) + User public setLastVisit( $last_visit ) + User public setAdminNote( $admin_note ) + User public setActivateString( $activate_string ) + User public setActivateKey( $activate_key ) + User public setUseInbox( $use_inbox ) + User public setNumInbox( $num_inbox ) + User public setFirstRun( $first_run ) + User public setColorScheme( $color_scheme ) + User public setAdaptTime( $adapt_time ) + User public setAccent( $accent ) + User public setGId( $g_id ) + User public setGTitle( $g_title ) + User public setGUserTitle( $g_user_title ) + User public setGModerator( $g_moderator ) + User public setGModEditUsers( $g_mod_edit_users ) + User public setGModRenameUsers( $g_mod_rename_users ) + User public setGModChangePasswords( $g_mod_change_passwords ) + User public setGModBanUsers( $g_mod_ban_users ) + User public setGReadBoard( $g_read_board ) + User public setGViewUsers( $g_view_users ) + User public setGComment( $g_comment ) + User public setGCreateThreads( $g_create_threads ) + User public setGEditComments( $g_edit_comments ) + User public setGDeleteComments( $g_delete_comments ) + User public setGDeleteThreads( $g_delete_threads ) + User public setGSetTitle( $g_set_title ) + User public setGSearch( $g_search ) + User public setGSearchUsers( $g_search_users ) + User public setGSendEmail( $g_send_email ) + User public setGCommentFlood( $g_comment_flood ) + User public setGSearchFlood( $g_search_flood ) + User public setGEmailFlood( $g_email_flood ) + User public setGInbox( $g_inbox ) + User public setGInboxLimit( $g_inbox_limit ) + User public setGReportFlood( $g_report_flood ) + User public setGSoftDeleteView( $g_soft_delete_view ) + User public setGSoftDeleteComments( $g_soft_delete_comments ) + User public setGSoftDeleteThreads( $g_soft_delete_threads ) + User public setOLogged( $o_logged ) + User public setOIdle( $o_idle ) + + // Getters + int public getId() + int public getGroup() + string public getUsername() + string public getPassword() + string public getSalt() + string public getEmail() + string public getTitle( $personal = false ) + string public getAvatar() + string public getRealname() + string public getUrl() + string public getFacebook() + string public getMicrosoft() + string public getTwitter() + string public getGoogle() + string public getLocation() + string public getSignature( $raw = true ) + int public getEmailSetting() + int public getNotifyWithComment() + int public getAutoNotify() + int public getShowImg() + int public getShowSig() + string public getPhpTimezone() + string public getTimeFormat() + string public getDateFormat() + string public getLanguage() + int public getNumComments( $raw = false ) + DateTime public getLastComment( $raw = false ) + DateTime public getLastSearch( $raw = false ) + DateTime public getLastEmailSent( $raw = false ) + DateTime public getLastReportSent( $raw = false ) + DateTime public getRegistered( $raw = false ) + string public getRegistration_ip() + DateTime public getLastVisit( $raw = false ) + string public getAdminNote() + string public getActivateString() + string public getActivateKey() + int public getUseInbox() + int public getNumInbox() + int public getFirstRun() + int public getColorScheme() + int public getAdaptTime() + int public getAccent() + + public getGId() + public getGTitle() + public getGUserTitle() + public getGModerator() + public getGModEditUsers() + public getGModRenameUsers() + public getGModChangePasswords() + public getGModBanUsers() + public getGReadBoard() + public getGViewUsers() + public getGComment() + public getGCreateThreads() + public getGEditComments() + public getGDeleteComments() + public getGDeleteThreads() + public getGSetTitle() + public getGSearch() + public getGSearchUsers() + public getGSendEmail() + public getGCommentFlood() + public getGSearchFlood() + public getGEmailFlood() + public getGInbox() + public getGInboxLimit() + public getGReportFlood() + public getGSoftDeleteView() + public getGSoftDeleteComments() + public getGSoftDeleteThreads() + + public getOLogged() + public getOIdle() + + public getThreadsUrl() + public getCommentsUrl() + public getSubscriptionsUrl() + + // Checks + bool public hasContactInfo() +} +``` \ No newline at end of file diff --git a/theming_settings.md b/theming_settings.md new file mode 100644 index 0000000..77b788e --- /dev/null +++ b/theming_settings.md @@ -0,0 +1,7 @@ +# Theming `settings.php` +For themes, `settings.php` is probably one of the most complex pages to design as it contains a lot of options that all have to be implemented. + +## `$user` +The `$user`-variable contains all relevant information about the user whos profile you are looking at, not to be confused with `$luna_user`. `$user` returns a `User`-object. + +See [theming profile.php](theming_profile) for more information. \ No newline at end of file diff --git a/tickets.md b/tickets.md index 226d9b1..a357f48 100644 --- a/tickets.md +++ b/tickets.md @@ -1,7 +1,47 @@ # Creating tickets Tickets are our way of communicating in the development tracker, tickets can contain bugs, features or changes. If you file your own issue, especialy if it is a bug, and you're not part of the Luna development team, it's important to follow some guidelines so someone understands what you mean. This is also the case for pull requests. + + ## Include an extended description -Always include an extended description in your ticket. What do you want to archive? How do you reproduce that bug? What should the feature you want have to do? Those are all important question to include in a ticket, depending on what you are reporting (new feature/enhancement/bug). +When requesting a new feature or reporting a bug on GitHub, you will be provided with a template to fill out. It is, of course, recommended to fill out this template. You can get to these templates from the options below. -If you're reporting a bug, it is also important to give additional information. Where does it happen? Does it happen on every browser, if not, which are affected? Is it a security-related issue? How can we reproduce this bug? \ No newline at end of file + \ No newline at end of file diff --git a/tools.md b/tools.md new file mode 100644 index 0000000..1dac23c --- /dev/null +++ b/tools.md @@ -0,0 +1,31 @@ +# Developer tools +When you want to help out developing Luna, there are a number of tools you are going to need. While there are many alternatives to use, here is the software we use to create Luna. + +## A quick overview +- [Visual Studio Code](https://code.visualstudio.com) is an amazing all-around development environment. +- [Koala](http://koala-app.com) is a CSS (and other languages) pre-processor that can convert the SCSS files in Luna to CSS files, as well as minifying them, adding prefixes and generating the source map. +- [Poedit](https://poedit.net) is used to generate the translation for Luna. +- [Git](https://git-scm.com) is used for source control. While we often use the command line to do most tasks, for "just commits" we use GitHub Desktop. +- [GitHub Desktop](https://desktop.github.com) is a GUI on top of Git made by GitHub. Given that we use GitHub, it is the obvious choice. +- [XAMPP](https://www.apachefriends.org) is our development environment. Luna runs locally on this system. + +With the exception of Git, you can of course use whatever you want. Prefer PHPStorm for software development? That's fine. You make your IDE compile your SCSS. Nice, also, ping me if you have any recommendations on that. You prefer GitKraken or no GUI at all? Go for it. The only thing you're really chained to when developing Luna is Git and GitHub's website. + +## Visual Studio Code +[Visual Studio Code](https://code.visualstudio.com) is a development environment made by Microsoft. With great support for SCSS, Markdown, PHP and other languages used in Luna, it is good choice as development environment. + +## Koala +[Koala](http://koala-app.com/) is used to process the SCSS files to CSS, while compressing them and adding prefixes. It also generates the `.css.map`-files. + +We are planning to stop using Koala and instead provide a script that automates this. + +## Poedit +[Poedit](https://poedit.net) is used to generate the English language file as well as generate and translate the Dutch language file. While Poedit has a paid version available, you'll do just fine with the free version. + +## Git and GitHub Desktop +[Git](https://git-scm.com) is our source control manager. It is rather easy to learn and used for most commands we perform for Luna with the exception of commits. + +Commits are made in [GitHub Desktop](https://desktop.github.com), this is a tool made by GitHub with great integration with GitHub's website. You don't need this to develop Luna but it gives a great GUI to the Git command line. If you are using Visual Studio Code (or many other editors), you already get an integrated Git-UI in your IDE. If you don't want to install GitHub Desktop but lo like to have a GUI, that might be an option for you. + +## XAMPP +[XAMPP](https://www.apachefriends.org) comes with Apache, MariaDB, PHP, phpMyAdmin, OpenSSL and other tools. This project follows the PHP versioning number and provides (at the time of writing) a 5.6, 7.0, 7.1 and 7.2 version. Luna is in general developed on the lastest update to XAMPP and thus PHP. \ No newline at end of file diff --git a/translations.md b/translations.md index 43575ca..37d38f3 100644 --- a/translations.md +++ b/translations.md @@ -1,13 +1,29 @@ # Language packs -For an overview of language packs and how to install them, please see the customizing page. ## Developing Until the official Luna Translation Center is finished, which will allow for translating the software online, language packs have to be created by hand. -To start translating Luna, you need software like Poedit to load the translation files and start translating. +To start translating Luna, we recommend Poedit to generate the translation files. + +### Get started +You can get started by creating a new language folder and by either configuring a new Poedit project to support Luna or by copying the English translation in the version of Luna you want to translate. + +Once you've loaded the translation into Poedit, it is recommended to use Poedit's "Update" function to make sure all strings are up-to-date. + +One you're translation is up-to-date with the current version of Luna, go to Go > Properties. Here you can set a number of properties for your translation. By copying the English translation, all of these settings are already correct. The only change you have to make is alter the "Language" field to the language of your translation. In case you're updating your translation for a new version of Luna, make sure to update "Project name and version" as well. This has to be "Luna X.Y". ### Stopwords -The `stopwords.txt` file contains a list of words which should not be indexed in users comments. This should be used to filter ter out common words which do not add value to a search, for example, in English, words such as "the" and "it's". For more information, check [Wikipedia](http://en.wikipedia.org/wiki/Stop_words). +The `stopwords.txt` file contains a list of words which should not be indexed in users comments. This should be used to filter out common words which do not add value to a search, for example, in English, words such as "the" and "it's". For more information, check [Wikipedia](http://en.wikipedia.org/wiki/Stop_words). ## Releasing -Until this will be possible online through the Translation Center, language packs will have to be packaged and uploaded manually. You can just comment a thread announcing and linking to your language pack. \ No newline at end of file +Language packs can be uploaded to our official [translations repository](https://github.com/GetLuna/Luna-Translations). Any translation in any state can be uploaded there. + +## Official translations +Luna already ships with both the English as well as the Dutch translations. These translations are maintained for each version. + +Unlike themes and extensions, you can submit your translation for inclusion in the official Luna package, but this requires that your translation follows a number of rules: + +- It is regularly updated and always up-to-date with the latest stable release +- It is updated to match Previews, Betas and Release Candidates as good as possible +- It follows the official guidelines (aka "Project name and version" is "Luna X.Y") +- It has been kept up-to-date by its developer for 5 following versions \ No newline at end of file diff --git a/troubleshooting.md b/troubleshooting.md index d577d59..2a65ead 100644 --- a/troubleshooting.md +++ b/troubleshooting.md @@ -10,7 +10,7 @@ Similarly to the `/cache/` folder, Luna requires write access to the `/img/avata In order to decrease the load on the database server, Luna caches parts of the database to PHP scripts in the `/cache/` directory. To update the cache simply delete all PHP scripts in the `/cache/` directory. Luna will regenerate them when they are needed. ### I enabled maintenance mode and cannot login -If you have enabled maintenance mode and accidentally logged out you will find it impossible to log back in! To remedy this you must open your configuration file (`config.php`) and at the end add: +If you have enabled maintenance mode and accidentally logged out you will find it impossible to log back in! To remedy this you must open your configuration file (`config.php`) and at the end add: ```php define('LUNA_TURN_OFF_MAINT', 1); diff --git a/update.md b/update.md new file mode 100644 index 0000000..9ab9722 --- /dev/null +++ b/update.md @@ -0,0 +1,60 @@ +# Updating +From the Update page, Luna allwos you to view basic system information and to check for newer versions of Luna. + +## Luna version information and Server statistics +The "Luna version information" panel shows you a number of versions. + +* __Software version__: the version of Luna you're using right now, this version is the one we will use in our communication to our users. +* __Core version__: a version internally used by Luna to determine if the current version is up-to-date. This is the version Luna will compare with when you check for updates. +* __Datbase version__: the version of the database structure Luna uses. +* __Bootstrap version__: the version included with your Luna installation of [Bootstrap](https://getbootstrap.com). +* __Font Awesome version__: the version included with your Luna installation of [Font Awesome Free](https://fontawesome.com). For more information, see [Font Awesome](fontawesome) in our documentation. +* __jQuery version__: the version included with your Luna installation of [jQuery](https://jquery.com). + +The information in the "Luna version information" panel is just formal. Any version information you should know about is always visible in the footer of the Backstage. + +The "Server statistics" panel gives you a look at your system. + +* __Server load__: how many resources the server you're running Luna on is using. +* __Environment__ + * __Operating system__: the operating system on which Luna is running. + * __PHP__: the version of PHP you are using on this server, you can view more specific information by clicking on "Show info" + * __Accelerator__: any accelerator you have installed and enabled +* __Database__: the type and version of the database you're using is shown here. + * __Rows__: the number of rows in all of the tables of Luna's database. + * __Size__: the size of the Luna database. + +## Luna software updates +By clicking the "Check for updates" option, Luna will refresh its cache and check if a more recent version of Luna is available according to our Git-repository on GitHub. If not, Luna will tell you you're up-to-date. If there is a new version available, you will get a link to the download and an option to see what's new in that particular version. + +Note that if you are ahead of the version in our GitHub repository, that Luna will tell you so and checking for updates essentially doesn't work as you will always be told you're ahead of everyone else. + +### Updating Luna +With these instructions, you can update your board to the latest version of Luna. All versions of Luna can be updated to a newer version. You can upgrade to Luna 1.1 and higher from the following versions of FluxBB, ModernBB and Luna: + +* __FluxBB__: all versions as of 1.4.0 supported +* __ModernBB__: all versions supported +* __Luna__: all versions supported + +If you're upgrading to Luna 1.0.10 or lower, there is a limit from which version you can do so. We do not recommend to use Luna 1.0.x release anymore and strongly recommend you to use the latest stable release of Luna. Below is a list of all releases that support upgrading to Luna 1.0: + +* __ModernBB__: all versions as of 3.5.0 supported +* __Luna__: all versions supported + +

Always make a backup of your forum before updating. While we obviously test Luna to the best of our ability it is hard to simulate every single situation, especially when sites are using languages none of us know. The update script does have potential to corrupt your database in the unlikely event that something goes wrong.

+ +### Overwriting files +The easiest option is to simply overwrite the old files with the new ones. While this is the easiest way to update, it is also the least flexible: any modifications you have made to files that you overwrite will be lost. + +* [Download](https://getluna.org) the new files and decompress them. +* Upload the contents of the directory, overwriting the existing files. +* Visit your website, you'll be requested to click a button to install the updated. + +If you have applied any modification, it's recommended to apply these modifications to the new version before updating, however, it's important to stay up-to-date with the latest version for obvious reasons. + +If you have made a number of modifications to Luna, it might be useful to fork the original repository on GitHub, make your changes in that fork and then pull newer versions of Luna whenever they are released. Git might be able to take care of some of your changes itself. + +## About +The about page contains the changelog for the current version of Luna you are using. When a patch is released and you update to it, the changes included in that patch will be listed here as well. + +During preview reelases, the release notes of the then-current version of Luna will be included as well as a changelog for each preview update. When the preview ends and a new major or minor version of Luna is ready, the changelog for the preview updates get condenced into one single log and the changelog for the previous version is dropped. \ No newline at end of file diff --git a/upgrading.md b/upgrading.md deleted file mode 100644 index d2ccc26..0000000 --- a/upgrading.md +++ /dev/null @@ -1,22 +0,0 @@ -# Updating -With those instructions, you can update your board to the latest version of Luna. All versions of Luna can be updated to a newer version. You can upgrade to Luna 1.1 and higher from the following versions of FluxBB, ModernBB and Luna: - -* __FluxBB__: all versions as of 1.4.0 supported -* __ModernBB__: all versions supported -* __Luna__: all versions supported - -If you're upgrading to Luna 1.0.10 or lower, there is a limit from which version you can do so. We do not recommend to use Luna 1.0.x release anymore and strongly recommend you to use the latest stable release of Luna. Below is a list of all releases that support upgrading to Luna 1.0: - -* __ModernBB__: all versions as of 3.5.0 supported -* __Luna__: all versions supported - -

Always make a backup of your forum before updating. While we obviously test Luna to the best of our ability it is hard to simulate every single situation, especially when sites are using languages none of us know. The update script does have potential to corrupt your database in the unlikely event that something goes wrong.

- -## Overwriting files -The easiest option is to simply overwrite the old files with the new ones. While this is the easiest way to update, it is also the least flexible: any modifications you have made to files that you overwrite will be lost. - -* [Download](https://getluna.org) the new files and decompress them. -* Upload the contents of the directory, overwriting the existing files. -* Visit your website, you'll be requested to click a button to install the updated. - -If you have applied any modification, it's recommended to apply these modifications to the new version before updating, however, it's important to stay up-to-date with the latest version for obvious reasons. \ No newline at end of file diff --git a/variables.md b/variables.md index 0393b2f..847c5af 100644 --- a/variables.md +++ b/variables.md @@ -1,5 +1,5 @@ # Global variables -Below is a list of global variables which can be found within any Luna script (i.e. are set when `include/common.php` is included). The most used and important ones are probably $db, $luna_user and $luna_config. +Below is a list of global variables which can be found within any Luna script (i.e. are set when `include/common.php` is included). The most used and important ones are probably `$db`, `$luna_user` and `$luna_config`. ## Configuration variables The below variables are defined by the admin within config.php during installation. Usually they should not be needed once the database connection has been set up and the users cookie has been authenticated. @@ -20,7 +20,7 @@ The username required to access the database. The password required to access the database. ### `$db_prefix` -The table prefix used within the database (to allow multiple Luna installs within one database). This can also (and should be) accessed using `$db→prefix`, for more information see the Database layer page. +The table prefix used within the database (to allow multiple Luna installs within one database). This can also (and should be) accessed using `$db→prefix`, for more information see [database layer](dblayer). ### `$cookie_name` The name of the cookie which Luna uses to keep track of a users session. @@ -34,10 +34,10 @@ Used to seed the password hash stored within the users cookie. The variables below are the most important global variables within Luna. ### `$db` -The `$db` variable is an instance of the Database layer, used for communicating with the underlying database. For more information please see the Database layer page. +The `$db` variable is an instance of the [database layer](dblayer), used for communicating with the underlying database. For more information please see the [database layer](dblayer) page. ### `$luna_user` -The `$luna_user` variable is an associative array which holds information (taken from the users and groups database tables) about the current logged in user (or guest). +The `$luna_user` variable is an associative array which holds information (taken from the [users and groups](dbstructure) database tables) about the current logged in user (or guest). As well as the information from the users and groups tables it also holds a few other values: @@ -57,27 +57,26 @@ $luna_user['is_admmod'] = $luna_user['g_id'] == LUNA_ADMIN || $luna_user['g_mode ``` ### `$luna_config` -The `$luna_config` variable holds an associative array with the contents of the config database table. Please note that to save querying the database on every page load this variable is cached, simply updating the database will not cause the cache to refresh. +The `$luna_config` variable holds an associative array with the contents of the [config](dbstructure) database table. Please note that to save querying the database on every page load this variable is [cached](caching), simply updating the database will not cause the cache to refresh. + +#### Settings +The configs listed below are part of `$luna_config` and can all be manipulated through the Backstage. | Name | Default value | Description | | --- | --- | --- | -| `o_cur_version` | `"1.3.0"`* | The current version of Luna that is installed. | -| `o_core_version` | `"1.3.5118"`* | The current version of Luna core that is installed. | -| `o_code_name` | `"denim"`* | The current name of Luna core that is installed. | -| `o_database_revision` | `"90.70"`* | The current version of the database structure. | -| `o_searchindex_revision` | `"2.0"`* | The current version of the search index engine. During an update if this increments all comments will be indexed again. | -| `o_parser_revision` | `"11.2.0"`* | The current version of the parser. During an update, if this increments all comments will be preparsed again. | -| `o_board_title` | `"Denim"`* | The title of the forum, by default Luna uses its current code name. | -| `o_board_desc` | `"You can do anything"`* | A short description of the forum, usually displayed below the board title, by default the Luna slogan. | -| `o_default_timezone` | `"0"` | The default time zone (offset from UTC). | +| `o_board_title` | `"Fallow"`* | The title of the forum, by default Luna uses its current code name. | +| `o_board_tags` | `"NULL"` | A number of keywords that describe the board best. | +| `o_board_slogan` | `"You can do anything"`* | The slogan of your brand. | +| `o_board_desc` | `"NULL"` | A short description of the forum, usually displayed below the board title. | +| `o_timezone` | `"UTC"` | The default time zone. | | `o_time_format` | `"H:i"` | The default time format string (see the PHP [date](http://uk2.php.net/manual/en/function.date.php) function). | -| `o_date_format` | `"j M Y"` | The default date format string (see the PHP [date](http://uk2.php.net/manual/en/function.date.php) function). | +| `o_date_format` | `"j F Y"` | The default date format string (see the PHP [date](http://uk2.php.net/manual/en/function.date.php) function). | | `o_timeout_visit` | `"1800"` | Number of seconds a user must be idle before his/hers last visit data is updated (primarily affects new message indicators). | | `o_timeout_online` | `"300"` | Number of seconds a user must be idle before being removed from the online users list. | | `o_show_user_info` | `"1"` | Show users information (such as location, registration date, contact link, etc…) with their comments? | | `o_show_comment_count` | `"1"` | Show users comment count? | | `o_signatures` | `"1"` | Enable the use of signatures? | -| `o_smilies_sig` | `"1"` | Allow the user of smilies inside users signatures? | +| `o_smilies_sig` | `"1"` | Allow the user of emoji inside users signatures? | | `o_make_links` | `"1"` | Automatically convert URLs in comments to links? | | `o_default_lang` | `"English"`* | The default language pack to be used. | | `o_default_style` | `"Fifteen"`* | The default theme to be used. | @@ -99,13 +98,14 @@ The `$luna_config` variable holds an associative array with the contents of the | `o_regs_report` | `"0"` | Should new registrations be emailed to the mailing list (see o_mailing_list)? | | `o_default_email_setting` | `"1"` | What should the default email setting be for newly registered users? 0 = Display email address, 1 = Hide email address but allow form emails, 2 = Hide email address and disallow form emails. | | `o_mailing_list` | `""` | A comma separated list of email addresses to which reports should be delivered. | +| `o_moderate_by` | `"1"` | Show a list of moderators below each forum. | | `o_avatars` | `"1"` | Enable the use of users avatars? | | `o_avatars_dir` | `"img/avatars"` | The (relative) path of the directory where users avatars should be stored. | | `o_avatars_width` | `"128"` | The maximum width (in pixels) that a users avatar may be. | | `o_avatars_height` | `"128"` | The maximum height (in pixels) that a users avatar may be. | | `o_avatars_size` | `"30720"` | The maximum size (in bytes) that a users avatar may be. | | `o_search_all_forums` | `"1"` | Allow users to search all forums at once? | -| `o_base_url` | `"http://www.example.org/forums"`* | The base URL of the forum (without the trailing slash) | +| `o_base_url` | `"http://www.example.org/forums"`* | The base URL of the forum (without the trailing slash) | | `o_admin_email` | `"admin@example.org"`* | The email address of the forum administrator. | | `o_webmaster_email` | `"webmaster@example.org"`* | The email address from which emails sent should be addressed. | | `o_forum_subscriptions` | `"1"` | Allow users to subscribe to forums (receive an email when someone makes a new thread)? | @@ -120,9 +120,7 @@ The `$luna_config` variable holds an associative array with the contents of the | `o_smtp_ssl` | `"0"` | Does the SMTP server require SSL? | | `o_regs_allow` | `"1"` | Allow new users to register? | | `o_regs_verify` | `"0"` | Verify new registrations by sending a verification email to their email address? | -| `o_video_width` | `"640"` | The width of an embedded video. | -| `o_video_height` | `"360"` | The height of an embedded video. | -| `o_advanced_search` | `"1"` | Enable the use of advanced search? | +| `o_enable_advanced_search` | `"1"` | Enable the use of advanced search? | | `o_announcement` | `"0"` | Display an announcement? This shows the announcement message set in o_announcement_message in an announcement box on every forum page. | | `o_announcement_message` | `"Announcement"` | An announcement message to show on every forum page when announcements are enabled. | | `o_announcement_title` | `"NULL"` | The title of your announcement. | @@ -130,42 +128,58 @@ The `$luna_config` variable holds an associative array with the contents of the | `o_rules` | `"0"` | Enable the use of forum rules? | | `o_rules_message` | `"Rules"` | The rules for your forum. This field may contain HTML. | | `o_maintenance` | `"0"` | Enable maintenance mode? This prevents anyone who isn't an administrator from using the board. | -| `o_maintenance_message` | `"The forums are temporarily down for maintenance.` `Please try again in a few minutes."` | A message to be displayed to anyone attempting to use the board when maintenance mode is enabled. | -| `o_default_dst` | `"0"` | The default DST offset, either 1 or 0. | +| `o_maintenance_message` | `"The forums are temporarily down for maintenance. Please try again in a few minutes."` | A message to be displayed to anyone attempting to use the board when maintenance mode is enabled. | | `o_feed_type` | `"2"` | The type of syndication feed to use. 0 = None, 1 = RSS, 2 = Atom. | | `o_feed_ttl` | `"0"` | The duration (in minutes) to cache certain feed pages. | | `o_cookie_bar` | `"1"` | Display a cookie bar. | -| `o_cookie_bar_url` | `"http://getluna.org/docs/cookies.php"` | The URL where to get more info on cookies, by default it points to this documentation. | -| `o_emoji` | `"0"` | Enable emojis instead of emoticons. | -| `o_emoji_size` | `"16"` | The font size of emojis when used. | +| `o_cookie_bar_url` | `"http://getluna.org/docs/cookies"` | The URL where to get more info on cookies, by default it points to this documentation. | | `o_admin_notes` | `"NULL"` | Saves the admin note in the Backstage index. | -| `o_pms_enabled` | `"1"` | Use the Inbox private messaging system. | -| `o_pms_mess_per_page` | `"10"` | Amount of messages per page in Inbox. | -| `o_pms_max_receiver` | `"5"` | The maximum amount of receivers per message. | -| `o_emoji_size` | `"16"` | The size of an emoticon. | +| `o_inbox_notification` | `"0"` | Whether or not Luna is allowed to notify users about Inbox. | +| `o_enable_inbox` | `"1"` | Use the Inbox private messaging system. | | `o_back_to_top` | `"1"` | Display a "Back to top" link in the footer. | | `o_show_copyright` | `"1"` | Show the copyright in the footer. | | `o_copyright_type` | `"0"` | Customize copyright to your own or use the automatically generated copyright. | +| `o_custom_css` | `NULL` | Extra CSS you want to include in your baord. | | `o_custom_copyright` | `NULL` | Show a custom copyright text in the footer. | | `o_header_search` | `"1"` | Display a search box in the header (theme dependend). | | `o_board_statistics` | `"1"` | Show the board statistics (theme depended). | | `o_notification_flyout` | `"1"` | Show a flyout when clicking on the notification icon, or go directly to the page (theme depended). | -| `o_update_ring` | `"1"` | The current Update Ring where Luna checks for updates. | -| `p_message_bbcode` | `"1"` | Enable the use of bbcode within comments? | -| `p_message_img_tag` | `"1"` | Enable the use of image tags within comments? | -| `p_message_all_caps` | `"1"` | Allow users to comment a message containing all capitals? | -| `p_subject_all_caps` | `"1"` | Allow users to comment a message with the subject containing all capitals? | -| `p_sig_all_caps` | `"1"` | Allow users to have a signature made up of all capitals? | -| `p_sig_bbcode` | `"1"` | Enable the use of bbcode within signatures? | -| `p_sig_img_tag` | `"0"` | Enable the use of image tags within signatures? | -| `p_sig_length` | `"400"` | The maximum length of a users signature (in characters). | -| `p_sig_lines` | `"4"` | The maximum number of lines a users signature may contain. | -| `p_allow_banned_email` | `"1"` | Allow users to register with a banned email address? If enabled the registration will be allowed but an alert will be sent to the mailing list (see o_mailing_list). | -| `p_allow_dupe_email` | `"0"` | Allow users to register with an email address that is already being used? If enabled an alert will be sent to the mailing list (see o_mailing_list) when a duplicate is detected. | -| `p_force_guest_email` | `"1"` | Require guests to supply an email address when commenting? | +| `o_use_custom_css` | `"0"` | Wether or not Luna should use the custom CSS. | +| `o_use_cdn` | `"1"` | Require Luna to get Bootstrap and jQuery from CDNs. | +| `o_fontawesomepro` | `"0"` | Enable this to show Font Awesome Pro features in Luna. | +| `o_message_bbcode` | `"1"` | Enable the use of bbcode within comments? | +| `o_message_img_tag` | `"1"` | Enable the use of image tags within comments? | +| `o_message_all_caps` | `"1"` | Allow users to comment a message containing all capitals? | +| `o_max_receivers` | `"5"` | Nomber of allowed receivers for each Inbox message | +| `o_subject_all_caps` | `"1"` | Allow users to comment a message with the subject containing all capitals? | +| `o_sig_all_caps` | `"1"` | Allow users to have a signature made up of all capitals? | +| `o_sig_img_tag` | `"0"` | Enable the use of image tags within signatures? | +| `o_sig_length` | `"400"` | The maximum length of a users signature (in characters). | +| `o_sig_lines` | `"4"` | The maximum number of lines a users signature may contain. | +| `o_allow_spoiler` | `"0"` | Allow the use of the spoiler tag. | +| `o_allow_size` | `"0"` | Allow the use of the size tag. | +| `o_allow_center` | `"0"` | Allow the use of the center tag. | +| `o_allow_banned_email` | `"1"` | Allow users to register with a banned email address? If enabled the registration will be allowed but an alert will be sent to the mailing list (see o_mailing_list). | +| `o_allow_dupe_email` | `"0"` | Allow users to register with an email address that is already being used? If enabled an alert will be sent to the mailing list (see o_mailing_list) when a duplicate is detected. | +| `o_force_guest_email` | `"1"` | Require guests to supply an email address when commenting? | + +*These values depend on the information given during installation of Luna or the version you have installed, and do not have a default as such. + +#### System values +The values listed below are also part of `$luna_config` but are only managed by Luna. The user can't, or shouldn't manipulate these rows. + +| Name | Default value | Description | +| --- | --- | --- | +| `o_cur_version` | `"2.1.0"`* | The current version of Luna that is installed. | +| `o_core_version` | `"2.1.5947"`* | The current version of Luna core that is installed. | +| `o_code_name` | `"Fallow"`* | The current name of Luna core that is installed. | +| `o_database_revision` | `"92.31"`* | The current version of the database structure. | +| `o_searchindex_revision` | `"2.0"`* | The current version of the search index engine. During an update if this increments all comments will be indexed again. | +| `o_parser_revision` | `"11.5.1"`* | The current version of the parser. During an update, if this increments all comments will be preparsed again. | *These values depend on the information given during installation of Luna or the version you have installed, and do not have a default as such. +#### Getting a value ```php // Get the forum config from the DB $result = $db->query('SELECT * FROM '.$db->prefix.'config', true) or error('Unable to fetch forum config', __FILE__, __LINE__, $db->error()); @@ -174,7 +188,7 @@ $luna_config[$cur_config_item[0]] = $cur_config_item[1]; ``` ### `$luna_bans` -The `$luna_bans` variable is an array of currently active bans which should be enforced, taken from the bans database table. Like the `$luna_config` variable it is also cached. +The `$luna_bans` variable is an array of currently active bans which should be enforced, taken from the [bans](dbstructure) database table. Like the `$luna_config` variable it is also [cached](caching). ```php // Get the ban list from the DB