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 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.
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. Plus, it's light on requirements and cross-platform.
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 and WinXP/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. If you have FTP access to the web server, you can use FTP for file writing (this is recommended) by selecting the FTP option and giving the appropriate information below. Otherwise, LnBlog will use PHP's standard filesystem functions, which will require that Safe Mode be turned off and appropriate permissions set on the relevant directories.
After file writing support is configured, you must set an administrator login. This 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 modify a blog and update a blog (used when upgrading LnBlog).
Upgrading your LnBlog installation is actually quite easy. If you are paranoid, you will want to make backup copies of the configuration files in your LnBlog directory. These files are named fsconfig.php, passwd.php, and sitemap.htm, and are used to store information global to your installation. They are generally not affected by upgrades, and they are not hard to recreate if destroyed, but I thought I should warn you anyway.
Exception 1: The format of passwd.php has changed between versions 0.2 and 0.3 and you should delete the old one and let the software create a new one. Version 0.3 adds support for multiple users using a mechanism that is incompatible with the previous passwd.php format. After you delete this file, go to your LnBlog administration page and you will be prompted to create a new administrator account.
Exception 2: An additional configuration constant, DOCUMENT_ROOT, has been added to fsconfig.php in verion 0.3.2. You may upgrade by deleting your fsconfig.php and going to the administrative page to recreate it. However, if your site was functioning correctly with the old version, it should continue to do so with the old fsconfig.php file.
To upgrade LnBlog, simply extract the new version from the ZIP archive and upload it to your web host into the same location as the old version, overwriting the old files. Alternatively, you can move or delete the old installation folder and put the new one in its place, provided you copy the above mentioned configuration files into the new installation directory.
Once that's done, you may 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) 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.
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. While there is no inherent limit on the number of users, I doubt that the current implementation will scale well. You have been warned.) 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 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.
http://www.mysite.com/myblog/
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 will receive e-mail notification of any new comments
on his posts. The e-mail is send 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.
LnBlog currently does not support TrackBack URL autodiscovery. There is no bookmarklet to pick up trackback URLs for other blogs and there is no RDF section embedded in LnBlog entries.
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 coden</code> |
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.
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.