php developer

› Matthew O'Phinney's Blog: Cgiapp2 Tutorial 1 - Switch Template Plugins at Will

Right on the tails of a new release of the Cgiapp set of libraries, Matthew O'Phinney has posted a first tutorial in a series covering its usage. In this tutorial, he looks at a creating a "template switcher" for Cgiapp2-based applications.

Cgiapp2 implements a new callback hook system, which is basically an Observer pattern. Cgiapp2 has a number of registered hooks to which observers can attach; when a hook is triggered, each observer attached to it is notified and executed.

Why all this talk about hooks? Because in Cgiapp2, the various template actions -- initialization, variable assignment, and rendering -- are relegated to hooks. For simplicity's sake, and for backward compatibility, you can use the functions tmpl_path(), tmpl_assign(), and load_tmpl() to invoke them; you could also use the generic call_hook() method to do so, passing the hook name as the first argument.

To make it simpler for developers to access this templating system, Matthew created the Cgiapp2_Plugin_Template_Interface, a standardized interface for the template plugins. It's this interface that he demonstrated an example of, giving only a few lines of code (all that's needed) to switch between Smarty and Savant templating systems.

06/06/2006 12:47 pm (UTC)   PHP Developer   View entry   Digg!  digg it!   del.icio.us  del.icio.us

php developer

› RosSoft Blog: Tutorial - Web based search engine for Flickr

In this new post on the RosSoft blog today, they have the full code for integrating the CakePHP framework with the web services that Flickr offers to make a simple searchable page.

It's actually a clone of an application shown in a screencast as done in Ruby on Rails.

They have some brief instructions for getting things set up before demonstrating the "installation script" to get it all up and running automatically (don't you wish more applications were like this?) - it asks questions along the way to ensure what the settings you want and that they are correct.

05/06/2006 1:40 pm (UTC)   PHP Developer   View entry   Digg!  digg it!   del.icio.us  del.icio.us

php developer

› php|architect: Hello PHP-GTK 2

Scott Mattocks is continuing his PHP-GTK series over on php|architect's ART (article repository) with this look at enhancing the process started in part one.

Part I of this PHP-GTK series looked at what PHP-GTK is and why you might want to use it. The next installment, "Hello PHP-GTK 2", gets down to business with the requisite "Hello World" application. This article attempts to go a little deeper than just showing the code to get it working. Instead the article talks about how each line of the application interacts with the others, giving a better picture of the process of building a PHP-GTK application.

You should already have the needed PHP-GTK installation performed before checking this one out - there's no installation walkthrough here. He starts off with a very simple example, an empty window, that will serve as the testbed for the rest of the tutorial. He adds on to this humble beginning with increasing functionality (explaining each step of the way) to finally echo out a "Hello PHP-GTK" inside the box.

05/06/2006 1:33 pm (UTC)   PHP Developer   View entry   Digg!  digg it!   del.icio.us  del.icio.us

php developer

› PHPit.net: Taking a first look at the AutoCRUD for PHP library

PHPit.net brings yet another great tutorial your way with this first look at the AutoCRUD library for PHP - a database abstraction layer to help with some of the more mundane tasks (create/read/update/delete) of dealing with your data.

Welcome to this article on the AutoCRUD for PHP library. This library is a new database library specifically for MySQL, written by yours truly. The reason that this library is only compatible with MySQL is that I very rarely need to use another database, and I really wanted to focus on one database. It's possible that the library might get support for other databases in the future, but for now it's strictly MySQL only.

The tutorial provides a quick introduction to the functionality of the library - including built-in support for unique keys, table-object generation on the fly, and the benefit of being fully unit tested. Next up, the setup - there's some sample SQL to plug in to follow with the examples and the starting code to get the class included and working. They look at basic crud functionality, with a highlight on selecting, and the relationship handling abilities built-in.

05/06/2006 1:22 pm (UTC)   PHP Developer   View entry   Digg!  digg it!   del.icio.us  del.icio.us

php developer

› php|architect: Zen(d) and the Art of Email

Cal Evans has written up an article for php|architect's ART (article repository) covering "Zen(d) and the Art of Email", a look at the use of the Zend_Mail package from the Zend Framwork.

Since the beginning of Internet time man has strived for the best way to send emails from a program. Whether a web page that notifies its owner when an order is placed to merchants sending a welcomed message to its closest 250,000 customers; man continues to strive for the best way to communicate without having to be personal. With the advent of the Zend Framework, we have another weapon in the arsenal, Zend_Mail.

He talks briefly about advantages that the Zend_Mail package has over the traditional mail() and starts off with some sample code to illustrate it's abilities right off. The rest of the tutorial is used to explain this example, breaking it down chunk by chunk - all the way down to sending the closing statements to the remote mail server.

05/06/2006 1:15 pm (UTC)   PHP Developer   View entry   Digg!  digg it!   del.icio.us  del.icio.us

php developer

› PHP-Tools Blog: XML_Parser tutorial published

Stephan Schmidt has posted information today about a tutorial he'd previously written for the Zend website concerning his XML_Parser PEAR package he maintains, but never saw publication on Zend's site.

This tutorial was supposed to be published in the PEAR section of Zend's developer zone, as they planned on sponsoring PEAR developers that were willing to write tutorials for their packages. Sadly enough this tutorial has never been published, although Zend promised me to do so.

When cleaning up my hard disk yesterday, I stumbled across the tutorial and decided, that it would probably be better to publish it on my own website instead of waiting for Zend to finally put it online. So if you still are using PHP4 or prefer SAX-based parsing although PHP5 offers a decent DOM implementation, you can now find the XML_Parser tutorial on my website.

You can head directly over to the tutorial via this link to read up on this great package.

05/06/2006 12:47 pm (UTC)   PHP Developer   View entry   Digg!  digg it!   del.icio.us  del.icio.us

php developer

› WebMonkey: Get Your Feet Wet with WordPress

From WebMonkey, there's a new article for all of the bloggers out there that just don't know where to get started with the look and feel of their site. Tim Ziegler wants to help, and in "Get Your Feet Wet with WordPress" he provides everything from day one.

The best thing about WordPress (apart from it being free) is that plug-ins are available to do all manner of things, from inserting tag clouds into your blog to adding surveys and shopping carts to integrating YouTube videos. Not to mention the fact that you have serious control over the design of each section of your site.

But here's the rub: WordPress' system for messing with your blog design and site functionality is powerful, but can be confusing and awkward until you figure out how all the pieces fit together.

This article will pull apart the templating system and make you a WordPress Grand Wazier or your money back! (Not really on the money back.)

He covers a few different topics, including installing custom templates, how WordPress template files work together, working a bit with PHP to pull in remote content (or local, for that matter), and the best places to grab some of those handy WordPress plugins.

The one thing he doesn't cover is the installation, so you'll need to have it up and working before you tackle this tutorial. He suggests starting with a good base theme and going from there - changing settings, modifying the HTML, and using plugins to your advantage to enhance the functionality of your site.

02/06/2006 3:37 pm (UTC)   PHP Developer   View entry   Digg!  digg it!   del.icio.us  del.icio.us

community news (ez.no)  eZ systems employee

› Community newsletter 02/06/2006

In this week's newsletter, we bring you news about the first release candidate of eZ components 1.1 and an update on eZ publish 4.0 development. We also have news about the on-line documentation, an announcement of the stable version of the Online Editor 4.1, and news about the eZ publish 3.9 feature request list. The newsletter also includes an update on the current bug status.

02/06/2006 2:23 pm (UTC)   Community news (ez.no)   View entry   Digg!  digg it!   del.icio.us  del.icio.us

paul borgermans

› Prototyping lucene based search in eZ publish: first results

After roughly 12 hours coding (including removing some dust from my Java skills), Kristof and I reached a first milestone in our Lucene project: full text search implemented as a normal search plug-in for eZ publish. First impressions in a nutschell: fast, accurate and even faster Even though we use the PHP-Java bridge [...]
02/06/2006 1:29 pm (UTC)   Paul Borgermans   View entry   Digg!  digg it!   del.icio.us  del.icio.us

php developer

› BarelyFitz.com: CSS Colors - Take Control Using PHP

On BarelyFitz Designs, there's a handy tutorial that's been posted to help developers out there combine the powers of PHP and CSS to form a sort of color management system for their site.

While many web sites use powerful programming environments to create HTML, these same tools are usually ignored when it comes to creating Cascading Style Sheets (CSS). This article describes how to take control of your colors in CSS using PHP. You will learn how to:
  • Centralize your color definitions using variables.
  • Separate presentation and content by referring to colors using abstract names such as base and highlight.
  • Automatically generate a color gradient from a single base color:
  • Automatically adjust the contrast of foreground colors so they can viewed on top of your background colors

They follow the steps to making a CSS file with PHP - generate the header and output the CSS - as well as examples of its usage. They create a range of colors based around a central one, five levels in either direction. The file they've created to accomplish this is also available for download.

02/06/2006 1:16 pm (UTC)   PHP Developer   View entry   Digg!  digg it!   del.icio.us  del.icio.us

eZ publish™ copyright © 1999-2005 eZ systems as