Very *effective* antispam trick on blogs

Most of bloggers have a problem with spam. Of course, there is Akismet, but sometimes Akismet is not good enough because he doesn’t catch all spam messages. So, with this in mind, i wanted only to get rid of all automated messages.

So, look what i did:

First of all, i go with „robots fills ALL fields with something” in my mind. I’ve added only TWO lines of code: one in comments.php from your theme folder and one in wp-comments-post.php from your root folder.

Ok, how you do it?

First of all you need a ftp client and a text editor. E-texteditor is 2 in 1 so you can download a trial version for doing this. Ofcourse, you can use the old and ugly notepad (or whatever your OS has default).

Open comments.php (which is in your wp-content/themes/your_theme_name folder) then find this line:

Some things can vary (like ID of the form), but 90% in cases you won’t need to look for something else ;)

Just AFTER this line you add:

Don't fill this!

We put a form here and hide it. I didn’t use display:none because i wanted to be sure that field will be showed up, even is on the left side of the screen (you should actually turn you head to left to see it :P ) So the bot will actually SEE that form and will fill. Normal user won’t.

Save and upload (or just save if you work directly on ftp) then open wp-comments-post.php from your root folder. Just after the


beginning part, just add this:

if( $_POST['name2']!= ''){
	die('Spammer!');
}

Save and upload.

Next you need to... Hmm... You don't need to do anything else ! Now empty your Akismet queue and wait to see if you get any other spam messages ;)

Note that is possible to not catch ALL spams, but those are automated you won't get it anymore :) Also, when you upgrade wordpress make sure you make those changes again. And finally, BACK UP FIRST!

Update.

READ THIS!

Verry annoying thing that i had recently noticed: even if this small plugin do a great job for spamm *comments*, will NOT work on trackback spam.

Wordnewz WordPress theme

Well.. is done :) The Wordnewz is finally done.

As i said, there is two version of theme: free and premium. Read below to see the differences.

Preview:

Free theme :

  • You have to edit all files to make some changes. For ads you need to edit files from ads folder. For index settings you need to change index.php
    • For featured slider: find
      < ?php $my_query = new WP_Query('tag=featured&showposts=3');

      featured – enter tag slug and how many slides you want

    • For small excerpts find:
      $my_query = new WP_Query('category_name=economy&showposts=3');

      Change category_name according to your category slug

  • Images is added width custom fields with 130x130px for index and 200x150px for inner slider
  • Plugin settings
  • Print This
  • Email this
  • Excerpt length: 150

Download here.

What about premium version?

When you purchase the premium version you will have:

  • Technical support
  • Install/configure wordpress theme and plugins
  • Small changes of theme (colours, sizes, etc)
  • Admin panel for theme
  • RSS for each category
    • mail: slice [@] iamntz. [] com
    • y!messenger: i0nutzb
    • skype: i0nutzb
  • The price for premium theme is $50 and for more details you can contact me here:

    For now i don’t have an automatic way for purchasing, but i will reply you ASAP.

WordPress get_posts() function

Today i spent some time trying to figure how to get existing (and also used) tags from wordpress and using in admin panel as a combo box, for my brand new theme Wordnewz.

The return of get_tags() function was some kind of array but, because of my skills (not) in PHP i spend WAY too much time to go figure what to do. The initial result of get_tags() function is:

Array
(
    [0] => stdClass Object
        (
            [term_id] => 28
            [name] => Featured
            [slug] => featured
            [term_group] => 0
            [term_taxonomy_id] => 29
            [taxonomy] => post_tag
            [description] =>
            [parent] => 0
            [count] => 6
        )
)

And i only needed [name] and [slug]. Ofcourse, like a smart guy that i am, i pointed my browser on wordpress codex where i found… NOTHING. Nothing about this function… Great. Let’s try various stuff and google it for any ideas. And i found a PHP function get_object_vars for easy conversion. After this, all was GREAT. I use it like this:

$allTags = get_tags();
foreach($allTags as $thisTags) {
		$thisTag = get_object_vars($thisTags);
		echo '


\n';
}

And it WORKS like a charm. I posted this thing because i didn’t found too much references for stdClass Object or get_tags() WordPress function.

And another one!

After last two wordpress themes that i released in last weeks was a success (i expected to have less feedback than i had), i was thinking to make another theme. This time will be a free-premium theme. What it mean this? The theme will be launched as a free theme and will have some features available only if you pay (almost anything from site will be customizable from admin panel).

Anyway, it’s a theme great for using in a news site, fixed width, two sidebars, using custom fields and various plugins.

Here is a preview of current progress:

I think will be done by the end of this week, when i will release both free and premium version of the theme.

Stay tuned for more.

Another free WordPress theme – Rounded.Cube

Yesterday i was pretty bored: weekend, alone, and all bad things and i say to make another free wordpress theme. I opened Photoshop and i start to draw. You can see the results on the next screenshot or here.

Free wordpress theme

Some of the main features:

  • Widgetizable;
  • Xhtml 1.1 / CSS 2.1 Valid;
  • 2 columns;
  • trackbacks and pingbacks are separated from comments;
  • and more things that you can discover if you try this great and free wordpress theme :D

You can download the teme HERE.

But wait! There is more nice things to come! More free wordpres theme to come and if you want a premium theme, don’t wait and contact me.