Development

Currently browsing filtered blog category.

Promtr the Best Teleprompter for the iPad

Feb 29 2012

Article written by Nick

We are on the cusp of launching the first of many practical utility apps that will aim to increase productivity by streamlining efficiencies.  Promtr is currently submitted to Apple for review and anticipation is building for its release.

Read More…

Pagination with Custom Post Types in WordPress

Dec 18 2011

Article written by The Pixil Staff

In this article, we’re going to discuss how you can effectively use permalinks & pagination with Custom Post Types in WordPress 3

Using Custom Post Types are a great way to segment different types of content for building large sites. Basically, a CTP is like a “blog post” with its own set of “posts” and “categories”. Have you ever wanted to just duplicate the blog “posts” and call it something like “portfolio” or “library”? Custom Post Types to the rescue!

We’ve been using CTP’s in almost every WordPress site we develop. I’ve ran across one issue that I haven’t been able to resolve until recently. If you have your permalink settings set to /%postname%/, you might have an idea as to what might be going wrong.

Heres the issue: Using pagination with CTP’s while permalinks are set to “postname” will render out 404 error once you goto the next page of the CTP. Until recently, my “fix” was to simply turn off “pretty urls” for all custom post types, rendering your URLs something like this (post_type=portfolio&page_id=886) Which is not very NOT pretty at all.

So what is WordPress doing here?

Read More…

Installing ZendDebugger on MAMP Pro for PHP 5.3

May 05 2011

Article written by Jeremy Simkins

This tutorial assumes that MAMP is already installed and running.

  1. Download the latest debugger (Studio Web Debugger) from zend.com
    1. http://www.zend.com/en/products/studio/downloads
    2. The latest version available at the time of this tutorial is: 20100729 (I used the 64-bit version, the install process is the same as the 32-bit version)
  2. First take a look at the phpinfo screen and notice the powered by zend logo
    phpinfo powered by logo before debugger is installed
  3. Let’s start by putting the zendDebugger.so in the proper directory
    1. Step into: /Applications/MAMP/bin/php5.3
    2. Create a zend folder in the php5.3 directory
      1. /Applications/MAMP/bin/php5.3/zend
    3. Step into the newly created zend directory and create a debugger folder
      1. I named my folder using: zendDebugger-{versionNumber} as the name structure
      2. I named the folder accordingly: ZendDebugger-20100729
    4. Open and extract the compressed file downloaded from zend.com
      1. Locate the 5_3_x_comp folder and copy or move the ZendDebugger.so to the new folder we just created
        1. /Applications/MAMP/bin/php5.3/zend/ZendDebugger-20100729

      My File Structure

  4. The next step is to update the php.ini file
    1. While in MAMP Pro
      1. In the upper menu navigate to File->Edit Template->PHP 5.3.2 php.ini (or use cmd 4 to open the 5.3 php.ini )
        phpini before edits
      2. Add these lines under MAMP_zend_optimizer_MAMP
        [ZendDebugger]
        zend_extension=/Applications/MAMP/bin/php5.3/zend/ZendDebugger-20100729/ZendDebugger.so
        zend_debugger.allow_hosts=127.0.0.1
        zend_debugger.expose_remotely=always
        						
      3. If xdebug is enabled (no semicolon in front of it), put a semicolon in front of it to disable it
        phpini after edits
      4. Save the file and restart the services in MAMP
  5. Check phpinfo and you should now see the debugger in the powered by logo
    phpinfo powered by logo after debugger is installed

Redirects using htaccess

Feb 16 2010

Article written by Jeremy Simkins

A quick look at redirects using htaccess.

Today I’m going to show you how to force a www and a non www domain using htaccess.

It’s common knowledge that you can access your site with or without the www. By not forcing one or the other this will penalize your SEO, due to duplicate content. The most common method of doing this is via .htaccess using mod_rewrite.

When I was first learning how to use .htaccess this was one of the simpler methods to find examples of with any search engine. Now, if you are only needing to edit your. htaccess for one domain, the majority of these found examples will suffice; If you have multiple domains that tend to go to one directory this example will be much more beneficial. Also, if you put this example into your httpd.conf file, this can take effect on all domains on the server; so you won’t need to worry about adding each domains redirect.

I have provided the below examples as a method I use to manage redirects. I have provided an example for each method, www and non-www.

In order for mod_rewrite to work you must first enable it. This is easily done by adding this to the .htaccess.

RewriteEngine On
Force www:
# Do a www redirect on the domain
RewriteCond %{HTTP_HOST} !^www\.[a-z-]+\.[a-z]{2,6} [NC]
RewriteCond %{HTTP_HOST} ([a-z-]+\.[a-z]{2,6})$ [NC]
RewriteRule ^(.*)$ http://www.%1/$1 [R=301,L]

Force non-www
# Do a non-www redirect on the domain
RewriteCond %{HTTP_HOST} ^www\.[a-z-]+\.[a-z]{2,6} [NC]
RewriteCond %{HTTP_HOST} ([a-z-]+\.[a-z]{2,6})$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

How this works:

When the URL is being received we check it to ensure it is valid to our method of choice. Regardless of our method, it checks the URL to see if it matches, checks if the URL contains the www or not. Next it will set the conditional variable to be used in the actual redirect.

The Sidebar