So you’ve got lots of traffic and your blog/site is becoming more and more popular. If you’ve done any kind of update, rearrangement of the site you may have loose ends that just lead nowhere resulting in those pesky 404 pages. It’s often difficult to track these down unless you dive into your traffic reporting Cpanel software but that’s sometimes a daunting task and often yields mixed results.
One solution would be to simply make a more intelligent 404 page and adjust and fix the site accordingly as you collect the necessary information. This nifty little PHP script both notifies the user at to what may have gone wrong, as well as send out a detailed report to you with the users IP address, what they were looking for and when they were looking for it. It’ll even tell you what platform/browser they were using at the time.

Another benefit of using a script like this is that you can track when someone is trying to hack through your directories looking for something they shouldn’t be. From there you can just block their IP and be on your way.
Click here to download the raw text version
The great thing about this is all you have to do is drop this in your 404 page, adjust the email addresses at the bottom to match your own and you’re almost done. Once you’ve got the script in your 404 page you’ll need to make sure all errors redirect to this page. Add this to your .htaccess file
ErrorDocument 404 /404.html
or
ErrorDocument 404 /404.php
depending on what your 404 page is and give it a try.
Tags: 404 errors
As developers we always keep our little things that we always use or start a project in the same mannerisms. Coming up later, I will write about how we lay the foundation for a project with our project template. But for now, I would like to show you how we have our jQuery foundation file layed out. Above and beyond the scope of this base file, everything past this point is decided by the individual project.
We have done many websites and somethings always seem to arise. So I decided “Why not just have them in the base file from the beginning.” Right? of course.
So here is the file that we use for just such a thing.
So here is “jQuery Foundation .js”
JQuery:
This has quickly become my norm when dealing with a javascript framework. It is light, flexible and above anything else, easy to learn and implement.
When I use this, I have a set of things I always place inside the code that executes on the DOM.
1. External Links
Now many people do not like to use the target=”_blank” anymore, since it’s not standard anymore. Well why not use jQuery to make it happen.
1 2 3 4 5 6 7 8 9 | $('a[rel="external"]').click( function() { window.open( $(this).attr('href') ); return false; }); // or $('a[id="externalLink"]').click( function() { window.open( $(this).attr('href') ); return false; }); |
2. PDF’s
PDFs should open up without sending the visitor flying to a new window and all sorts of shenanigans like that.
1 2 3 4 | $("a[href*=.pdf]").click(function() { $(this).attr({"target":"_self"}); return false; }); |
3. Confirm a Click event
This was just something that I add because well, sometimes you hit a link or a button or submit something by accident right? of course! we all do. Adding this little bit of code will help you try to avoid that, or at least deal with it a little better.
1 2 3 4 5 6 7 8 9 10 11 | // IN DOM $('a[rel="confirmDelete"]').click(confirmTheClick); // OUTSIDE DOM function confirmTheClick() { var agree="Are you sure you wish to perform this action?\nCheck your work!"; if ( confirm( agree ) ) return true; else return false; } |
You can also download the quick and easy jQuery Foundation javascript file right here, so you can see it.
Do you have anything that you use? Drop us a comment we would love to see what ideas you have!
Tags: DOM, Javascript, jQuery, jQuery examples, jQuery tutorial
Once again another successful Sol Melia hotel website launch by That Agency. Located in Rio Grande, Puerto Rico, Gran Melia Puerto Rico is a stunning luxury hotel embodying the style and flair of Gran Melia.
That Agency’s creative and development team successfully deployed another home run for Gran Melia, a Sol Melia Brand site.
As with all Sol Melia sites, THAT Agency has design and developed it follows the path of clean elegance and aesthetic. Gorgeous photography, open white space, clean lines and an organized user interface make this site a visual pleaser to visit.
The site itself was built on a PHP base framework utilizing Prototype for a user-centric and dynamic approach to web design. Keeping the layout clean and organized is a well written Cascading Style Sheet (CSS) eliminating cumbersome and non-seo friendly tabled layouts of the past.
Upon visiting Gran-Melia-Puerto-Rico.com you’ll be greeted by a smooth flash animation of hotel imagery conveying the sophistication of the hotel itself.
In addition, the site easily spans the language barrier by incorporating an entire site that caters to the Spanish speaking visitors of the site. This, in-turn expands the worldwide searchability, overall site ranking and audience reach of Gran-Melia-Puerto-Rico.com by THAT Agency, a Google Adwords Qualified Company.
Tags: Gran Melia, Hotel website, Puerto Rico Hotel, user interface design
Social networks and social media have been around for quite some time. Most computer people have dabbled with platforms like myspace or linkedin. But recently, there has been a huge wave of non computer types drawn towards social media by what’s been called the other internet. Thats right folks were talking about facebook.
Although I do consider myself a computer person, Im not not a fan of excessive internet use – its boring and personally I’d rather go outside or watch TV. But logging in to facebook can be pretty entertaining – even rewarding sometimes. It allows people to connect and its ability to toss out recent posts by people within your circle is very cool. Its like, hey “so and so did this yesterday” wanna see more? Its up to you to explore, but usually its enough to know your friends are out there. You can get the scoop without staying in touch because facebook does it for you. Since joining about 6 months ago I’ve reconnected with literally all my high school friends, some grade school friends and countless other “acquaintances”. Because of this I consider facebook to be one of the few internet sites thats made an impact.
In recent months facebook has seen explosive growth in its user base which has been estimated at somewhere around 140 million people. Additionally this growth is fueled by their network growing by upwards of 250,000 people per day – and that number is accelerating. According to facebook, that number will be over 500,000 per day in the near future and they are on target to double the user base this year. With growth like that facebook has clearly raised the bar with social media.
So what made facebook grow at such a fast pace? was it advertising?
Not really. Their advertising budget is large, but its not how I found out. I heard of it from a friend. Who probably heard of it from a friend. Facebook is so viral its almost epidemic. Anytime a product or service fuels its own growth things get interesting as we’ve seen with facebook. If you havent already, try it out! FACEBOOK
Now lets say that you a web page that has a big Block of “something” and inside this “something” you would like to have some information change at a set time interval. Well with Jquery, some PHP and a sprinkle of Ajax, you can get this done quick fast and in a hurry.
The first thing you will need, is obviously the latest jQuery Javascript library file. and you will also need this light JQuery Timers Plugin. Now lets set up:
I am going to assume that you know a little about JQuery and say that you already know how to call from inside the “Head” tag. The following is basically the “meat and potatoes” if you will of what is going on.
Let’s Break it down.
1. First we say “Hey you with the class name of refreshMe, I am going to do something to you every 10 seconds. (SideNote * 1000 = 1 second; So 5,000 = 5 seconds).
2. Now we use JQuery’s built in Ajax functions to call the URL of the page we want to bring in and have it refresh the element with the class name of refreshMe with the information from this page that called. Follow? Good.
Now since for some deranged reason, I can’t get the code highlighter to work correctly Click here to see the page in action. You will be able to view source from there.
Or download it now.
Tags: AJAX, jQuery, jQuery autocomplete, jQuery examples, jQuery PHP, jQuery tutorial
In a good move recently, Google has quietly set the stage for an Internet Explorer 6 killer. Finally! By offering faster Gmail to users that don’t use IE6 it is in fact helping the browser cause.
Of course they’re promoting their own browser, Chrome, but that’s not the only option. When users of IE6 reach Gmail.com, a “Get faster Gmail” message appears in the Web-based service’s menu bar. The message, in turn, links to a page on Google’s Web site that describes Chrome and Firefox 3 as being “twice as fast” at running Gmail. Hopefully this will sway any users still stuck on the 8 year old browser (IE6) to move onward and upward to a safer, faster browser and ultimately put the browsing dinosaur to rest.
This is just one of many steps many companies have taken over the years to rid the world of IE6 and the fact that Google has made the effort makes me think that maybe, just maybe it’s finally on it’s way out. Let’s hope.
As developers IE6 has posed problem after problem from running JS properly to properly supporting CSS standards, not to mention the obvious security flaws inherent in outdated technology. With this subtle move Google has set the tone to make browsing a happier place for all.