Published: Sunday, June 24th, 2007
MightyAdsense - Automatically Inject Ads
The MightyAdsense Plugin has many useful options. You can store up to 10 different sets of ads for various locations on your blog. You can insert them into your template by calling one simple function instead of having to paste entire code snippets for the ads. Since all your code for the ads are stored in Wordpress, it makes changing the format of an ad a breeze.
But here's where the magic comes in. You can chose certain ads to be automatically inserted into posts and pages. One your homepage, category list, etc; where you list many different posts on one page, you can chose to insert specific ads into certain ads on the page. Namely the first, second, and third posts. This is the set up I have for my first post:

The second post I leave blank, but have the following on the third:

Now this is what I have on every page/post:
PayPerPost Says No Ads
PayPerPost has recently modified their Terms of Service:
Inline Ads and Links. There are to be no third party links, ads or other detractors located within the sponsored post.
Share This
Published: Monday, June 4th, 2007
Now I've never really been a Photoshop guy. I just don't have an eye for that stuff, even if it may be very basic. What's my solution? My Cool Button. This service allows you to created, not to bad if I do say so myself, Web 2.0 buttons on the fly.
A lil' PHP and GD2 sure does go a long way these days.
Popularity: 6%
Share This
Published: Monday, April 9th, 2007
There are a bunch of PHP frameworks, too many if you ask me. I've tinkered around with CakePHP, Zend Framework, and Code Igniter. I'm curious to know what you guys have been using and what you find quick and easy.
What do you look for in a PHP Framework?
What Do You Look for in a PHP Framework?
- Quick and Easy (56%, 14 Votes)
- Less Code Needed (16%, 4 Votes)
- Small Learning Curve (16%, 4 Votes)
- Small Footprint (12%, 3 Votes)
Total Voters: 25

Loading ...
Popularity: 4%
Share This
Published: Monday, April 2nd, 2007
No, I'm not moving, not yet anyway. But Lava is. She scored a domain name which describes her blog so perfectly, that she couldn't help but nab it up: HowISaveMoney.net. Now what are the odds that this domain would still be lying around?
Lava finally made the big step and "moved into her own place". Moving domains is always such a hassle, but there are a few things that make the process a little bit easier. I was the Administrator during this move and I must say it was a little bit involved, but I think I got it done.
The Domain
The domain was purchase at 1and1.com. Why not NetSolutions, Yahoo, GoDaddy? Because they all have great promotional deals but then it's upward of $8 to renew every year. 1and1 has a nice flat rate of $5.99 every year.
The host remained the same, since this particular hosts allows up to 10 domains pointing to it. All the files are simply dumped in a different sub folder. I both love and hate the idea of one consolidated host. It's easier to manage: one login one set of administration and maintenance, cheaper than several different hosts. But if one sight goes down, they all go down. If a hacker gets into one, he damn well gets into all of them. The load on all of the sites is still very small and way under the allotted bandwidth limit. Most of them are blogs using Wordpress and we all know what a small physical footprint Wordpress leaves behind. If any one site seems to out grow things little family what it turns 18 or something, it will definitely be kicked out of the nest onto it's on hosting package.
Copy Files
Now this should be the simple part. You copy everything into the folder that is going to house your new blog. There are a few minor changes that you might need to make. Depending on your previous setup you may need to edit the .htaccess file and change the RewriteBase option. But I do think that Wordpress will configure it for you when you set up your permalink stuff.
One change that is necessary is editing your wp_config.php file. If you're changing databases, you need to make the changes here. If you're not changing databases you still need to make the changes to the table prefix. I forgot to mention that we still need to keep the old database active (details to come later).
Popularity: 19%
Share This
Published: Sunday, April 1st, 2007
phpMyAdmin
phpMyAdmin is a beautiful tool. It let's you administer a MySQL Database without all the messy commands. Also, some host don't even allow you access to those messy commands. So, once again, it's a beautiful tool. You can pull up a window and run individual SQL commands on the database or you can run an entire SQL script. It's really great. There is a wonderful export tool that allows you to back up your Database as plain text SQL file or a file in GZip format. I have seen exported files get up to 10 MB compressed, which is over 100 MB decompressed, given that it's just a plain text file.
Importing MySQL Database
But one thing that is lacking is a proper import procedure. Currently, you can import a database by pasting the SQL statements in a form and clicking submit, or by uploading an SQL file through your browser. Now that's all well and good, but there are some problems with this method. The main problem is with timeouts. Of these there are two kinds, there are browser timeouts and server timeouts. The second problem is file size. Another limit, which you don't often read about, is the phpMyAdmin configuration limit.
Browser TimeOuts
Browsers have a limited time that they can be busy waiting for response from the server and when doing a database import this is exactly what is happening. Your browser does a little work of uploading the file. After that it's up to the server. So while your browser says it's busy it really isn't. It's just waiting for the PHP script (phpMyAdmin) to get back to it and say it's done. With large databases, this can take a time.
There are a couple ways to get around this. In Firefox you can go to about:config and look for the setting that deals with the browser timeouts. Honestly, I even forget what the exact property is. If you use Internet Explorer (well maybe you need to be punished) you're out of luck, because as far as I know (which is not much about IE) I think you need to go into registry to do this. If you're browser times out, it simply stops and kills the connection. With no active connection there script on the server comes to a halt.
Server PHP Script TimeOuts
Now let's say you've gotten over the problem of the browser timeout. Good for you. Now you're hit with something you may not have control over. A lot of shared hosts don't allow you to modify their PHP configuration settings, for good reason. And a lot of servers have very fixed limits on the length of time that a script can run for. If this is less than what you're file needs to run, then you're once again out of luck. There is no work around for this though, sorry.
File Size Limit
Servers have a fixed limit with respect of the size of file that can be uploaded through the browser. Back in the day, it was stuck at 2 MB. Right now, I've seen them maxing out at about 8 MB on average. So what do you do if your export file is 10.5 MB? You're out of luck, that's what. Now why don't they modify their export utility to break files up into multiple sizes that can be handled through import? well, it's too much work. It's not their problem, get a better server I guess. Once again, you're out of luck.
phpMyAdmin Limit
phpMyAdmin has a limit in their configuration file that limits the actual number of SQL commands that can be executed. It's that simply. If your database goes beyond this, then once again, you're out of luck.
Well not really. You could install your own version of phpMyAdmin on the server and configure it as you like. If this works for you, great. But if your problem is also one of those mentioned above, then again, you're out of luck.
What Are Your Options?
Popularity: 16%
Share This
Published: Tuesday, March 20th, 2007
This may be one of the most difficult things to consider when starting up with AJAX. There are a lot of AJAX Tutorials out there that give you good background information. And it's good to know what's going on behind the scenes, it really is, but let's face it if you're going create anything worthwhile with AJAX, it makes no scene to do it from scratch. As a developer, I'm a big fan of frameworks. If you think it about it enough, everything is a framework for something. I suppose that if you have a couple hours (days depending on your skill level) you could write a very functional console application that emulates a basic calculator in sssembly code. Or, you could fire notepad, write a quick C++ application in about 5 minutes and compile and you're fine.
In the same respect, you could use C++ and create a very graphical Windows application or you could use C# and the .NET Framework and fire one out in minutes. Why should web development be any different? Frameworks are there for a reason. A team usually develops a Framework over a long period. They get all the kinks out and they make it available for you guys to use. If a bug is found, they do a fix and put out a new version. You simply replace the files that you use.
Share This
Published: Monday, November 27th, 2006
This is funny. I can't tell you how funny this is. They're actually comparing PHP to VB6. Basically, VB6 sucks as a language and for that reason should be reduced to scripting where as PHP is somewhat similar because it makes an excellent scripting language.
Karl over at CodeBetter.com writes:
PHP is NOT Object Oriented
As a language, PHP's object-support is quite rich. Since the introduction of PHP5, developers have had the same level of OO support as most other languages. Of course, there's nothing forcing developers to use OO principals.
Layering
The only support for layering offered by PHP is the include/require functions. Like OO, proper layering can greatly increase code readability and maintainability. Much like in classic ASP, most developers tightly intertwine their PHP and HTML.
Exception Handling
Exception handling in PHP is like object oriented programming – it's supported but not used. The PHP framework scarcely makes use of structured exception handling as do most of the online samples. The example which always gets under my skin is the MySQL library.
Other Issues
The fact that PHP is a loosely typed language can lead to significant difficulties for larger projects. Strongly-typed languages like C#, VB.NET and Java can take full advantages of compile-time checking and design-time tools (IDEs) while loosely-typed ones generally can't.
Share This
Published: Thursday, November 2nd, 2006
What is a Content Management System? Here's a little background. Lots of websites have dynamic content. Meaning, the content is located in a database, usually MySQL, and they are simply dumped into a web template when the page is viewed. That way, if you decide to change the structure or template of your website, the content need not be changed. You wouldn't really have to mess with anything. Since you have one main template, a change in the template is propagated throughout all the pages because all the pages are created dynamically and use the same template.
A content management system or CMS allows a user to manage this content. Excellent description, I know. Basically the user simply edits the content of the web site and not the actual pages. They don't need to know any HTML, they don't need to deal with the structure of the website they simply edit content.
Xpert.com.au has a nice write up on CMS.
Advantages of a Content Management System:
- Decentralized maintenance.
- Designed with non-technical content editors in mind.
- Configurable access restrictions.
- Consistency of design is preserved.
- Navigation is automatically generated.
- Content is stored in a database.
Share This