Web Directory

Wordpress 2.6.2 Has Just Been Released

Wordpress version 2.6.2 has just been released. According to Wordpress, version 2.6.2 protects Wordpress from a certain kind of hack that will reset your password among other minor bug fixes.

The hack is triggered whenever someone who registers to your website crafts his username in such a way that will be able to reset another user’s password to a random password. He then is able to take advantage of a weakness in the mt_rand() to be able to guess the randomly generated password. He then will be able to login as that user and can wreak havoc.

I recommend everyone who has open registrations enabled on their blog to uprade to Wordpress 2.6.2 straight away, while upgrading is not so urgent for those like me who have not enabled open registrations on their blog.

Now I just have to wait till after my exams when I have time to be able to properly upgrade my blog. Upgrading Wordpress is one of the things I fear the most, a lot of things have gone wrong whenever I tried to upgrade Wordpress in the past :P .

If you enjoyed this post, make sure you subscribe to my RSS feed!

posted in Blogging, Wordpress | No comments>> | written by admin

How To Highlight Author Comments In Wordpress Without Using Plugins

You’ve seen blogs where the author’s comments are highlighted, and I bet you would have thought that it was pretty cool. Besides the cool factor, highlighting your (authors) comments can be extremely useful as it helps you build your authority factor and helps first time visitors know who the administrator is.

Having seen how useful highlighted author comments were in other blogs, I set out in search for the solution that will let me do the same. Yes, I found many plugins to do the job, however, I don’t like installing Wordpress plugins for unnecessary things like this which can be hard coded into the template.

After looking around a bit I found Matt Cutt’s post really clued me in on what to do. Matt Cutt’s version works, however I think the way I did it below is easier to understand. What I did was to insert a php code into the comments template that checked every comment to see whether the author ID was 1 (It is 1 for me as my author ID is 1, most blogs should leave it at 1) and if it were to print the words authorcomment, if it wasn’t it would print visitorcomment.

Note: I check the comment to the author ID, so if your author ID is not 1, please change the number to your own author ID. Also, this method is not the only method by which you can hard code author highlighting into the template, but this is one of the simplest.

First of all, open your comments.php template, then look for the block of code below. It won’t be exactly the same for different themes, but it should be close enough though.

<?php if ($comments) : ?>
    <h3 id="comments"><?php comments_number(’No Responses’, ‘One Response’, ‘% Responses’ );?> to &#8220;<?php the_title(); ?>&#8221;</h3>

    <ol class="commentlist">
        <!–the beginning of one comment–>
    <?php foreach ($comments as $comment) : ?>

        <li>
            <cite><?php comment_author_link() ?></cite> Says:
            <br />

            <small><?php comment_date(’F jS, Y’) ?> at <?php comment_time() ?></small>

            <?php comment_text() ?>
            <div class="divider"></div>

        </li>

    <?php endforeach; /* end for each comment */ ?>

    </ol>

After that look for the <li> before the start of your comments and replace it with:

<li class="<?php if ($comment->user_id == 1) echo "authorcomment"; else echo "visitorcomment" ?>">

The end result should be below:

<?php if ($comments) : ?>
    <h3 id="comments"><?php comments_number(’No Responses’, ‘One Response’, ‘% Responses’ );?> to &#8220;<?php the_title(); ?>&#8221;</h3>

    <ol class="commentlist">
        <!–the beginning of one comment–>
    <?php foreach ($comments as $comment) : ?>

        <li class="<?php if ($comment->user_id == 1) echo "authorcomment"; else echo "visitorcomment" ?>">
            <cite><?php comment_author_link() ?></cite> Says:
            <br />

            <small><?php comment_date(’F jS, Y’) ?> at <?php comment_time() ?></small>

            <?php comment_text() ?>
            <div class="divider"></div>

        </li>

    <?php endforeach; /* end for each comment */ ?>

    </ol>

OK, now with that done, all you need to do is to assign a style via css to style up all comments with the class “authorcomment”. Open up style.css template, then insert this line:

li.authorcomment{background:#000000;color:#ffffff;}

The line above gives a black background and white text to all of the your comments. If you want to change it, just change the code in between the 2 curly brackets and you’ll be fine.

Go change your theme now to get these cool highlighted author comments :) . Do you guys do it differently? Any suggestions?

If you enjoyed this post, make sure you subscribe to my RSS feed!

posted in Blogging, Tutorials, Wordpress | No comments>> | written by admin

Wordpress Version 2.6.1 Just Released

Wordpress version 2.6.1 has just been released, and I just upgraded. You can read more about the changes here. Basically, if you’ve no problem with using Wordpress 2.6, then you have no reason to upgrade to wordpress 2.6.1. Actually, the only reason I upgraded was because I found the stripe in my Wordpress control panel telling me that a new version of Wordpress had been released irritating, so I upgraded my Wordpress installation to 2.6.1 just to get rid of it.

I’m happy to say that this time my upgrade of my Wordpress installation was uneventful and nothing out of the ordinary happened while upgrading. I did a manual upgrade this time mind you, without relying on all those instant or automatic backup plugins.

Anyway, this was just a heads up to all of you that wordpress Version 2.6.1 has just been released :) .

If you enjoyed this post, make sure you subscribe to my RSS feed!

posted in Blogging, Wordpress | No comments>> | written by admin



Vist a casino online and use these Blackjack tips to win!
Visitor Tracker