Archive for the 'php' Category

5 domain names – 5 CMS’s

Oct 2nd, 2007

As bloged before, my publisher organizes a “Best CMS” award thingie and I’m one of the judges in the “Best PHP CMS” category. It’s time now to sit on my behind and judge, as scary as it sounds. I have to pick three from the five finalists in the PHP category in any order, so […]

 

file_put_contents() for PHP4

Sep 10th, 2007

Simplified, but still… <?php if (!function_exists(‘file_put_contents’)) { function file_put_contents($filename, $data) { $f = @fopen($filename, ‘w’); if (!$f) { return false; } else { $bytes = fwrite($f, $data); fclose($f); return $bytes; } } } ?>

 

LA Web devs meetup at Yahoo

Jul 23rd, 2007

So there is this group of local LA web developers that meet every month or so to meet and discuss what’s up. More about/join the group here. This month Yahoo will be hosting the meetup in the Santa Monica office (my workplace), it’s actually tomorrow, so if you’re in LA, don’t miss the opportunity for […]

 

CMS award nominations open

Jul 16th, 2007

Nominate your favorite open-source CMS before August 31st. (Yours truly is one of the judges in the PHP category.)

 

PHP/Javascript dev tools for TextPad

Jul 16th, 2007

Here are some convenient tools I’ve added to my TextPad editor, hope you’ll like ’em. TextPad tools Stuff can easily be added to TextPad’s Tools menu, like I did, shown on the screenshot. In order to do so, you go Configure -> Preferences. Then select Tools on the tree to the left, then Add. You […]

 

phpBB front-end optimization – 1 hour workshop

Jul 13th, 2007

Let’s go ahead and optimize our phpBB installation for front-end performance. I’ll follow Yahoo’s 14 optimization rules, but only implement the ones that apply for phpBB. During this short workshop there will be no changes to the phpBB code, we’ll create a new template instead, so that in case something bad happens, your board will […]

 

On a publishing diet

Jul 12th, 2007

So I launched this little tool csssprites.com that allows you to upload images and create one CSS sprite image, plus it gives the background-position CSS definitions to use in order to show parts of the sprite. People have been trying it out, but unfortunately sometimes uploading 20 megs of images to create a sprite, which […]

 

CSS Sprites generation tool

Jun 27th, 2007

Here’s my last weekend’s project – a web-based tool to generate images for CSS sprites: http://www.csssprites.com. Cool domain name, eh? I couldn’t believe it was not taken. CSS Spr…what? This is a simple technique used for page load performance purposes. Since HTTP requests are the most expensive thing you can do in regards to front-end […]

 

Good PHP CMS?

Jun 21st, 2007

I’ve been selected as a judge in this year’s Open Source CMS Award, organized by Packt Publishing. I’ll be voting for three out of 5 PHP CMS projects where those 5 are selected by votes from the site visitors. Join me in a discussion I started at opensourcecommunity.org “What do you think makes a good […]

 

Really simple Really Simple Syndication syndication

Jun 7th, 2007

Nice title, eh? OK, so all of a sudden theweathernetwork.com buttons I was using to show the weather in Sofia, Bulgaria and selected Canadian cities on the community site bgcanada.com, stopped working. Reason: unknown. So it was time for a change, since those buttons were generated by some javascripts, hosted by theweathernetwork, which is kind […]

 

Performance tunning with PEAR::DB

Jan 16th, 2007

If you use PEAR::MDB2, you can set a custom debug handler and collect all the queries you execute for debugging and performance tunning purposes, as shown before. But what if you’re using PEAR::DB? Well, since PEAR::DB doesn’t allow you such a functionality out of the box, you can hack it a bit to get similar […]

 

Using PEAR and AWS to keep an eye on Amazon

Jan 10th, 2007

What could possibly be better for a writer’s ego other than being read and being praised? Hmm… So I wanted to have a page that shows the books I’ve written, together with their Amazon sales rank and the average customer rating and number of reviews. It’s really easy. I took one example out of the […]

 

Laziest image resize in PHP

Dec 13th, 2006

Today I saw a post at digg.com on image resizing with PHP and there was quite a discussion. Let me share the laziest way (that I know of) how to do it – PEAR::Image_Transform is all it takes. Here goes: <?php require_once ‘Image/Transform.php’; $i =& Image_Transform::factory(”); $i->load(‘test.jpg’); $i->fit(100,100); $i->save(‘resized.png’, ‘png’); ?> In addition, the Image_Transform […]

 

Performance tuning with MDB2

Dec 9th, 2006

This is a follow-up to Lars’ comment about the PEAR book. In the MDB2 chapter I showed an example how you can create custom debug handlers in MDB2 and then gave a suggestion about a useful application of this functionality for performance tuning. Basically the idea is that your custom debug handler collects all queries […]