Archive for the ‘Web Development’ Category

Sending Email With Postfix And MAMP Pro

Posted on August 28th, 2010 in Mac OSX, PHP, Web Development | No Comments »

MAMP Pro makes it very easy to set up a PHP development environment. It even makes configuring your Postfix mail server configured most of the way. If you are using Postfix as a smart host to send mail through your ISP or your business mail server and your mac username (shortname) is not the same as the username part of your email address then you have to set up the correct sender address in your Postfix configuration. Here is how you do it.

Read the rest of this entry »

How To Fix The Warning: This Page Contains Both Secure and Non-Secure Items

Posted on May 6th, 2010 in Everyday Tips, Web Development | Comments Off

You installed an SSL certificate and you keep getting that pesky warning about how some of the content on the page is not secure or unauthenticated.  Here’s what you do to find the offending content.

  1. Visit the page in your web browser
  2. View the source code for the page
  3. Search the source code for src

Click through all the instances of src and look for items that are sourced through http:// rather than https://. Look at all your images, javascripts, stylesheets, etc. They all need to be pulled through https:// in order for your page to be totally secure and for that warning to go away. Internet Explorer is particularly finicky about this message so be sure to check your site in IE to make sure you don’t get this message: ‘This Page Contains Both Secure and Non-Secure Items‘ The FireFox message that means the same thing is ‘Warning: Contains Unauthenticated Content‘ this is the same problem. Just make sure your page is pulling all it’s resources through https:// and that is how you fix the error about ’secure and non-secure’ items on your SSL pages.

Git Archive Like SVN Export But Better

Posted on March 5th, 2010 in Mac OSX, PHP, Sys Admin, Web Development | No Comments »

If you are switching from Subversion to Git and want to know the best way to export your code similar to svn export then here is a great command to know about.

git archive -o ~/Desktop/project.zip HEAD

That will extract your most recent stuff in your current branch, zip it up, and drop it on your desktop. We do a lot of WordPress plugin development and with this single command we can get our plugin code ready for installation extremely quickly. Here is more information about git archive.

WordPress Custom Query To Select Posts From A Category

Posted on February 26th, 2010 in PHP, Web Development | No Comments »

A friend asked how he could pull the three most recent WordPress posts from a particular category on a non-WordPress site. He has the ability to connect to the WordPress database. So here is the code you need to pull this off.

Read the rest of this entry »

Top Ten WordPress Plugins

Posted on December 5th, 2009 in Everyday Tips, PHP, Web Development | 1 Comment »

We’ve been asked what WordPress plugins we use most often and what we recommend that other people use on their sites. There are quite a few great plugins out there, but here is our top 10 list of WordPress plugins that we have found the most useful and that we use the most often.

Read the rest of this entry »

PHPurchase Affiliate Program

Posted on November 28th, 2009 in PHP, Web Development | No Comments »


The PHPurchase affiliate program is now live. You earn 25% of every sale you send our way. PHPurchase is a WordPress e-commerce plugin that we developed at PHPoet. We’ve been using it on several of our own clients sites and have now decided to offer the plugin publicly.

PHPurchase stands out for several reasons. First, the approach we took to implementing the plugin was to let WordPress manage all aspects of the page layout. There are plenty of ways to implement photo galleries, embed videos, etc. already available for WordPress. PHPurchase simply adds e-commerce functionality. Second, we have placed a strong emphasis on documentation and support by providing screencast tutorials, help articles, and even live chat support embedded in the the “Help” page of the PHPurchase admin panel as well as on the PHPurchase website. Our developers, of which I am one, are also available to help troubleshoot problems, build out an entire WordPress store, or anything in between. Lastly, PHPurchase is fully compatible with the WordPress Affiliate Platform plugin if you wanted to run an affiliate program for your WordPress store. No additional configuration is needed to start running your own affiliate program.

We look forward to seeing how you use PHPurchase. Please send us links to your PHPurchase stores and we’ll tweet them and/or link to them from our website. Thanks!

How To Count Rows With Zend_Db_Table

Posted on November 18th, 2009 in Web Development, Zend Framework | No Comments »

This is just a quick tip but seems to stump a lot of people, probably because it is not at all clear in the Zend Reference how to do this. So if you want to count the number of rows in a table using SQL you would write something like:

SELECT count(*) FROM myTableName WHERE someColumn='someValue';

But when you are using a Zend_Db_Table it’s a little confusing how to get the “count(*)” part to work because Zend_Db_Table likes to throw errors saying that it can’t be joined with other tables. So, in your Zend_Db_Table class, here is the syntax you can use:

$sql = $this->select()
       ->from($this, 'COUNT(*)')
       ->where('parent_id=?', $this->id);
echo $this->fetchRow($sql)->num;

PHPurchase, Ecommerce For WordPress

Posted on November 13th, 2009 in PHP, Web Development | No Comments »

Your Own Online Store Using WordPress and PHPurchase

At PHPoet, we have developed an e-commerce plugin for WordPress called PHPurchase. PHPurchase adds e-commerce functionality to the popular WordPress platform. So now you can sell products from your blog or you can run your entire website on WordPress and create your own online store. To see PHPurchase in action, take a look at QuietHeadphones.com, an online store selling headphones.

You can use WordPress and PHPurchase to easily set up your own online store. By now, most people have heard about WordPress. If not, WordPress is free web software that you install on a web server and it lets non-programmers manage their own website. You can run your own blog, add/edit pages of your own website, and now you can even run your own e-commerce store.

There are many web hosting companies out there where you can install WordPress with just a couple clicks from the control panel of your hosting account. If you happen to have a web hosting account that does not offer WordPress, you can very easily download WordPress for free and install it on your own. You basically just upload the WordPress folder that you can download from WordPress.org, enter in a couple configuration settings and you can be up and running in about 5 minutes. Once you have the initial installation of WordPress running you may want to customize the look of your website by downloading a theme. WordPress themes let you change the entire look of your website very easily. There are tons of free themes available. There are also “premium” themes that generally cost around $50 – $100. Or you could hire my company WordPress development company to develop the site for you. Then, once the site is developed, we will train you how to manage the entire site on your own.

By default, WordPress does not have any functionality for e-commerce so you will want to get the WordPress e-commerce plugin. PHPurchase let’s you sell digital products like music files, or other types of digital documents as well as physical products that you would ship to your customers. You can also sell services. For example, if you wanted to offer freelance writing services, logo design, or basically anything, you can easily set that up with PHPurchase. PHPurchase will work with PayPal or you can set it up to take credit cards directly on your own website. PHPurchase is very secure and doesn’t store credit card information so you don’t need to worry about hackers or anything.

There are several other e-commerce plugins out there for WordPress, but we were never able to find one that satisfied our needs. They either force you to use fancy grid layouts or organize your products by brand or category. If you are only selling a small number of products then you don’t want to be forced into a layout designed for large stores with lots of products. We designed PHPurchase to let you use WordPress to configure your entire store and use PHPurchase to handle the e-commerce. PHPurchase may be the only WordPress e-commerce plugin with professional level support. It is easy to set up and even comes with some videos showing you how to configure all the aspects of your online store like shipping prices, promotions, etc. If you run into any trouble. PHPurchase is supported by PHPoet a web development company specializing in WordPress. So you can quickly get answers to your questions. We are also available to build your site for you and train you how to manage it once it’s online. So if you are looking for a way to make some extra income or if you want to start your own home based business, WordPress and PHPurchase are certainly worth looking at.

Great Use For Javascript Closures

Posted on June 24th, 2009 in Everyday Tips, PHP, Web Development | No Comments »

setTimeout() with a paramter

If you need to use the setTimeout() function to call a javascript function that accepts a parameter you might be tempted to use syntax like

setTimeout('functionName()', 1500, param1, param2, etc); 

And you would probably have success until you went to test your site in Internet Explorer. Firefox seems to be able to handle the extra parameters on the end of the setTimeout() call but IE simply sends undefined variables to the function you are calling and your script dies.

Here is the solution – use closures! They are a little tricky to understand if you are new to the idea but, in a nutshell, you are assign a function to a variable. Normally you assign numbers, or strings to variables – well you can assign functions to variables too. Here’s how:

setTimeout(function() { delayedFunctionName(param1); }, 1500); 

This causes the function delayedFunctionName(p1) to be called with a 1.5 second delay AND the p1 parameter actually gets a value!

WordPress Uploaded Images – How To Change Absolute URL

Posted on March 29th, 2009 in PHP, Web Development | 3 Comments »

When working with WordPress, you may develop a site on a development server with a different domain than the live server where you intend to deploy the site. When you upload images in a post or a page, WordPress assigns an absolute link as the source of the image. Here is a quick SQL query to run after you migrate your site to the live server so that the absolute URL is updated to reflect the changed domain name.

UPDATE wp_posts set post_content=REPLACE(post_content, 'www.devServer.com/', 'www.liveServer.com/');
Get Adobe Flash playerPlugin by wpburn.com wordpress themes