Categories
PHP

Serendipity

This is a nice looking weblog system! Nice ideas, and screenshots are attractive!

Categories
PHP

Template Engines

Here’s an interesting article, Template Engines from the author of bTemplate.

In short, the point of template engines should be to separate your business logic from your presentation logic, not separate your PHP code from your HTML code.

That’s the short definition of what a template should do. I think it should also:

  1. Provide application and server security. It could be argued that PHP safe_mode provides a level of security against third-party code.
  2. Make it simple to maintain the template.

In my experience, Smarty syntax is clearer in a html template. Mixing php and html grates on my brain but obviously it’s a subjective matter that many people are happy with.
Nevertheless, if you’re sitting on the fence about using templates, read the above article. See what the author does in his examples, and make up your own mind if they’re useful or not. You might find yourself using Smarty afterwards anyway!

Categories
PHP

Smarty Plugins – SmartyWiki

Lots and lots of Smarty plugins here!

Categories
PHP

phpPatterns() Updates

phpPatterns() has been updated with a wealth of articles! Stuff on Mozilla XUL, PHP5, PDF, APIs, PEAR::SOAP.
Excellent reading. The article on PHP5 is a bit of a rant aimed at PHP developers. PHP5 will make it more important than ever to be familiar with OOP and advanced programming techniques, as well as plain old procedural coding. We’re in for some interesting times ahead!

Categories
PHP

What's the point of Smarty?

Here’s a good comment off a Zend Smarty tutorial on why you should use Smarty.

With smarty all I had to do was write the engine in PHP and then all the deigners had to do was come up with the new templates. Then for each customer, there was 1 universal engine, one that I
would keep up to date and free of bugs. AWESOME.

That’s sorta how this site works too 🙂

Categories
PHP

The Dynamic Duo of PEAR::DB and Smarty

A short article introducing the workflow of a typical Smarty/PEAR::DB application. You’ll need to know a bit about both to get the most from the examples though, but the author has some good ideas.

Categories
PHP

Smarty Forums

The new Smarty Forums are now online!
I have to admit I prefer email discussion lists but these things can be useful as well. Maybe I’m just getting old too.

Categories
PHP

Simon discusses Smarty

Simon talks about Smarty Templates. He’s the founder of the Smarty Wiki, and lists some links developers will find useful if they’re thinking of using Smarty.

Categories
PHP

Smarty 2.5.0 is out!

The latest release of Smarty is finally out! Check the site for more info and be aware of the upgrade instructions – leaving old compiled templates around will upset things!

Categories
PHP

Installing PHP4, mod_ssl and Apache

If you’re installing PHP4, with an ssl enabled Apache you may run into the same problem I just ran into.
The lines LoadModule php4_module libexec/libphp4.so and AddModule mod_php4.c are inserted by the php installer automatically. Unfortunately, mod_ssl also adds in code to load mod_ssl.
From what I saw, it looks like the PHP installer adds the php loadmodule commands after the last load module. That’s fine in most cases, but unfortunately here, the last load module command had an if statement around it. When I visited a non-https url php wouldn’t work!
For some reason it didn’t add the AddType commands either but those were easily copied from another httpd.conf!