Blogging Away To Glory (A bBlog Primer)

Everybody’s blogging these days. Harish Kamath shows you how to do it with bBlog, one of the most feature-rich blogging software packages on the PHP/Apache/MySQL platform.

Support files available here.

The Background

Blogging – the task of publishing an on-line website where a user can record his (or her) opinion for every friend and foe to comment upon – can be considered to be one of the biggest revolutions to hit the Internet in recent times.
A “web log” a.k.a. “blog” – according to Dave Winer [] – “is kind of a continual tour, with a human guide whom you get to know.” There are many guides to choose from, and each develops an audience. There is also camaraderie and politics between the people who run web logs; they point to each other, in all kinds of structures, graphs, loops, etc. Very profound but true!

While one can start blogging by signing up for an account at one of the many free blogging server providers, many bloggers like to be in total control of their website – oops, blog. In that case, it makes sense to install your own blogging software on your Web server.
That is where we come in. Today, we will guide you through the installation, set-up and administration of one of the most feature-rich blogging software packages on the PHP/Apache/MySQL platform. It’s time to say hello to “bBlog.” Developed by Eaden McKee, who was very keen “to see how far the Smarty templating system could go,” we are pretty sure that you will be hooked.

Intrigued? Read on.

{mospagebreak title=Getting Started}

In order to get started with bBlog, you’ll need Apache installed with PHP (PHP version 4.1 or above), a MySQL database server (MySQL version 3.23 or above), the “Smarty” templates package (no reason to worry as it is available as a combined download with bBlog) and a copy of the latest release (currently bBlog version 0.7.4) of the package; you can download this release from

Since the database should already exist before we install the application, we will need to create one – here, we recommend that you create a separate database (say “bBlog”), along with a special MySQL user having the appropriate permissions on this new database.

So, start up a MySQL prompt on your console and execute the following commands.

mysql> CREATE DATABASE `bBlog`;
Query OK, 1 row affected (0.00 sec)

This should create a database called “bBlog” – verify that the database has been created using the following command at the MySQL prompt.

| Database (bBlog) |
| bBlog            |
1 row in set (0.00 sec)

After confirming that the “bBlog” database has been created, we proceed to create a MySQL user with appropriate permissions. Just a  little note before you execute the next command – be sure to change the password in the following SQL statement for obvious security reasons.

mysql> GRANT SELECT ,  INSERT ,  UPDATE , DELETE , CREATE , DROP , INDEX , ALTER ON `bBlog`.* TO  “bbloguser”@”localhost” IDENTIFIED BY “password_comes_here”;
Query OK, 0 rows affected (0.03 sec)

This should create a MySQL user with the username “bbloguser” with the appropriate permissions to manage our new “bBlog” database.

Next, we have to identify the URL required to access our blog – this is critical since it dictates where we install bBlog. If you want our opinion, we recommend that you use an URL that reads like this:

There are other options available. For further details, please refer the installation guide at the following URL:

Next, we uncompress the source archive under the root folder of the Apache Web server.

$ cd /www/htdocs/

$ tar -xzvf /tmp/bBlog-0.7.4.tar.gz

This should create a directory named “blog” with the all required files.  Here is a quick view of some the files and folders that should be created on our Web server.

| — archives.php
+ — bblog
| —— BUGS.txt
| —— INSTALL.txt
| —— LICENCE.txt
| —— README-URLS.txt
| —— …
| —— index.php
| —— install.php
| —— …
| — htaccess-cleanurls
| — index.php
| — item
| — rss.php
— section

You should immediately rename this “blog” folder to “theblog” so that the blog can be accessed using the URL – – as discussed earlier. The following command should do what you need.

$ mv blog theblog

You’ll need to take one final step before we move to the browser-based installation screen – file permissions. As is common with most web-based applications, certain files and folders should be writable by the Web server. In this case, the following commands should be sufficient.

A little warning before executing these commands – they give blanket permission for the specified files to all users on your server. So, if you intend to host bBlog on a shared server, it would be wise to have a quiet chat with the server administrator on the best manner to enforce the required file permissions.

$ cd theblog/bblog/

$ chmod 777 cache/ cache/favorites.xml compiled_templates config.php

That’s about it as far as pre-installation requirements of bBlog are concerned. In the next section, we shall guide you through its browser-based installation wizard – one feature which we feel makes it very user-friendly to install.

{mospagebreak title=Installation}

After checking to make sure that the Apache and MySQL servers are running in the background, you can try accessing the installation wizard by pointing your Web browser to the URL (remember to update this URL if you have opted to install the application at a different location).

Here’s what you will see:

Blogging Away To Glory (A bBlog Primer)

This is the first screen of the “bBlog Installer” wizard, where we are required to agree to the GPL License – a common feature with Open Source software packages these days. Below, you have to specify if you are installing a fresh version of bBlog or upgrading from a previous version – choose the “Fresh Install” option and click on the “Next” button.

The next screen will let you know if the file permissions for the required files and folders – set earlier –  are correct or not. If all goes well, and it should, click on the “Continue” button to move to the next screen. If not, the “Installer” will flag an error message and will recommend a possible course of action.
Next, we have the “Database and Blog Settings” screen that allows us to specify the important parameters, which will determine the functioning of our blog.

Blogging Away To Glory (A bBlog Primer)

First, we have the general configuration settings:

  • Blog name: The name of our blog.
  • Blog Description: A short description of our blog.
  • Username: the username required to access the bBlog admin module.
  • Password: the password required  to access the bBlog admin module.
  • Email Address: the email address where bBlog should send e-mail notifications.

Next, we have to specify the MySQL settings:

  • MySQL Username:  the MySQL username. Here we set this parameter to “bbloguser” – the username of the MySQL user, created earlier

  • MySQL Password:  the MySQL password for the “bbloguser” MySQL user, provided earlier.

  • MySQL Database Name: the name of the database. We set the value of this parameter to “bBlog.”

  • MySQL Host: the name of the server where the MySQL database is located. The default value of “localhost” is sufficient for most requirements.

  • Table prefix: the prefix for each database table created by the installer for the bBlog application. We recommend that you use the default value i.e. “bB_”.

Finally, we have a couple of server settings that need to be set:

  • URL to the blog:  this is the URL used to access your blog. This should be set to “”, if it isn’t already.

  • Path to bBlog:  this stores the full UNIX path to the bBlog application. This should be “/www/htdocs/theblog/bblog/” in case of our installation.

Click on the “Next” button to stores these settings. So far, so good.

The next few screens will inform you that the required database tables,  plugins (tools required to ensure the smooth functioning of bBlog), configuration files have been created, installed and loaded correctly. The final screen lists certain steps that must be implemented in order to secure your bBlog installation from hackers: first, you have to delete “install.php” and the entire “install” folder and second, you have to ensure that the “config.php” file is not writeable by the Web server. The following UNIX commands should do what you need.

$ cd /www/htdocs/theblog/bBlog/
$ rm -fr install/
$ rm install.php
$ chmod 755 config.php

Congratulations – now, we have successfully installed bBlog on the Web server!

However, if you do encounter any problems during the installation process, do not hesitate to look at the Installation guide – – for possible workarounds.

{mospagebreak title=bBlog Administration Overview}

With the installation behind us, we proceed to check to check if bBlog is up and running. We point our browser to the following URL

The following “Login” screen of the bBlog admin module should come up:

Blogging Away To Glory (A bBlog Primer)

Use the credentials provided at the time of installation in order to log on to the application and view the default screen as shown below.

Blogging Away To Glory (A bBlog Primer)

Before we get into the specifics, let us quickly review all the important features that are available in the bBlog admin module:

  • Post: The most important screen since it allows us to add new posts to the blog.

  • Archives: This screen allows us to view previous blog posts with the option to “Edit” and “Delete” each post.

  • Comments: This allows us to review comments posted on the blog  with the option of editing or deleting them, as required.

  • Links: A quick way to organize links that we would like to display on our blog. For example, most bloggers prefer to list blogs that they read regularly – bBlog comes with a pre-defined category titled “Blogs I Read” where we can add such blogs.

  • RSS Fetcher: This section allows us to save the URLs to RSS feeds of our favorite blogs.

  • RSS Linker: Here we can customize the parameters of the RSS feed of our blog.

  • Sections: This module allows us to manage the “Sections” of our blog- consider them as categories that we can classify our blog entries into.

  • Plugins: This screen gives you a quick overview of the plugins required for the smooth functioning of bBlog.

  • Options: This useful screen allows you to modify the parameters associated with the blog such the Blog Name, Blog Description, the blog template to be used and much more.

Bet you thought that maintaining a blog was child’s play! Not really – as you can see from the features available in the admin module, there is a lot more that you can do with bBlog than just enter blog posts.

And that is exactly what we intend to cover in the next section: how to add new blog posts, how to manage “Archives” and “Comments” and much more –  all in an attempt to get our blog up and running.

{mospagebreak title=Managing The Blog}

So far, we have already shown you how to install bBlog and also provided you with a quick overview of its powerful admin module. Now, it’s time to dig in and master the beast that we have unleashed. Just kidding!

When it comes to blogging, nothing is more important than posting a blog post –  after all, the primary reason to start blogging is to allow us to share our views with the world. Not surprisingly, the “Post Entry” screen is the default screen that comes up in the browser after we log into the bBlog admin module.

The bBlog “Post Entry” screen requires us to specify values for the following parameters:

  • Title: a title for the blog post.

  • Entry Text: the text associated with the blog entry  – this is where we can rave and rant about everything under the sun.

  • Entry Modifier: this interesting option allows us to use text-formatting plugins to enhance our blog posts with hyperlinks, images and much more. Fortunately, bBlog is equipped with a bunch of power-packed plugins to make our job easier – BBCode, Newlines and URLS, Textile V2 and Texturize – take your pick. Just in case you get the urge to scream for help, click on the “Modifier Help” button alongside to learn more about each plugin.

  • Sections: this lists the different “Sections” defined for blog. Consider “Sections” as a means to organize your blog posts into meaningful categories, thereby making it easier for visitors to read your thoughts on a particular topic. More on this later.

  • Publication Status: all entries should be saved as “live” or “draft”- the former are visible to the visitors of the blog while the latter aren’t.

  • Hide From Homepage: this flag allows you to specify if this particular blog post should be visible on the home page of the blog.

  • Comments Options: this allows us specify if comment can be posted by visitors for this blog post. bBlog provides several useful options here: one disallows users from posting comments after a specific period, while another prevents vistors from entering any comments at all. This security feature ensures that the blog administrator does not get spammed unnecessarily.

  • Send Trackback: Trackback is an interesting feature that allows us to inform the blogging community that we have recently updated our blog. Technically speaking, this feature instructs bBlog to ping selected URLs with an excerpt of this blog post. Use this feature wisely and the blog will be popular in no time.

With the mundane explanations behind us, it’s time to submit our first blog post. Enter some text in the “Title” and “Entry Text” fields and hit the “Save Entry” button. That’s it – our first blog post has been saved.

We bet that you are now curious to see what our blog looks like. All we need to do is click the “Visit your Site” hyperlink that appears on the top right corner of the admin screen and voila – our blog will appear in a new browser window:

Blogging Away To Glory (A bBlog Primer)

Not impressed with the layout? No problem – we can always customize the appearance by modifying the templates associated with the blog. More on this later.

For the moment, let us move to next option in the menu – the “Archives” option. If we become addicted to blogging (most people do),  soon we will have to deal with the problem of old blog posts. This is where the bBlog “Archives” feature comes in handy – it allows you to view a selected “number” of entries for a particular “section” for the specified “month” on a single screen. Just select the required values from the associated drop-downs on this “Archives” screen and the application will list all entries that match the selected criteria, as shown below:

Blogging Away To Glory (A bBlog Primer)

Click on the “Edit” button to review each entry, or alternatively, just hit the “Delete” option to remove the entry from the database. After a quiet re-confirmation, bBlog will inform us that the selected post was successfully deleted.

Now, let’s learn about the “Comments” option. It is common for visitors to post comments in response to your blog posts. This is an effective way for blog “mates” to share their opinion. Unfortunately, this feature can also be misused, since it allows visitors to flame your blog with abusive comments.

In order to ensure that this situation is quickly corrected – we would not like our regular visitors to read such comments – we can use the “Comments” feature in the admin module to moderate them.

Just click on this option on the menu to view the following screen:

Blogging Away To Glory (A bBlog Primer)

Each comment is listed in a chronological order with “Edit” and “Delete” options. Click on the “Edit” button if we feel that a particular comment can be edited to read better, say by removing some obvious typos or words, or hit the “Delete” button if we find that it is not suitable – after all, it is our blog!

And just in case you are wondering how you will be informed about such comments – bBlog can be configured to send you an email (with the comment) whenever a visitor posts one on the blog.

It is also possible that the blog is suddenly swarmed with comments on account of its huge popularity (clap! clap!). In such a scenario, it can be painful to moderate all the comments from a single listing. No problem – just filter these comments on the basis of the blog posts (using the drop down provided) and manage them more efficiently. Talk about convenience!

Finally, we have the “Sections” option. We have already indicated that we can organize our blog posts into categories – or “Sections,” as bBlog likes to call them. This is what it looks like:

Blogging Away To Glory (A bBlog Primer)

On this “Sections” screen, we have the option to add a new section as well as to modify or to delete an existing section. Each new section is associated with two parameters – a “URL Name” stored for internal reference and a “Display Name” that is shown to the visitor on the blog.

A little note of warning before we move on – bBlog does not warn us if we delete a “Section’ that is already associated with existing blog posts. So we have to be a careful when we decide to delete one.

Phew! Don’t say we didn’t warn you – managing a blog is definitely not child’s play.

{mospagebreak title=Dress Up Your Blog}

One interesting aspect of maintaining a blog is the opportunity to change its appearance on a regular basis. In fact, most on-line blogging service providers as well as blogging tools use  easily customizable templates to render a blog, and bBlog is no exception.

Earlier, we mentioned that bBlog uses the Smarty templating engine internally. However, it is also true that everyone does not have the time or patience to master such tools for a simple task such as modifying the appearance of a blog. So in this section, we will attempt to give you a crash course on how to customize the appearance of our bBlog-run blog with just a few simple tweaks.

Interested? Read on.

For starters, we associate a template with our blog on the “Options” screen in the bBlog admin module. Take a look at the following screen shot:

Blogging Away To Glory (A bBlog Primer)

The fourth option on this screen is titled “Template” and allows us to select a template that will be used to render our blog. Fortunately, bBlog comes pre-installed with a nifty little template titled “lines” – we have already seen a screen shot of this template earlier.

But where are these templates stored? If we investigate the folder structure of the bBlog application, we will notice that there is a folder titled “templates” under the “bblog” folder (the exact location for our installation  would be “/www/htdocs/myblog/bblog/templates”). Yes – as you might have guessed – this is the location where bBlog stores its templates.

First, let’s take a quick look at the default “lines” template. Not surprisingly, there is folder titled “lines” and this folder contains all the template files, as well as images and style sheet files required to render the blog.

Here is a list of some of the important files located in this folder:

$ ls -l
total 44
-rwxr-xr-x    1 1000     1000  575 Feb 19  2004 archives.html
-rw-r–r–    1 1000     1000 1039 Jan 23  2004 calendar.html
-rwxr-xr-x    1 1000     1000 423 May 15  2004 footer.html
-rwxr-xr-x    1 1000     1000 679 Jan 17  2004 header.html
-rwxr-xr-x    1 1000     1000 718 Mar 21  2004 index.html
-rwxr-xr-x    1 1000     1000 6199 Jan 25  2004 lines.css
-rwxr-xr-x    1 1000     1000 3921 Jan 17  2004 post.html

As you might have guessed – the “index.html” file represents the index page of the blog, “header.html” file represents the header,  and “footer.html” represents the footer and so on.

Coming back to our original requirement: customizing the blog template.

Here is screen shot of the new design that we would like our blog to look like.

Blogging Away To Glory (A bBlog Primer)

For starters, we need to create a new folder under the “templates” folder, say “theblog,” and this represents the name of our new blog template.

Next, we must prepare custom versions of all the “html” files that will allow us to customize the appearance according to the screen shot displayed above.

We start with the “index.html” – click [link file=”index.html”]here[/link] to save the updated version for your local reference.

A quick glance in this file and you will notice that it further includes two files – “header.html” and “footer.html”. Each of these files can be downloaded here – click [link file=”header.html”]here[/link] to save the “header” file and [link file=”footer.html”]here[/link] to save the “footer” file.

While these two included files mostly contain HTML code along with some Smarty-related identifiers for displaying the title (of the blog) and description in the design, the “index.html” file is the one that contains the code for rendering the blog entries, one after another.

Take a look at the following code snippet:


  // snip

      {getrecentposts num=10 assign=posts home=true}
      {foreach from=$posts item=post}
      {if $post.newday}<DIV class=”date”>{$post.posttime|date_format:s2}</DIV>{/if}
        <BR clear=”all” />
        <DIV CLASS=”postitem”>
          {$post.body}<BR /><BR />
          <DIV align=”right” class=”posted”>{sectionlinks sep=” &middot; ” sections=$post.sections} &#8226; <A href=”{$post.permalink}”>{$post.commentcount} Comments/Trackbacks</A></DIV>
      <BR clear=”all” />

   // snip

Once again, we will avoid getting into the nitty gritty on how this template works. The important thing to note here is how Smarty and bBlog identifiers are used to list the blog posts, one after another. And for each blog post, the “$post.posttime” identifier represents the time it was created, “$post.title” represents the title, “$post.body” represents the body and so on.

While this is not a drastic re-haul of the default “lines” template, it does give you an idea of how easy it is to customize the appearance of the blog.

If you are looking for more complex customization, you should have a look at the bBlog v.7 Template Documentation available at the following URL:

Do not despair – we are not going to leave you high and dry with respect to our custom template. Here you can download the other files required to complete the entire set: [link file=”archives.html”]archives.html[/link] and [link file=”post.html”] and post.html[/link]. Finally, the CSS file – [link file=”myblog.css”]myblog.css[/link].

And yes – once you have saved all these files in the required folder on your Web server, do not forget to associate the blog with this new template on the “Options” screen.

One final note: we have not included the images referenced in the template. However, we are pretty sure that you can replace them with your own custom versions.

{mospagebreak title=Conclusion}

This brings us to the conclusion of our primer on the “bBlog” blogging software. If you’re interested in learning more about this tool, take a look at the following links:

The official bBlog website –

bBLog documentation:

Try out bBlog at

Here are some alternative PHP-based blogging tools that you might want to try out:

WordPress –

b2evolution –

Textpattern –

That’s about it from us for the moment. Till next time, take care!

Note: All examples in this article have been tested on Linux/i586 with Apache 1.3.12, MySQL 3.23 and PHP 4.1.2. Examples are illustrative only, and are not meant for a production environment.

[gp-comments width="770" linklove="off" ]

chat sex hikayeleri Ensest hikaye