Custom Field Validation In Statamic

I ran into a situation recently where I needed to perform some custom validation when saving Statamic entries in the control panel. Essentially, we have a site that has lots of articles on it, and it has become harder and harder for our editors to know if they have already used a specific article title in the past.

As you may know, Statamic is based (at the time of writing) on the Laravel PHP development platform. In this tutorial I hope to show you how to easily extend Statamic field validation with your own custom validators as needed by tying into the functionality for custom validators offered by Laravel.

The first step in this process was to create a new addon for Statamic with a custom service provider. Read the rest of this entry »

Project Fyre – My Latest Inspiration

logo-square

Project Fyre will give you a simple way to start promoting your next great idea.

With an easy install and a little customization, you can quickly create a sleek looking landing page for your new product.

More specifically, you can create a place to pre-launch, where people can begin to come and learn about what it is you are creating. With this knowledge at hand, you may discover new niches and markets, learning more about the demand for what you intend to offer and building a potential base of interested customers.

Features:

  • Fast, simple install and setup
  • Social sharing built-in
  • Email subscription built-in
  • No MySQL required
  • PHP 5.6 compatible

Check out the site (which actually demonstrates some of what Project Fyre offers) at the following URL:
https://project-fyre.com/

Subscribe to be notified of updates, or follow it on twitter at: https://twitter.com/ProjectFyre

Steps to Keep WordPress Secure

It has been brought to my attention that WordPress is becoming a juicy target for hackers and bot-nets.  As such, here are some simple steps you can take to prevent your WordPress site from being hacked.

  • Change your admin password regularly.
    One strategy that hackers are using is simple brute-force attacks to try and guess your password.  You should change it regularly, and make sure the password you choose is very hard to guess.  Long combinations of letters, numbers and symbols are best.  Sentences can be good too.  Consider using a password storage solution such as LastPass.
  • Install a plugin to block bad logins.
    There are a number of plugins out there which can lock user accounts if too many bad login attempts are detected.  Installing one of these would be a good security measure. Read the rest of this entry »

AmazonFeed 2.1 Released

I have finally released AmazonFeed v. 2.1. While not a major release, it updates the code to be compatible with WordPress 3.1.1 and fixes a few minor bugs. One bug for example would prevent your custom Amazon tags from being saved in certain situations. This has now been fixed. Hope you enjoy the plugin. If you have questions or comments, feel free to leave them in the comments associated with this post.

Wicked Cool PHP – Review

Wicked Cool PHP

Wicked Cool PHP

It’s not often that I write reviews about specific products, but I recently bought this book and couldn’t resist recommending it to anyone who has a basic grasp of PHP and is looking for some practical applications and scripts to work on. I have found it to be a great PHP scripting resource which walks through a number of very useful scripts in detail, discussing exactly what is going on and how the script might be used in real life.

The authors, William Steinmetz and Brian Ward, do an excellent job of walking through each script showing how it works, what the potential pitfalls are and how it might be used in real life.  The best part is, there isn’t a single “Hello World” script in the book.  Rather the scripts are solutions to real life programming situations that most PHP programmers will run in to at one point or another.

I highly recommend Wicked Cool PHP to anyone starting out with PHP who wants to go a little deeper than “Hello World” or wants to see real examples of practical PHP scripts.

PHP Object Unit Testing

I recently found a PHP tool that might actually be useful to a lot of developers in helping to keep their PHP code clean and help with bug tracking and diagnosis.  With PHP 5, we now have the ability to delve quite heavily into OOP based scripting.  This basically means creating PHP code as Objects instead of spaghetti code.  The tool I found recently is a simple framework for testing your newly created PHP objects.  It is called SimpleTest.

Basically, you can build your PHP objects and use this tool to create test cases in order to ensure that future upgrades don’t break existing code. This is called Unit Testing.  Check it out.  I’d love to know how you like it.

WordPress Plugin: Related Products from Amazon.com

This plugin will allow you to make money on your website as an Amazon.com affiliate.  It enables you to automatically advertise products from Amazon.com which are specifically related to the topic you are writing about.

Features:

  • Automatically load category or tag related products from Amazon.com.
  • Earn rewards as an affiliate, simply by entering your affiliate tracking code.
  • Provide valuable additional content to your visitors on the topics of your posts.
  • Total control to tailor results for any given post.
  • Excellent content caching for lightning fast response times.
  • Ability to disable related products from being displayed at all on any given post.
  • NOT JavaScript based, meaning it is not hidden from users with no JavaScript capability.

Read the rest of this entry »

SendFeed WordPress Plugin

I’m very excited to announce the release of SendFeed, a brand new RSS/XML Feed to Email WordPress plugin.

The SendFeed Plugin for WordPress allows you to send your latest post from your RSS feed to an external Mailing List Manager in both text and HTML formats.

It is capable of sending messages out immediately, at predefined intervals such as daily/weekly/monthly or manually.  Also, the text and HTML templates are completely customizable on a per feed basis so you can tailor the emails to suit the list or feed you are using.

The plugin was developed by me while working for TruthMedia.  We have just released the very first edition of the plugin on WordPress.org.

You can find it at: http://wordpress.org/extend/plugins/sendfeed/

Original Post Here: http://truthmedia.com/2008/11/19/sendfeed-v-11-released/

Website Subversion Backup

As a PHP coder and web developer, I have recently discovered and fallen in love with a tool which helps to keep my source code safely backed up. This tool is called Subversion and “it is used to maintain current and historical versions of files such as source code, web pages, and documentation.” (1) In simple terms, it allows you to back up your files and keeps a history of all the versions of files that you send to it.

This is VERY useful when doing PHP development because as you develop your application you can commit versions of the files to the Subversion (SVN) repository and it will keep track of all the changes you have made. If necessary, you can even revert back to older versions.

One of the difficulties that I have run into while doing website development is how to keep the live remote website synchronized with my local working copy. This is especially true of WordPress installations where editors may be uploading new pictures or documents to the site on a daily basis. If you are not constantly downloading the latest copy of the website, your local copy will be out-of-date and may cause problems in your development.

Subversion to the Rescue:

However, I have come up with a relatively simple solution to this problem, which utilizes the controls within Subversion, to both back up the data on the LIVE website, as well as providing version control for all the site data as a whole. For the sake of simplicity, I will be using a WordPress website as my example, but the concepts here could be applied to essentially any website.

One of the useful features of Subversion is the ability to run what they refer to as “hook scripts” at different points in the versioning process. For example, an SVN repository can be configured to run a set of scripts directly after any data is “committed” to it. (sending data to the repository is called “committing” the data) For this example, this is exactly the functionality we are going to be using.

Before I go any further though, let’s go over some of the requirements for setting up a website and subversion repository in this way.

Read the rest of this entry »

FormBuilder WordPress Plugin

I am very excited to announce the public (beta) release of the FormBuilder WordPress plugin on WordPress.org. FormBuilder is a project which was inspired, in part, by my work on FormContact 1.0 and came about as a result of our need for a good yet simple form building utility for WordPress.

The plugin was developed by me while working for TruthMedia. At the time of writing, it is at v. 0.57 and is compatible with WordPress 1.5 – 2.5. If you have a WordPress blog already, why not check it out!

Next Page »