Cory Mathews

WordPress – Contact Form 7 Send Error (February 18th, 2013)

I was getting the message “Failed to send your message. Please try later or contact administrator by other way” in a red bordered box when trying to submit a wordpress form using Contact Form 7 plugin. There are many, many ways this vague error message can be displayed. You could try installing an SMTP plugin […]

Importing Textpattern to WordPress 3.5 (January 31st, 2013)

I was looking to import an old site running Textpattern v4.2.0 to WordPress 3.5.1. I found this crappy plugin which never worked. So I had to find another easy way. RSS should work. It appeared the Textpattern site never had an RSS feed so to create one I went to Presentations > Pages > and created […]

WordPress 3.5 Media and Visual/Text Buttons No Longer Work (January 21st, 2013)

I recently updated to wordpress 3.5 and the add media button as well as the visual/text buttons stopped working when editing a page. Here is how to fix it. Download your wp-config.php file through ftp and add the line: define(‘CONCATENATE_SCRIPTS’, false); Just before the lines: /** Sets up WordPress vars and included files. */ require_once(ABSPATH […]

HostGator WordPress Emails Not Being Received By All Email Addresses (January 17th, 2013)

I was working with a hostgator shared hosting account and had created a simple contact form using a wordpress plugin. In testing I was sending it to my gmail and work email accounts. Everything worked as expected. Upon production I started sending it to the clients email which has the same domain as the site […]

Figuring Out Connection Pool Errors (October 1st, 2012)

This is the error I had to go on. System.InvalidOperationException: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. It sounds pretty obvious that it is a database connection that was not being […]

jQuery Custom Events (January 18th, 2012)

We are used to javascript events such as a “click” being handled similar to the following: $(‘#id’).on(“click”, function() { alert(“Item clicked”); }); But less common is the use of custom events available with the .trigger() and .triggerHandler() jQuery functions. With this I could create an event such as “cory.says.hello”, if I so wished and then […]

Using Quartz.Net to Create Scheduled Tasks (January 9th, 2012)

These steps are using version 1.0.3, and do not apply to version 2.x Quartz.Net is a full-featured, open source job scheduling system. Basically this system allows an web application to schedule and run background jobs. This makes it much simpler for us developers by making it so that we do not have to have […]

EventType clr20r3, P1 w3wp.exe – system.nullreferenceexception (December 15th, 2011)

My web app was crashing every few minutes, logging everyone off and completely restarting. Here was the message I had to go on and how I fixed it. Event Type: Error Event Source: .NET Runtime 2.0 Error Reporting Event Category: None Event ID: 5000 Date: ****** Time: ******* User: N/A Computer: ******* Description: EventType clr20r3, […]

HTML5 Placeholder in IE and Unsupported Browsers (December 9th, 2011)

The html5 placeholder attribute on an input tag is a really nice, however easily adding that feature to older IE versions and any other browsers that don’t support it renders it unusable in production. The below javascript/jquery code will check the page for any inputs with the placeholder attribute and make it work in browsers […]

List Current Parent and Child Pages in WordPress (November 22nd, 2011)

Recently in WordPress I needed to create a navigation that would display a page’s parent page and all of that pages children, I am a bit rusty with PHP but here is what I got to work. If you need to order the posts by the order value change the $pages = Line to $pages […]

WordPress Multiple Sidebars (October 13th, 2011)

Seems there are a lot of complicated ways to add multiple sidebars to a wordpress theme, so here is a simpler one. Add this to your functions.php file for the theme. add_action( ‘widgets_init’, ‘add_sidebars’ ); function add_sidebars() { register_sidebar( array( ‘id’ => ‘right’, ‘name’ => __( ‘right’ ), ‘description’ => __( ‘Right Sidebar’ ), ‘before_widget’ […]

jQuery External Image and Tab Plugin (September 14th, 2011)

This jQuery Plugin is a quick way to: open external links in a new tab(_blank)place an image next to external links Example Use Options blank – if true it will change the links to open in a new tab by adding target=”_blank”. This defaults to true. path – if set this is the (From the […]

Multiple WordPress Menus (July 14th, 2011)

WordPress 3+ allows for custom theme controlled menus. For this example I will be adding 3 but the same works for 2, 3 or any number of wordpress menus. In the functions.php file of the theme we first need to add support for menus. if (function_exists(‘add_theme_support’)) { add_theme_support(‘menus’); } The function_exists is only there for […]

HTML5 Video Observations (January 28th, 2011)

First off my goal is to run a bunch of 3-5 minute videos on any 1 single browser on a windows machine, It will run as a kiosk and will not have Internet access. So this finally gives me a good reason to play around with the <video> tag. The videos were provided in a […]

Open All External Links in New Tabs (August 4th, 2010)

Here is a quick bit of jQuery to make all external links have the target=_blank attribute. <script type=”text/javascript”> $(function(){ $(“a[href^=’http:’]”).not(“[href*’]”).attr({ target: “_blank” }); }); </script> You could also use this same technique to add a small friendly image next to these links  notifying the user they are about to leave the site. <script type=”text/javascript”> $(function(){ […]

301 Redirect using URLRewrite (May 11th, 2010)

Just in case.. A 301 redirect tells the browser/search engine that the page has permanently been moved to this new address. First install URLRewrite on a windows server with IIS7 from After its installed a new button titled URL Rewrite will be added. Select it. Under Actions click Add Rule(s)… Select Rule with URL […]

Select and Insert in 1 SQL Query (April 12th, 2010)

INSERT INTO Table2 (col1, col2) SELECT col3, col4 FROM Table1 How about a bit detailed example using the following sample database structure. Table1 =========== Tbl1_ID (going to assume an auto increment here) FK_Tbl2_ID Data_Copy Table2 =========== Tbl2_ID Data Query1: Select Tbl2_ID From Table2 Where Data = 1 For every returned record from query1 it should […]

Validation ($SCHEMA$): Element ‘html’ and ASP.NET 2010 (April 8th, 2010)

I finally got fed up with “Warning Validation ($SCHEMA$): Element ‘html’” enough today that I spent some time to figure out what was causing all the warnings on every html or even <asp> tag I had in my .aspx pages. Every time I would build my project I would get tons of warnings such as […]

jQuery Animation (March 29th, 2010)

I was recently working with the .animate() function and found there are some really cool effects you can create with it. However the more I used it the more problems I ran into. Basic usage of .animate() Just for good measure here is the basic usage of the .animate() function. I won’t go to far into […]

jquery to solve the 100% height problem (January 12th, 2010)

Real short post today just a quick snippet of jQuery that solves the 100% height problem. Yes there are complete CSS solutions to this but it seems that at times they can be problematic, and at other times laziness can kick in. $(document).ready(function () { $(“#divID”).height($(document).height()); }); //And the slightly more fancy way. With a […]

Letting Google Load jQuery… The Right Way (December 7th, 2009)

For some time now I have been letting google load the jQuery and jQuery UI libraries for me. There are many benefits to it which I will not get into, you can read more reasons to use it elsewhere. However I did notice something worth posting. You may be loading the jQuery library like so: […]

Bug Reporting (October 28th, 2009)

Well it took it long enough for someone to officially report‘s first bug. By officially I mean not calling/texting/emailing me directly to tell me there was a bug but finding some way within the site. After I realized what the bug was, I am sure that many users have come across it before, but […]

Importing a Blender Model into OpenGL (August 31st, 2009)

Recently I was looking for a simple way to export a basic model from blender to use in my opengl code written with c++. After a few searches I came up with nothing and decided to look at all the different ways I could export a blender file. The first that was easy enough to […]

12 Slick jQuery Plugins (August 17th, 2009)

As I have been updating the jQuery links on my @jQueryLinks twitter account there were a couple that really stood out as a way to make just about any site feel slick. So here they are. Enjoy. 1. Gritter – By:@jboesch Plugin Page Demo 2. jQuery Link Nudging – By: @davidwalshblog Plugin Page Demo 3. […]

ASP.NET/C# Prompt a Save Dialog Box to Download a File (May 15th, 2009)

To save you all (as well as my future self) the trouble of searching all over the place just to find terrible answers on almost every form post out there. Here is a small ASP.NET/C# code snippet that will prompt the user with the save/open dialog box to download a file. String FileName = “FileName.txt”; […]

Rounded Corners using jQuery (April 24th, 2009)

jQuery is slowly changing the way web designers and developers create web sites. Here is an extremely easy way to achieve rounded corners using jQuery. You can view live demos on the plug-in webpage. In order to create our rounded corners you will of course first need jQuery. If you do not already have jQuery hurry […]

Saving a PHP File as a Word Document (March 26th, 2009)

So you are looking for a way to save a PHP page as a word doc programatically? Then you have come to the right place. When I had to overcome this problem my main requirement was that I could not open word on the server. Searching around the net produced countless pages with the same […]

MSSQL Escape Character (February 25th, 2009)

Here is something that got me for a while today, escaping characters in MsSQL. I went through and tried the normal \ then thought I was losing it and tried the other slash /. However for some odd reason Microsoft went with the single tick ‘. So for example a mssql query using the escape […]

Using C to Append text to a File using the Linux Command Line (February 22nd, 2009)

Damn I think the title is almost as long as the entire post… Any way, here is a quick tip that will allow your c program to easily add text to the end of a file without ever having to deal with the file in your code. This is accomplished by a simple system call, […]

Input Data to Display Newlines in ASP.NET (February 14th, 2009)

In input taken from a plain text box will not display newline characters (Hitting the enter key) when outputting to the browser. So for example you have a text box that users can input text into, they put a couple paragraphs in it and submit that data to the database. If you just strait […]

List Images (January 31st, 2009)

In CSS List Images are such a simple topic that I have seen overlooked over and over. There is not much to it at all. Just one line of css. Example ul { list-style-image:url(picName.jpg); } Done in one short line. This will simply make every un-ordered list have an image in place of the dot. […]

Understanding URL Variables (September 20th, 2008)

Over the past couple weeks I realized there isn’t really much information about how dynamic web pages work. The lack of this information makes it harder for new developers to grasp these topics that are fairly simple, but may seem hard without a good example. So the next couple articles are going to cover some […]

Images Within Form Fields (May 3rd, 2008)

Adding Background images to your form fields can be easily accomplished with CSS and can add wonders to the look of your forms as well as improve the usability for the user. Here is what we want to end up accomplishing. Adding images to your form fields is actually very simple. It works just like […]

Linked Lists in Java Part 2 (April 26th, 2008)

In Part One we learned the basics of using the Linked list class in java. I showed how to create, add, edit, and remove items from the list. Now I am going to show you how to use the following functions: .toString(), .equals(), .hashCode(), .isEmpty(), .subList(), .contains(), For all my examples I am using the […]

Linked Lists in Java Part 1 (April 23rd, 2008)

Recently I have been playing around with Java’s LinkedList class. This is a very usefull class that is included in java.util.LinkedList. The LinkedList Class allows you to implement a linked list (what a surprise) with a simple class declaration. I am going to explain how to create and use the class, as well as a […]

WordPress Paging Style (April 16th, 2008)

Recently Jens Törnell over at wrote a plugin that “I made a paging navigation plugin for WordPress that will be an alternative to the “Next page” and “Previous page“. Instead it uses numbers which makes it easier for users to choose what page to go to. It also makes a tighter internal link structure […]

Using CSS to Format Print Pages (April 6th, 2008)

The main problem addressed here is dealing with cross browser issues when using css style sheets to print. Recently at work one of the sites that we inherited, and now maintain, asked for me to change the way their website looks when it is being printed out. The site itself was using very basic css, […]

15 Great WordPress Admin Themes (April 3rd, 2008)

Looking to spice up your wordpress’ admin section? Heres a great list to help you get started. Themes for the new wordpress 2.5 are listed first, followed by pre 2.5 themes.

Command Line Arguments (April 1st, 2008)

Recently in a couple class projects I have needed to use command line arguments, and the first time dealing with these can be a little confusing. So here is four short programs that simply output these arguments.