Learning as I go, my first php/mysql custom cms project
05 Jan
Posted by Jake Rutter as PHP | No Comments
Over the past two months, I have been working pretty hard on a freelance project for a package design agency hmsdesign.com. I have just finished up, but the site is not yet live. The client came to me looking for an easier way to update their website, being that the old site was all in flash. Initially I thought to myself that I would approach this with WordPress, being that Im not a strong php/mysql developer and WordPress would give me a lot out of the box. The trick would be customizing it while still keeping it fairly simple and friendly for the client.
Continue Reading
iPhone .htaccess detection script and other .htaccess tools
31 Dec
Posted by Jake Rutter as Web | No Comments
For anyone looking for a nice and easy way to create an iPhone redirection script, check out this tutorial. I found this site because I was looking for a nice .htpasswd generator to setup a username/password list for a site directory that I setup. This site has a lot of nice tools and is definitely a bookmark of mine now.
jQuery Tips: How to get value of selected option in Select Box
17 Dec
Posted by Jake Rutter as jQuery | No Comments
I recently had to pull together some jQuery to get the value of what was selected in a select box. Its pretty easy to do with jQuery. There are probably a few ways to accomplish this, I chose to use the change event which detects when something is changed.
Continue Reading
6 Steps to creating a featured products jQuery slider for Magento
01 Nov
Posted by Jake Rutter as Magento Tutorials, Open Source, Web | 6 Comments
This tutorial has come out of necessity for a homepage featured product slider, I had tried quite a few different tutorials but never achieved what I was looking for. Magento is a great open-source ecommerce package, but Im a little surprised that featured products isn’t a feature built-in. Hopefully this tutorial will help. Help support open source!
Continue Reading
@font-face and CSS3 Solution
20 Oct
Posted by Jake Rutter as CSS/Web Standards, Web, jQuery | No Comments
I feel like I have been waiting for support for @font-face for years now. How many times have you had to make an image because a client wanted a specific type-face or have you had to limit your sites to Arial, Georgia, Verdana, and Times New Roman. Suffer no longer!
How to setup Bronto Tracking Pixels with JavaScript
19 Aug
Posted by Jake Rutter as JavaScript/Ajax | 1 Comment
Recently at my job, I had to setup Bronto email tracking pixels on our order confirmation page. The tracking pixels came in the form of an image tag and had to be populated with some values from our shopping cart. The values (invoice number and order amount) are passed from the order confirmation page using hidden fields.
<input name="InvID" type="hidden" id="InvID" value="12345" /> <input name="Tot" type="hidden" id="Tot" value="69.9900" />
I then used JavaScript to extract the values in the hidden inputs and assigned them variables.
var InvoID = document.getElementById("InvID").value; var SubTotal = document.getElementById("Tot").value;
Then, I used document.write to create an image tag on the fly with the correct values filled out using JavaScript concatenation.
document.write("<img src='http://bronto.com?type=$&description="+InvItemName+"&money="+ItemPrice+">'");
I have recently found that if you have apostrophes in your code, it will break the above tracking script. A way around this would be to use a string replace function like this:
InvItemName.replace(/'/i,"")
*NOTICE: The values in the scripts are dummy values, as I had to hide some confidential account data. The code is just to show as an example, but its pretty easy to setup. You can use similar techniques to setup Google, MSN, Yahoo, and other types of tracking pixels.
PHP to Ruby on Rails and back again…
27 Jul
Posted by Jake Rutter as PHP, Ruby on Rails | 6 Comments
After about 2 years of working with Rails on a few side projects, I have decided to drop any further development in Rails. I will be going back to PHP full force, not that I ever ditched PHP, as Rails was always an exploration for me. It served well on a few large projects mydiabeteseducator.org and fanboom.com, but I have found although its super fast to get up and running. I will usually run into massive issues with hosting and getting past the scaffolding phase. I really do enjoy the migrations, the database object model, MVC, and scaffolding was pretty slick. If you havent checked out Rails, I would give it a try – but most of my developer friends who have given it a try, end up going back to php.
If there is something Im missing or a reason why Rails is better than php, Im open to discussion.
I have found a simpler way to add class=”selected” to any navigation menu by checking your URL path against links on the page. I’ve only tested this with page slugs in wordpress. But it works very nicely.
// Highlight Tab v.02 by Jake Rutter // Website: http://www.onerutter.com // Feel free to use and adapt, please just give credit where credit is due. jQuery(document).ready(function(){ var path = location.pathname; jQuery("a[href$='" + path + "']").addClass("selected"); });





