Homepage: http://www.skepticats.com/lnblog/
LnBlog: A simple file-based weblog focused on design elegance.
Copyright (C) 2005 Peter A. Geer <pageer@skepticats.com>
This program is licensed under the GNU General Public License. See the license information section for details.
LnBlog is a simple weblog package written in PHP which stores data
in text files.
It is strives to be easy to use, easy to manage, and feature rich while
maintaining a clean, elegant, and modular design. It is built to create
sites with a clean, directory-based URL structure and valid XHTML and
CSS for
style and layout. It is intended to run well on inexpensive web
hosting accounts, and so is cross-platform and light on requirements.
Currently, LnBlog is in the active development, which just means that it is functional and tested, but not anywhere close to done yet. There are still lots of features to add, both in the back-end code and in terms of interface elements. You can see the to do list to get an idea of what is currently planned. If you have any comments or suggestions, or if you have any problems or find any bugs, feel free to e-mail me.
LnBlog is fairly light on requirements. It does not require any particular operating system or web server and is known to work on Linux/Apache, Windows/Apache, and Windows/IIS. The only hard and fast requirements are the following:
For step-by-step instructions, please see the install guide. If you're more technically inclined, then it's probably safe to just skip to the summary below.
Here's the quick version. Just extract the installation archive and upload the whole LnBlog directory to a location in the publicly accessible portion of your web hosting account. You can them navigate to that directory with your favorite browser to run the configuration scripts. The first script configures file writing. You have two options for file writing:
After file writing support is configured, you must set an administrator login. This account will be used to add new weblogs as well as to log into the ones you create. After that's set, you can log in and start adding new blogs and/or users. There are also administrative functions to:
Upgrading your LnBlog installation is generally quite easy. First, you must make a backup copy of the files in the "userdata" folder in your LnBlog directory. Then, just rename or delete your old LnBlog folder and copy the one for the new version in it's place. You can then copy the backed-up userdata files into the new LnBlog folder. For major releases, you may also need to upgrade the files for each individual blog. This is done by going to the administration page and using the "upgrade blog" option. Simply put the relative path to your blog (e.g. myblog, as described in the "Adding New Blogs" section) into the "upgrade to current version" box and click the "Upgrade" button. This will upgrade the configuration files for the blog and add any new pages. You will have to do this separately for each blog that youhave.
Note: If you are upgrading from LnBlog 0.3 to 0.4, the locations of the user configuration files have changed. You will need to copy the fsconfig.php, passwd.php, and sitemap.htm files from the root of your old LnBlog folder into the "userdata" subdirectory of your new LnBlog folder. You will also need to run an upgrade on each of your blogs.
Note 2: If you are upgrading to LnBlog 0.4 from version 0.3.1 or earlier, it is recommended that you delete your fsconfig.php file and go to the LnBlog administration page to recreate it, as there was a configuration value added to this file in version 0.3.2. Your site may, however, continue to function normally with the old file.
Note 3: If, for some reason, you want to upgrade from LnBlog 0.2 to a higher version, you will need to delete your passwd.php file and create a new login, because the format of this file has changed and is no longer compatible.
In addition to the administrator account, you can create as many new user accounts as you like. (Disclaimer: LnBlog was not buit to handle large numbers of users and has not been tested with such a configuration. While there is no inherent limit on the number of users, don't expect it to scale well beyond a couple dozen accounts.) To create a new account log in to the LnBlog administration page and click the "Add new user" link. Only the administrator account can create new users.
The form to add new users should be fairly self-explanatory. You are required to enter a username, password, and password confirmation. The real name, e-mail, and homepage are all optional. However, please note that the user will (obviously) not receive e-mail confirmation of comments on his posts if you do not give an e-mail address.
LnBlog uses a very simple security model based on user ownership. The rules for determining what each user can do are as follows
To put it more succinctly,
there's the administrator (can do anything), the blog owner (can do
anything with the blog), the other users (can do anything with their
own posts - provided they can post), and everybody else (can only post comments).
Which role a particular person will take depends on who they are and
what blog you're talking about. The owner of one blog may be just a regular reader on another.
Adding new blogs is done on the LnBlog administration page. Only the administrator account
can add new blogs. Note that if you are using native file writing,
then the user account under which PHP is running must have write access
to the location where the blog will be created. This is normally
not the case, so you may have to create the blog folder beforehand.
To add a new blog, just click the "Add new blog" link and fill out the form on the resulting page. The fields define various properties of the blog, and are as follows:
http://www.mysite.com/myblog/
Adding a blog entry is pretty self-explanatory. Just log in and click on the "add entry" link. You will be taken to the entry edit screen, where you can enter the subject for your entry, the entry text itself, and turn comments for this entry on or off. Note that in order to add an entry, you must either be the owner of the blog you're adding it to, or you must be on the allowed writers list for that blog.
There are three possible input modes, which you can change between with the option buttons below the edit area. They are:
LnBlog allows anonymous user comments by default. You can turn
off the ability to add comments with a checkbox on the entry edit
screen. Comments have a required body text and optional subject,
name, e-mail, and homepage fields. For logged-in users, comments
will also store the username, so that the up-to-date name, e-mail, and
homepage can be displayed automatically. Currently, comments
cannot be edited, but they can be deleted by users with permission to
modify the entry.
If the owner of a post has an e-mail address specified for his
username, then he can receive e-mail notification of any new comments
on his posts. This feature is one of the standard plugins and can
be disabled globally or on a per-blog basis. The e-mail is sent
using PHP's mail() function,
so that must be correctly configured for your server. The
messages themselves are in plain-text format and include the URL of the
comment, as well as the comment itself and any personal information
entered by the reader.
LnBlog has some very primitive support for Trackbacks. Each
entry has a trackback URL and will store and display any trackback
pings it receives.
To send a trackback ping, you must be logged in and have permission to modify the blog.
You can then click on the "Send trackback ping" link for your blog
entry and start the two-step ping process. The first step is to
enter the URL you wish to ping. The second is to confirm the ping
data and send it.
Due mostly to laziness on my part, LnBlog does not yet support "real" trackback pings. Instead, it uses a simple HTML form with element names conforming to the TrackBack specification to submit the HTTP POST request. As a result of this, you will notice that after the ping, you are directed to the page you pinged, which will probably show you the XML response dictated by the specification. If this is a 0 (zero), that means the ping succeeded. Otherwise, you should hopefully see an error message. Because of the suckiness of this situation, sending a trackback ping will open a new browser window so that you don't have to manually go back to your blog.
As of version 0.4.0, LnBlog supports TrackBack auto-discovery with embedded RDF code using a plugin. There is not yet a feature for auto-discovering TrackBack URLs in other blogs.
LnBlog supports marking up your text with LBCode, which is a variant of BBCode, the markup language used in many popular web-board and forum packages, such as phpBB. I call this dialect LBCode because it makes absolutely no attempt to match the official syntax (if there is such a thing) of BBCode. The primary purpose of LBCode is to let the user write rich text that is valid XHTML 1.0 Strict without having to learn any XHTML or worry about making mistakes while writing. Below is a table of the currently supported tags, with descriptions, example, and the mapping to HTML. Please note that LnBlog does not currently handle LBCode errors gracefully - incorrect syntax will simply be displayed as plain text.
Description | Code | Example | HTML equivalent |
---|---|---|---|
Bold text | [b]bold[/b] | bold | <strong>bold</strong> |
Italic text | [i]italic[/i] | italic | <em>italic</em> |
Underlined text | [u]underline[/u] | underline | <span style="text-decoration: underline">underline</span> |
Abbreviation | [ab=Full phrase]abbreviation[/ab] | abbreviation | <abbr title="Full phrase">abbreviation</abbr> |
Acronym | [ac=Full phrase]acronym[/ac] | acronym | <acronym title="Full phrase">acronym</acronym> |
Block quotation | [quote]Quotation[/quote] |
|
<blockquote>Quotation</blockquote> |
Source code | [code]Source code[/code] | Source code |
<code>Source code</code> |
Source code | [h]Header[/h] | Header |
<h3>Header</h3> |
Short quotation | [q]Quote[/q] | Quote |
<q>Quote</q> |
Hyperlink | [url=http://www.google.com]Google[/url] | <a href="http://www.google.com">Google</a> | |
Image | [img=http://www.google.com/images/logo.gif]Google logo[/img] | ![]() |
<img src="http://www.google.com/images/logo.gif" alt="Google logo" title="Google logo" /> |
Number list | [numlist] [*]First item [*]Second item [/numlist] |
|
<ol> <li>First item</li> <li>Second item</li> </ol> |
Unordered list | [list] [*]First item [*]Second item [/list] |
|
<ul> <li>First item</li> <li>Second item</li> </ul> |
When posting using LBCode markup, you can use LnBlog's simple Javascript-based LBCode editor to insert the codes for you. The editor is simply a series of buttons and two text boxes, labeled "text" and "attribute." The "text" box is used to enter the contents of an LBCode tag, i.e. the actual text the goes between the opening and closing tags. The "attribute" box is used to enter any attribute for the opening tag. such as the URL for an image or link, or the phrase that an appbreviation or acronym stands for.
To use the editor, just type in the text and attribute you want and click the appropriate button. If you want to add a word in bold, type your word into the box labeled "text" and click the bold button. If you want to add a link, put the link text in the "text" box and the URL for the link in the "attribute" box and click the URL button. The corresponding markup will be added to your post at the current cursor position or at the end, depending on your browser's Javascript support. Inserting at the cursor position works on Opera 8.0, Firefox 1.0.3, and sorta-kinda works in Internet Explorer 6.0. I haven't tried it on other browsers, so your mileage may vary.
An extra feature of the editor is that the abbreviation and acronym buttons will save any attributes you use during your post and add them automatically. So, for example, if you enter the abbreviation with the text "GNU" and the attribute "GNU's Not UNIX," then if you mention GNU later in your post, you can just enter "GNU" for the text and leave the attribute blank. When you hit the abbreviation button, the attribute "GNU's Not UNIX" will be added automatically.
LnBlog supports a simple, event-driven plugin system. In a
nutshell, this means that LnBlog supplies hooks that plugins can attach
to whenever something interesting happens, e.g. when a comment is
submitted, ablog entry is deleted, or the page sidebar is
displayed. So when one of those events occurrs, any plugins that
are waiting for it will be notifed and run their code. For
information on writing plugins, consult the technical documentation.
Installing and using plugins is quite easy. All you need to do
is copy the plugin files to your "plugins" directory. You can use
either the system-wide plugins directory under your LnBlog installation
folder, or a plugins directory in the root folder of a specific
blog. Note that if the same filename exists in both locations,
the one for the specific blog will take precedence.
As a general rule, there is no
additional configuration required to make a plugin work, but this will
depend on the particular plugin. None of the plugins that ship
with LnBlog require additional configuration, but some thrid-party
plugins might.Also, note that the standard plugins are all
self-contained, so if you want to turn one off, you can just delete the
file.
Note that the precedence of plugins in a blog's plugins directory
allows you to easily disable plugins on a per-blog basis. All you
need to do is create an empty file with the same name as the
system-wide plugin file you want to disable and put it in the plugins
folder for your blog. One use of this is to turn off certain
interface elements you don't want, because the sidebar panels, page
banner, and the sitemap are all done with plugins. So, if you are
using LnBlog on a local network and want to turn off the Google search
in the sidebar, you can justcreate an empty file named sidebar_5_googlesearch.php file in your blog's plugins folder.
While LnBlog is a technically a weblog package, it also includes several "mini-CMS" features. These exist mostly for the sake of maintaining the design consistency of the site and making it slightly easier to manage. The following sections describe these.
An article in LnBlog is just a
blog entry with a different URL and different display template. It's
basically a cheap and easy way to add
static content that meshes with the overall look
and feel of the blog, but doesn't require any extra
work. You still get BBCode support and revision history, but the URL
structure is pneumonic and comments are turned off by default. You can
enter the last component of the
article URL when you first post it or go with the default, which is to
use the subject with all letters converted to lower case, spaces
converted to underscores,
and all other characters removed. In addition, articles have
a "sticky" attribute that you can set. This will cause a link
to the article to be displayed in the sidebar (provided you're using
one of the default themes).
LnBlog provides pages to upload files to the root of the current blog or to the current entry or article. Currently, you can only upload one file at a time. You should also note the file size limit when trying to upload a file. To change this, must change the values of the PHP configuration variables upload_max_size and post_max_size by creating a .htaccess file (if you use Apache) or by modifying the system php.ini file.
Part of LnBlog's basic page
layout includes a sitemap, also refered to as the menubar. In
the default theme, this is the bar just under the banner with your blog
name. It is intended for global site navigation, e.g. to go
from one blog to another or to other sections of your
website. Needless to say, you will want to customize it for
your own site.
There are two ways to edit the menubar: globally for al LnBlog blogs, or locally to just the current blog. To edit the global sitemap, use the link on the LnBlog administration page where you will see a link to the sitemap editor. To change the sitemap for a particular blog, log in and use the link in the administration section of the blog sidebar. Note that setting a sitemap for the blog will override the global sitemap.
The sitemap editor is a simple Javascript form that creates a list of links. Just enter the text you want for the link, the tooltip (what to display when hovering the mouse over the link), and the target URL for the link, either relative or absolute. When you click the "Add Link" button, a line will be added to the output box with the HTML code for the information you specified. When a page is displayed, LnBlog will read this file and put each line into a list item to be displayed in the menubar. Please note that, currently, if you want to create a more complicated menu layout, you will have to modify the menubar template.
LnBlog: A simple file-based weblog focused on design elegance.
Copyright (C) 2005 Peter A. Geer <pageer@skepticats.com>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.