Level10 Blog Matrix Plugin for WordPress 2.x

I found a plugin for wordpress I was searching for to separate the entries of each author – you can download it here.

The problem was that it was a bit outdated when I downloaded it, and didn’t work with the recent WordPress v2 series. I spent a couple of hours tuning it up and finally got it working as I wanted for this website.

I wanted this up and running as soon as possible, so I patched it up quickly without necessarily choosing the best solutions.

But just because there seem to be many people with the same problem I’m recording here what I did.

At first I came across this big MySQL error:

WordPress database error: [Unknown column ‘user_nickname’ in ‘field list’]
SELECT wp_users.ID, user_nickname, user_firstname, user_lastname, user_nicename FROM wp_users WHERE user_login ‘admin’ ORDER BY user_nickname

As WordPress v2.X has a different database structure this is to be expected. Specifically there are neither “user_nickname”, “user_firstname” nor “user_lastname” in the user table.

To fix this…

Open the “level10_blog_matrix.php” from your plugins folder with your favorite text editor

1. Search and replace “user_nickname” with “user_login”

2. Remove all “user_firstname” and “user_lastname” database calls

3. Go to line 516:

if ($show_fullname && ($author->user_firstname != '' && $author->user_lastname != '')) {
$name = "$author->user_firstname $author->user_lastname";
}

I personally didn’t mind the full names not appearing so I just replaced the above with this:

if ($show_fullname && $author->user_login) {
$name = ucfirst ( "$author->user_login" );
}

Optionally you can use the same ucfirst() function anywhere we have inserted the user_login to make the first letter capital.

In addition I had problems with my permalinks. Specifically, the category links didn’t have the required “category/” in the path as well as the author links didn’t have the “author/”.

To fix these problems…

1. Go to line 335:

if(($l10bm_data[permalinkCategory]==1) || $l10bm_data[matrixPrimeSubdirectory]) {
$url = str_replace("/category/","/",$url);
}

Comment out the entire condition:

//if(($l10bm_data[permalinkCategory]==1) || $l10bm_data[matrixPrimeSubdirectory]) {
// $url = str_replace("/category/","/",$url);
//}

2. Go to line 526:

if(($l10bm_data[permalinkAuthor]==1) || $l10bm_data[matrixPrimeSubdirectory]) {
$url = str_replace("/author/","/",$url);
}

Comment out this entire condition as well:

//if(($l10bm_data[permalinkAuthor]==1) || $l10bm_data[matrixPrimeSubdirectory]) {
// $url = str_replace("/author/","/",$url);
//}

Other Bugs:

- There is a bug with the category listings when you select to see the posts of an author for a specific category. In specific, it returns the display to the default category listing and not the category listing for the author. To fix this, goto line 82:

if(is_author() && !is_category()) {

and remove the second condition,

if(is_author()) {

- There is a misspelled word: “Catagories” (instead of “Categories” – just search and replace)

- I had problems with the “Uncategorized” category showing up in the category listings. In my database that category had cat_ID=1 with no other category having a smaller number than that. In the plugin though it has database queries searching for “cat_ID > 0″ so I searched and replaced them with “cat_ID > 1″, just to bypass that category all together.

Overall it was kinda easy but had a bit of work to do . Hope this helps you.

Last 5 projects by Makis

6 Responses to “Level10 Blog Matrix Plugin for WordPress 2.x”

  1. Andrew Wimmer Says:

    Thanks for your tips on patching the Blog Matrix plugin. I’ve been searching for it but haven’t been able to locate the plugin itself. Would you be able to share a copy? AW

  2. makis Says:

    Certainly Andrew,

    Since the download from the author’s website is not working I’ve uploaded a copy here:
    http://rapidshare.com/files/194966390/Level10_Blog_Matrix-0_9.zip

    Note that this will not work for current versions of WordPress (>2.3)

    I am in the process of creating a new “Author’s categories” plugin – stay tuned for that one coming out soon ;)

    Cheers,
    Makis

  3. MAKE SITES .CC : Wordpress Plugin: Author Categories (v1.0) Says:

    [...] need but couldn’t find it on any plugin. To be exact I was using a modified version of another similar plugin but that was until version 2.3 where the database structure changed for WordPress and it simply [...]

  4. Gaston Says:

    I really like this blog good job.

  5. Neal Harmon Says:

    Makis,

    Thanks for posting the download. How’s the new “Author’s categories” plugin coming for you? I’m using the latest wordpress (2.8.4) and wanted to use the Blog Matrix plugin for author categories (thank you for letting me know that it won’t work).

    I’d love to try out your new author plugin as soon as it’s ready!

    Thank you,
    Neal

  6. Neal Harmon Says:

    Sorry for overlooking the permalink. Found it.

Leave a Reply