Fighting spammers: Removing Website URL Field from Comment Form

I’m tired of receiving massive amount of spam comments on my blog (1280 spam comments for about a month) and doing:

DELETE FROM `wp_comments` WHERE `comment_approved` = 0

Beside using SI Captcha Anti-Spam which does pretty good job in keeping some of the automated spam bots at bay, I noticed some trend in the spam comments flooding my posts, they are all full of SEO keywords and they are heavy abusing the Website field in the comment form.

Here is a small “plugin” which will remove (unset) the URL field in the comments form:

<?php
/*
Plugin Name: Remove Website field from comments.
*/
function custom_comment_fields( $fields ){
  if(isset($fields['url']))
    unset($fields['url']);
  return $fields;
}
 
add_filter( 'comment_form_default_fields', 'custom_comment_fields' );

Create a file in /wp-content/plugins/ with the code a bough. Go to the ‘Plugins’ section of the admin panel and activate the newly created plugin named “Remove Website field from comments”.

Yey, no more “Website” field in the “Leave a Reply” section 🙂

Gentoo: No image size information in Dolphin

Dolphin 16.04.3
Dolphin 16.04.3

One thing that was not working with my Gentoo installation was the information for image dimensions (and image data in general) in Dolphin. The resolution is to rebuild Dolphin with the semantic-desktop use flag turned on.

echo "kde-apps/dolphin semantic-desktop" &gt;&gt; /etc/portage/package.use/dolphin
emerge --ask kde-apps/dolphin

I thing that this flag should be on by default when building a system with KDE desktop profile or at least mentioned somewhere in the Gentoo wiki.

Gentoo Linux: Ugly fonts in NetBeans and how to fix them

I recently installed Gentoo GNU/Linux + KDE 5 on my dev machine. One thing that was bugging me was the crappy font rendering in NetBeans.

To relolve the problem, locate your netbeans.conf file. Usually under /etc in your NetBeans installation folder, and append to netbeans_default_options the follwing:

-J-Dswing.aatext=true -J-Dawt.useSystemAAFontSettings=lcd --laf Metal

This will enable font smoothing in SWING and use default system settings for font smoothing. The last entry –laf Metal sets the preferred UI theme for the IDE, it should be Swing based theme such as Metal or Numbus.

Happy coding 🙂

GSM Signal Monitor 1.5 out now!

1-featuredimage
GSM Signal Monitor 1.5 is out now!
This version features new app visual style, additional logging options, bug fixes and Android 5.x and up support.

Version 1.5 Change Log
* New app visual style
* Compatibility with Android 5.x and up
* Fixed bug when clicking over the app notification in the notification area
* GSM Signal monitor will now log (optional) information when the phone is entering roaming state and changes in your mobile data connectivity.
* Fixed bug when no notifications will be made on some devices
* New Google play services version

Get it on Google Play

Alien Swarm 1.4.1 out now!

Alien Swarm version 1.4.1 is out now!

This is the best ‘Alien Swarm’ release to date. Featuring Facebook and Google+ share integration, so you can share your experience with friends and family. Sound and performance improvements, few bug fixes and more. Check it out!

Version 1.4.1 Change Log:
* Facebook and Google+ share improvements.
* Fixed visual bug when the game is running on tablets with Android 2.3.x
* Fixed crash when running on devices with Android 2.3.x
* Removed the ‘-1’ sign when hitting an enemy with a health bar.
* Sound improvements
* Small apk size reduction
* Reduced start up time

google-play-badge