FV Community News V1.2

Finally, after a lot of programming the time is here. It’s the time for another update of my Community News plugin. This version includes a better way to protect you from being spammed, image uploading, edit submissions and more…

Spam Protection

While I was looking how my plugin works on different sites, I noticed that a lot of spam was coming through the default spam protection, build-in since version 1.1. (This means the default protection without captcha) Personally I hate those no-life spammers, throwing a whole lot of crap to your blog and from the beginning I use Akismet om my blog to protect myself, witch works pretty good. So I decided to build this great peace of spam-killing code into my plugin.
To accomplish this I used the Akismet PHP4 class, written by Bret Kuhns. Submissions will be marked as spam, just like comments, if Akismet finds a message to be spam. This way you can still approve submissions that aren’t spam, but are marked as if they are.

Image Uploading

Another new feature is the possibility to let submitters upload an image along with their submission. I received a request for this, and thought: “Hey that’s a good idea!”. The image field is not required, and therefor you could setup a default image that is used when people don’t upload one. You are also able to configure the maximum sizes for an image (width and height separated).
Note that it could happen that you have to create the upload folder manually. If so, the plugin let you know. Just create a new folder in your WordPress root folder called ‘wp-fvcn-images’, then chmod it to 755 and everything should work fine.

To add the images to your list of submissions, you could use the new %submission_image% tag. This tag will change into the location of the image, so to add a new image, in its img tag use something like this:

<img src="%submission_image%" alt="" />

Note that when people upload an image they can’t use AJAX, because JavaScript can’t access the image. Here is taken care of automatically.

My Submissions Page

Want to let submitters view their own submissions? Now that is possible with the new ‘My Submissions’ page. This is an optional page you could enable where registered users of your blog could view and submit their submissions.

Edit Submissions

I also received a request for this one. So from now on you can edit the submissions. Note that the ‘Edit Submissions’ page is already created with and for WordPress 2.7. If you are using the 2.7 nightly-builds you won’t notice, but else you will see that the box with the Save button looks a bit crapy. I have thought a while about this one, but since 2.7 will be released within a few weeks, I think it isn’t worth the effort to make it look good in 2.6 and 2.5.

Dashboard Widget

Another 2.7+ feature is a dashboard widget. It looks almost the same as the comments widget and also has the same features. You could simply Approve, Unapprove, Spam or Delete a submission with one single click while your at the dashboard page.

Other Fixes

More little bug-fixes have been applied. A small list:

  • The AJAX didn’t work when there was a ? in the URL, now it does work.
  • The settings page is separated in different tabs for a better usability.
  • Some problems with the function that shortens up the submission text are fixed.
  • You can now add a description if using the widgets.
  • The number of unmoderated submissions is added to the admin menu.
  • Link actions are added.
  • Some problems occurred when you have modified the location of your wp-content folder, this is fixed.
  • The ‘Post URL’ field isn’t required anymore. (Had a request for this)
  • You now can override the template settings in your theme pages, instead of vice versa.
  • Some fixes are applied to the RSS feed.
  • Problems with the admin menu are fixed.
  • The reloading of the captcha is improved.

That’s about it 🙂
Any suggestions? Please leave a comment.

Wordpress Plugins