Archive for the ‘PHP’ 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 »

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 »

Setup Subversion with cPanel and Apache

Posted on January 21st, 2010 in Everyday Tips, PHP, Sys Admin | 1 Comment »

This is a  summary of how to set up a new svn repository that you can access through apache when your server is configured with cPanel. This is not a tutorial on installing cPanel and Subversion.  The assumption is that you already have subversion installed on your cPanel managed server.

Read the rest of this entry »

Stay Away From Rackspace Cloudsites

Posted on December 31st, 2009 in Everyday Tips, PHP | 15 Comments »

I have worked with several dedicated servers at Rackspace and the experience was a joy. The servers perform very well and the Rackspace managed support was great. So when I learned of Cloudsites which appeared to bundle the great support I had grown to love with a package that seemed great for hosting our sites that didn’t require their own dedicated server I was very excited. Unfortunately, it turns out the Rackspace Cloudsites is unstable, unreliable, and slow. The support is still good, at least in terms of being available, but all they can say is “I’m sorry all your sites are down.”

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!

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