Holds basic configuration constants that are required by all pages. Some of these constants can be over-ridden in either the userdata/userconfig.php or userdata/userconfig.cfg files. Those files do not exist in the default installation, but if created by the user, it will be executed before the body of this file.
Alias for DIRECTORY_SEPARATOR
Starts the user's HTTP session
function load_plugin( |
| ) |
Loads a plugin. This is used for plugins that do page output and will result in the plugin outputing its markup. Note that not all plugins support this and for those that do, it is configurable as an option, with the alternative being using the event system.
plugin_name | The name of the class for this plugin. |
An instance of the plugin. The return value may safely be disregarded.
Directory name where user data is stored. The standard name is "userdata".
Determines whether tasks should be run asynchronously using cron or some other scheuling system. If this is false, tasks will be run on page load, which can impact performance and execution time-frame. Note that this affects scheduled publishing, so the default is false.
Tells the system what kind of URIs to generate. The available values are as follows. directory - Convert local directory paths directly into URIs using the old wrapper script method. querystring - Use ugly old query string URIs. htaccess - Use query strings made pretty with Apache rewrite rules. Note that this only works on Apache servers with support for mod_rewrite and .htaccess files. The default mode is "directory".
The "from" address that should be used for any e-mails that are sent. This will be used in the "from" field with an appropriate human-readable name, such as "From: LnBlog comment notifier what@yourdom ain.com". ever
The default language. If a translation does not exist for your specified language, then this will be used as the "last resort." This is set to "en_US".
The language to use for text. This setting controls which language is used for the templates and other literal text that LnBlog outputs.
The default is to use the value of the LANG environment variable, if it is set. If not, this is set to the DEFAULT_LANGUAGE and the LANG environment variable is set.
Please note that this constant is also used to set the locale, as follows. |setlocale(LC_ALL, LANGUAGE); Because of this, it is important to note that Windows uses different values for languages than UNIX and Linux systems. In Linux, for example, a German locale might be "de_DE", whereas on Windows it woule be "deu".
Directory to store the localization files. This is used by both GNU gettext and the ad hoc translation system.
Information on the package itself.
The official package name, currently "LnBlog".
The version number of the software. This is a string in the format "1.2.3". Note that each number may be more than one digit.
The minimum software version required by your blog to properly support this version of LnBlog. In other words, if your blog is at less than this version number, you should upgrade it from the main admin page.
The full URL of the LnBlog project home page.
The offical text-blurb description of the software.
The offical LnBlog copyright notice.
Assorted configuration constants that don't fit into any coherent category.
Controls the use of PHP wrapper scripts for pages. When this is turned on, LnBlog will use a series of wrapper PHP scripts to include the files that build pages. This results in a clean, directory-based URL structure.
If this is set to false, then LnBlog will revert to a URL scheme based on query strings. The up side of doing things this way is that you never need to upgrade the wrapper scripts. You can achieve a clean URL structure this way if you have Apache and an appropriate .htacces file.
Defaults to true. Note: this is not yet implemented.
The name of the local copy of jQuery. If not specified, uses the jQuery CDN.
The name of the local copy of jQUery UI. If not specified, uses the jQuery CDN.
The name of the local copy of jQUery UI theme CSS. If not specified, uses the jQuery CDN.
The default theme to use for jQuery UI. Individual themes can override this by setting the JQUERYUI_THEME constant to the desired value.
Set the default time zone for use with date functions.
The expiration time for the login cookies.
If set to an integer value, the cookies used for user logins will expire that number of seconds from the current time. So, if you set this to 3600, then the user will be logged out in 1 hour.
The default is false, which means cookies expire when the session ends.
The default character encoding. This is the encoding included in the Content-Type meta tag for each page.
There are two defaults for this setting. If the default_charset INI variable is set, then that value is used. If it is not set, then the default is to use "utf-8", which is an ASCII-compatible Unicode encoding.
The default MIME type to accompany DEFAULT_CHARSET in the Content-Type.
As with DEFAULT_CHARSET, there are two possible defaults for this. If the default_mimetype INI variable is set, then that value is used. If it is not, then the default is "text/html".
Determine whether to use strftime() or date() for user-readable dates.
Defaults to true. When set to false, things like entry dates will be formatted using the function date() instead of strftime(). If you change this, you will also need to change the ENTRY_DATE_FORMAT.
The character set used by the system when returning generated text.
This is used in conjunction with USE_STRFTIME to automatically convert characters. By default, this is not set. When it is set and the iconv extension is enabled, then the dates will be converted from this character set to the DEFAULT_CHARSET.
Work around browsers that don't send form elements for undisplayed uploads.
This constant works around a bug raised while testing under Konqueror. When an entry was posted without ever showing the file upload box, i.e. the advanced posting options were never expanded, the browser did not send any form field for the upload field. This resulted in an invalid field error raised by LnBlog instead of the expected empty file.
If you get "invalid field name | upload not initiated" errors when you try to post an entry, but were not trying to upload a file with it, then set this to true. |
This is the regular expression used to determine if a local path refers to a user's web root, which would be referred to with a URI like http://www.example.com/~jowblow/ and vice versa. The generated URI will use the parent of the document root, e.g. /home/users/joeblow/www/ would be translated to /~joeblow/. Depending on your setup, you may need to add components before the username or change the document root from www to something else. Of course, if you don't use ~user directories, you can probably ignore this.
Default is "/^\/home\/([^\/]+)\/(www|public_html)\/(.*)/i".
The corresponding replacement pattern to LOCALPATH_TO_URI_MATCH_RE.
Default is "/~$1/$3".
The reverse of LOCALPATH_TO_URI_MATCH_RE. This is the regular expression that matches part of a root-relative URI and extracts a directory name.
Default is "/^\/~([^\/]+)(.*)/i".
The corresponding replacement expression to URI_TO_LOCALPATH_MATCH_RE.
Default is "$2".
Use an ugly hack with htmlentities() instead of the simpler htmlspecialchars() to deal with problems displaying Unicode characters.
This is to account for character encoding issues. The basic situation is that, for whatever reason, it appears that if the many browsers will automatically escape characters in the wrong encoding to numeric HTML character codes. When sanitizing this input with htmlentities(), the ampersands get converted to & and so need to be converted back. When this is set to true, that's what happens.
When this is set to false, input will only be sanitized with htmlspecialchars(), which does fewer substitutions in the first place. This mode does not effect the above mentioned auto-conversion, so you should only use this if you're sure nobody is going to be posting to the site in a character set that differs from the one defined by the server.
Note that this setting only applies to posts (including comments) that use LBCode or auto-markup. Raw HTML code is left completely unmodified.
Default is true.
The file to save the sitemap link list for the menubar.
Default is "sitemap.htm".
Defines the level of header used for the [h] LBCode tag.
Default is 3.
A comma-separated string of target location options for file uploads. These will be used in the search path when trying to absolutize relative URIs in entries. The
Constants that relate to user authentication
Use sessions in authentication instead of just cookies.
Default is true.
Lock logins to the current IP address, so that the user will be logged out if the IP changes. If false, then logins will be locked to the user agent instead.
Default is false.
Force all logins to go through HTTPS. Non-https attempts will be redirected and/or rejected.
Note that this is not yet fully implemented.
Default is false.
Part of CSRF protection. If this is true, POST requests will be denied if the same-site origin check fails because the origin URL could not be determined. Turn this off if your server is not receiving "Origin" or "Referer" headers.
Username of site administrator. This is the only one who can add or delete blogs.
Default is "administrator".
File name use to store custom fields that will be listed in user profiles. This file is in INI format, with key names corresponding to the custom field names and values being the label displayed for the field.
The INI section of the CUSTOM_PROFILE file that holds the list of custom fields.
Configuration constants regarding date formats and file names.
File name for storing blog metadata. Note that this is specific to file-based storage and should not be used for database storage.
Default is "blogdata.ini".
Directory name used to store old blog settings. Note that this is only for file-based storage that uses history-tracking.
Default is "deleted".
The name of the subdirectory of the blog root URL under which blog entries are accessed. This may not necessarily be a real directory on the server.
Default is "entries".
Directory where draft entries are stored.
Default is "drafts".
Like BLOG_ENTRY_PATH, except for static articles.
Default is "content".
Like BLOG_ENTRY_PATH, except for accessing RSS feeds.
Default is "feeds".
Controls whether deleted and modified entries are kept archived, or if they are just permanently deleted.
The default is false, which mean that deleted items are gone forever. In previous versions, the default behavior was to save these, despite the fact that there was no interface for dealing with them.
The date format used directories for blog entries.
The formats here are passed to the PHP strftime(), so check the docs on that for details. The creation timestamp of the blog entry is used to return the exact value.
Programmers should also note that the "directories" referenced here are components of a URI and may not be real directories on the server.
The default is "d_Hi", which is the day, hour, and minute. For example, 10_1215 would be returned for 12:15 PM on the 10th of the month.
An alternate to ENTRY_PATH_FORMAT.
This format was used in earlier versions of the software, but is retained in case there is a need to fall back to a longer format.
The default is "d_His", which is the same as ENTRY_PATH_FORMAT, but includes the seconds at the end.
The file name used to store the data for a blog enrty or article. Note that this is specific to file-based storage.
The default is "entry.xml".
The character used to separate individual tags entered for entries.
The default is a comma (",").
Format used to display dates for entries and articles. Note that, like ENTRY_PATH_FORMAT this string includes strftime() scancodes.
The default is "%Y-%m-%d %H:%M %Z", which gives a date like "2005-08-16 04:26 EST".
Directory name to access comments on entries and articles.
Default is "comments".
Directory name to access trackbacks on entries and articles.
Default is "trackback".
Directory name to access pingbacks on entries and articles.
Default is "pingback".
The file suffix for old versions of entries and articles. Note that this only applies to file-based storage when using history tracking.
The default is ".htm".
The name of the "sticky" file for articles.
In the file-based storage implementation, when this file exists in an article directory, the article will be treated as "sticky," meaning it will be displayed in the default sidebar. This file may contain some of the article metadata. The exact content is intentionally left undocumented, but will include at least the subject.
The default value is "sticky.txt".
File suffix used for storing TrackBacks. Note that this is specific to file-based storage.
The default is ".txt".
File suffix used for storing Pingbacks. Note that this is specific to file-based storage.
The default is ".txt".
Configuration constants used for controlling reader comments.
Determine whether to use the rel="nofollow" attribute in links in comments. This attribute is a comment spam fighting measure instituted by Google, who will not index links with this attribute.
Default is true.
Like KEEP_EDIT_HISTORY, except for comments.
Default is false Again, this was previously on my default, but is now off.
Default name for users who don't enter a name.
Default is "Anonymous Reader".
Default text if the user does not enter a subject.
Default is "No Subject".
Date format string to use for comment file names.
The default is "Y-m-d_His".
File suffix to use for comment files.
Default is ".txt".
Leaf directory name where deleted comments are stored.
The default is "deleted".
Controls the default setting for whether e-mail addresses in comments are visible to everybody.
The default is false, which means only logged-in users can see e-mail addresses specified as non-public.