#native_company# #native_desc#
#native_cta#

b2evolution – A Comprehensive Blogging Engine Page 2

By Ian Gilfillan
on February 13, 2006

Skins

The first thing most people want to do is change their default skin. Have a look at the skins that are supplied by default. You can click on each of them (they’re in the right-hand bar in the default skin, though they move around on the others) to see which you prefer. Here are some screenshots of basic, bluesky, guadelope, natural pink, originalb2, wpc_aubmach and wpc_default. You can also download more from the skins repository.

Posting to your blog

If you’ve managed to look past the pictures, you’ll have noticed that there are already some sample posts in your blog. Editing these is meant to familiarise yourself with some of the techniques. Let’s edit the first post, Important Information (screenshot 25). Adding formatting is simple. For example, to add the HTML <strong> tag (which usually makes bold whatever appears between the tags), simply highlight the text, and click the str tab. I’ll assume you know HTML, and if not there’s more than enough other resources, so this tutorial won’t explain what all the HTML tags do. The last four tags you won’t be familiar with yet, but we’ll see what they do in the next examples. Edit the first post, and add a few tags (screenshot 28). Here’s what I added:
<strong>Strong</strong>
<em>emphasis</em>
<del>deleted</del>
<ins>inserted</ins> 
<code>code
code
code</code>
<ul>
  <li>unordered list 1</li>
  <li>unordered list 2</li>
</ul>
<ol>
  <li>ordered list 1</li>
  <li>ordered list 2</li>
</ol>
<blockquote>block</blockquote>
<a href="https://phpbuilder.com">link to phpbuilder.com</a>
Also note the status (the default is for posts to be publicly visible), which you can change in various ways – making it visible to members only, to yourself only, or only in the admin tool. Remember as well that although you’re the admin user right now, and can do what you want, b2evolution is designed for multiple users, and multiple blogs. You can also select from one or more categories into which to post. After installation there are a number of default categories. You can change these from the Categories tab, which we won’t specifically look at as it shouldn’t present any problems to anyone. You can also decide whether to allow comments, whether to close comments (no more comments will be allowed – this doesn’t make sense in a new post), or disable them altogether.
Once you’re ready, click to preview the post (screenshot 29). It allows you to see what the post will actually look like, and give you a chance to correct anything before making it visible. I always preview my posts, but then I have a particular dislike of showing my own errors to the world. The preview opens in a new window. Close it, make any changes, and finally submit when you’re happy with it.

Cross-posting to multiple blogs

You’ll notice an oddity (at least with what’s currently the latest stable version, 0.9.11). The initial entries that are supplied upon installation have been cross-posted across multiple blogs (our newly-named PHP Blog, as well as Blog B). However, when you edit them, you’ll see that cross-posting has been turned off, and they can now only be posted into Blog B. So the changes we made effectively removed the post from PHP Blog. There’s a setting to change this, but you’ll need to dive into the code. In the b2evolution/blogs/conf directory, edit the _admin.php file, and change the line $allow_cross_posting = 1 to $allow_cross_posting = 2. The possible values for this (which are commented in the code) are:

0 Post to a single category only
1 Post across multiple categories (the default)
2 Post across multiple blogs/categories
3 Change main category among blogs, effectively moving from one blog to another. Caution is recommended!
Once you’ve done this, you can go back to the post we just edited, and restore it to PHP Blog. You’ll see that the sets of categories for both blogs are visible. If for some reason you can’t edit this file, just bear in mind that your edits will appear in Blog B only, and you’ll need to view them there.

Extended text

Take a look at the other posts in PHP Blog, called Extended Post, Extended post with no teaser and This is a multipage post. Read them fully, clicking on the Read More and page numbers. The text inside them is fairly self-explanatory. Let’s edit Extended post with no teaser. (screenshot 30). Notice the <!–more–> and <!–noteaser–> tags. These are the first of the mysterious !M and !NT tags we saw next the other HTML tabs earlier. Clicking !M inserts <!–more–> in the text, and anything after that is not visible on the front page, only after clicking Read more. !NT inserts <!–noteaser–> in the text, and this means that anything above is not repeated after clicking Read more. Essentially b2evolution overlaps between being simply a blogging tool, and also a reasonable content management system (CMS). It’s just this control that CMS’s require to ensure that people read the short blurbs, which don’t give away too much, and are enticed deeper down to read the full article (and another advertising impression).

Trackbacks

Trackbacks are a great feature, and I fail to understand why not all blogging software and services offer them. If you come across a post that you want to respond to, trackbacks allow you to notify that post that your new post is a response. Trackbacks are usually displayed amongst the comments, or just below or above. Let’s try one out. Have a look at PHP Blog, and the post I’ve renamed Not so important anymore (you can choose any other post). From PHP Blog’s front page, beneath the post you’ll see three options: Leave a comment, Trackback (0) and Edit. If you click on trackback, it’ll take you to the full post, as well as display a trackback address (this will be something like WEB_ROOT/b2evolution/blogs/htsrv/trackback.php?tb_id=21). Copy this text, and, back on the admin pages, click on the Write tab, and Blog B. Everything is just the same as it was when we edited a post, except of course, being a new post, it’s all blank. Write your new post, and add the trackback URL in the appropriate area below. (screenshot 31). When you submit, the server then contacts that URL, which in turn registers the URL from which the trackback is being sent, and adds it. Reload Blog B’s front page. You’ll see your new post, and beneath Not so important anymore (remember it was cross-posted across both blogs). It now reads Trackback (1). Click here, and you’ll see the trackback has been recorded, along with the blog title (still the default Blog B title and a link to the post. If you’ve set up your email correctly, and left the notifications checkbox checked, you’ll receive an email informing you of the trackback. Trackbacks are a simple and powerful way of getting people to link back to your blog. The abuse of which of course brings us to the next topic.

Antispam

b2evolution has some quite sophisticated tools to ward off spam, even if anonymous comments are enabled. It relies upon users to report spam, and the offending sources are stored in a central blacklist. Click on the antispam tab (screenshot 26). You’ll see a list of keywords that are already blacklisted. Any posts containing these keywords (or referring, commentary or trackback URL’s) will be banned. The first thing to do on a new blog is to download the latest blacklist, which will be quite lengthy the first time. (screenshot 27).
You can help by reporting all spam to the central server. Whenever you view a comment, trackback or a referer (from the stats tab), you’ll see the URL, and next to it a circle with a red line through it. By clicking on this, you’ll ban that URL from submitting anything else to your installation, and you’ll report it to the blacklist. If enough people report it, it’ll be added to the central blacklist. Hopefully your new installation hasn’t yet been inundated with spam, but here’s an example of removing referer spam from my personal blog. Screenshot 34 lists the recent referers to my blog. Spammers persist in spamming the referer logs, even though these are no longer displayed to the public by default (it used to be), so it provides them no benefit unless you, the administrator click on it to see what it is (which is hardly worth the trouble for them). See how many of my referers are obvious spam. If I click on beastsex-movies.com, b2evolution will find all instances of that URL (screenshot 35), and I can delete and report them all with a single click (screenshot 36).
Alone, this won’t be enough to stop the spam. Just like email spam, there’s an ongoing struggle between the developers and the spammers. The latest version of b2evolution added all sorts of new antispam techniques, and for a month or so after launch everything was quiet. However, the spammers eventually caught up. I advise you to check the forums for the latest – there’s a forum entitled Got spam, and another called Fighting spam that should be able to help. One of the techniques that seems to have worked for me is to rename the /htsrv directory, which is used for comments and trackbacks. Rename it to any valid directory name, and then edit the conf/_advanced.php file to reflect this new name, as follows:
* Location of the HTml SeRVices folder.
* @global string $htsrv_subdir
*/
$htsrv_subdir = 'new_htsrv'; // Place the new name here. 
Unfortunately this technique has become quite widespread, and is not particularly difficult to break for a determined spammer, so has become less effective recently. It does though distinguish you from the majority of b2evolution installations, which simply use the default.
Other techniques to reduce spam include server modifications so that comments can only be called locally (such as by using an .htaccess file), and using captcha (manual verification of image letters). Implementing these are beyond the scope of this article, but the forums will help you on your way.

Statistics

Accessible from within the admin section from the Stats tab, b2evolution provides some interesting data. I’ll use my blog as a sample, as you’re unlikely to have any stats yet on your newly-created blog. Firstly, there’s the referers (screenshot 37). Everytime someone clicks on a link to your blog from another web page, this is recorded here. Summary is perhaps the most useful, as it provides statistics on the total number of accesses to your blog, and the sources (referer, direct access, syndication, search engine or a robot – screenshot 38). The Refering Searches tab returns the search terms people use to end up on your blog (usually worth a laugh – screenshot 40). You can also get a list of RSS aggregators accessing your blog (Syndication), User agents, and the most recent URL’s for direct accesses.
Unfortunately b2evolution does not offer a feature that tells how many times each post has been accessed.

Syndication

b2evolution of course supports syndication. It automatically creates feeds in RSS 0.92, RSS 1.0, RSS 2.0 and Atom. Feeds for both posts and comments will automatically be created without you needing to do anything. RSS finally lives up to its Really Simple moniker.

Editing Templates

Even if you’ve found a skin that you like, at some point you’ll probably still want to make other changes. My own blog, for example, also contains an include I’ve created listing the most recent books I’ve read. These changes are quite easy to make and you don’t even need to manually edit the files. By clicking on the Admin/Templates tab, you’ll be able to edit any of the template files. You’re likely though to first have to make them writeable in most Unix-like servers – chmod 766 filename will do the trick. By experimenting you’ll soon find the appropriate file to edit depending on what you want to do.

Linkblog and Blogall

Earlier on we mentioned that of the four blogs created by default, only Blog A (which we renamed PHP Blog) and Blog B were normal blogs. The other two are slightly different. Blogall simply aggregates all posts to all blogs. If you don’t want it to appear, you can simply uncheck the Include in public blog list option under Admin/Blogs/Blogall.
The Linkblog is a special kind of blog, one that contains a list of other sites you’d like to link to. Usually you’ll just want to add a title and URL. The list then usually appears in your other blogs. Try it by editing the first linkblog post, which contains text explaining how it all works. Remove the text and add a URL. Once you’ve submitted, view PHP Blog, and you’ll see the links from the Linkblog in the right bar. (screenshot 39)

Conclusion

Hopefully you’re up and running with your own b2evolution installation. There’s of course lots more we haven’t covered, and new versions coming out will be bound to add new features. Happy exploring, and happy blogging!

Comment and Contribute

Your comment has been submitted and is pending approval.

Author:

Ian Gilfillan

Comment:



Comment: