-
Tags
adsense animation apache apple blog coding compsci css diy facebook flash forum game google hard drive humor internet explorer iphone itunes java javascript link linux mac mysql Photography photoshop php Programming prototype python robot robotics school scratch search engine teaching theme tips twitter usb video web design wordpress youtubeMy Other Sites
Category Archives: Programming
Just finished up a couple of WordPress plugins
Needed a break from a larger web app I’m working on and this weekend kicked out a couple of WordPress plugins that I’ve had on my idea file for a while now. The first is called rTwit and lets you … Continue reading
Posted in Programming
Tagged ajax, blog, coding, javascript, link, php, plugin, Programming, twitter, wordpress
Leave a comment
JavaScript version of PHP __FILE__ or __DIR__
This is one of those issues I keep coming back to. I need a way to get the path of the current JavaScript file. Something analogous to the PHP __DIR__ constant or dirname(__FILE__). Found something close on Stack Overflow. The … Continue reading
Trimming all members of an array in PHP
Needed a quick way to go through and trim leading and trailing spaces off of a string array in PHP. I’ve used array_walk to do it before, but with the addition of anonymous functions it makes it a little quicker … Continue reading
htaccess to deny access, except for includes
It’s usually a bad idea to allow php include files to be directly accessed. My general method is to either declare a constant in the index.php and check for that constant in the included file or make sure that the … Continue reading
Dynamically link to CSS with JavaScript
Needed a way to add a CSS file with JavaScript, so I went out a-Googling like I normally do. Problem is everything I found either worked in Internet Explorer and not in FireFox or the other way around. Nothing I … Continue reading
phpMailer – Could not instantiate mail function
Had a client getting this error when trying to send emails last week and have now spent several hours on Google trying to find a solution. Biggest catch is that other scripts were able to send mail, so it seemed … Continue reading
bit.ly and PHP
Needed a quick and easy way to create a bit.ly URL for another site of mine. Google came through for me. David Walsh posted a short PHP function on his site that takes your bit.ly login, API key, and the … Continue reading
Quick PHP wrapper for print_r
Working on web apps I find myself using the print_r command a lot, and I mean a lot. It helps trace out what data is going where, and more often what’s not going where it’s supposed to. A few months … Continue reading
Safari, scriptaculous, and non-clickable links
For the better part of the last couple of days I’ve been trying to figure out why Safari was not allowing me to click on links. Aside from an annoyance, it’s not good to have clients complaining…
Posted in Programming
Tagged coding, javascript, js, mac, prototype, safari, scriptaculous, web design
Leave a comment
Prototype.js, setStyle, and IE not working together
Sometimes IE just irritates me. Ok, pretty much anytime I’m working on a web site. Especially when it involves Javascript or DOM. For the past couple of hours I’ve been scouring the internet looking for a solution to the prototype … Continue reading