One quarter English
One quarter English

PHP posts

Creating Admin Templates in eZ Publish

August 17th, 2010

Adding your own tabs and content to the CMS is essential for some extensions you build. This enables you to isolate functionality for authorised users and embed this functionality into the back office they are familiar with. This tutorial will cover the basics for creating CMS based views and modules which you can use as a base for your own extensions.
Read the rest of this entry »

Tags: , ,

Extended Attribute Filters in eZ Publish

July 25th, 2010

For a previous article I covered the various ways you can export user data using eZ Publish. In the article, I suggested how you can export all users who have logged in over the previous month using an extended attribute filter. In this article I will cover creating several different Extended Attribute Filters so you can see how they may be implemented in your code.

We’ll start by creating an extension to house our filters followed by building a basic filter to return a list of users who have forgotten their passwords. We will then create a filter to tell us how many/which users have logged in over the past month. We’ll also cover how you can add Extended Attribute Filters to both your template files and your PHP scripts.
Read the rest of this entry »

Tags: , ,

Making use of the 404 Error Page in eZ Publish

June 19th, 2010

For all commercial sites I have worked on in eZ Publish, no site has had a useful error page, despite the fact that using template overrides makes it so straightforward. In this post I will demonstrate how easy it is, showing how a custom 404 page for your site can be made. Our final page will contain a search box and the most popular pages on the site. We will also look at how you can use the eZPublish log to track which requests were not found.
Read the rest of this entry »

Tags: , ,

Fetching eZ Publish User Objects with PHP: Part Two

June 8th, 2010

This is the second part of this tutorial to demonstrate how you can access and extract user information from your eZ Publish database using PHP.

Part One of the tutorial provided ways to extract individual users and demonstrated how to display all of the user information. It also demonstrated some of the built in ways you can extract multiple users.

This part of the tutorial concentrates on the eZContentTreeNode::subTreeByNodeID() method. We will look at its basic use and some practical examples before creating a cronjob to automate the process.
Read the rest of this entry »

Tags: ,

Fetching eZ Publish User Objects with PHP: Part One

June 7th, 2010

There are specific cases where you need to pull the eZ Publish information directly in your PHP scripts. There are options available for both users and nodes. There is already an excellent article about doing this here. This guide extends this by providing a detailed guide to extracting User Information through a script and going through some practical examples.

I have split this tutorial into two parts. In this part, we will look at how you can retrieve individual users from the eZUser class and how to extract information from the eZUser class. I will then show you how to use some of the functions within eZUser and eZRole to extract multiple users.

Read the rest of this entry »

Tags: ,

Using Custom PHP Functions in eZ Publish Templates

May 23rd, 2010

In a previous post, I discussed how to use standard PHP functions within eZ Publish Templates. This article demonstrates how to use custom functions instead using custom Template Operators.
Read the rest of this entry »

Tags: , ,

Useful eZ Publish Links

May 22nd, 2010

Here are some links I’ve come back to quite a few times while developing eZ Publish based sites. Some of the things they tackle are incredibly useful and are hard to track down.
Read the rest of this entry »

Tags: ,

Preventing Issues between Dev, Stage and Live environments in eZ Publish

May 9th, 2010

If you are reliant on node IDs in your code it can lead to issues when moving your code between your dev, stage and live environments. Since your live site will have content added much more often, node IDs will tend to be much higher on that compared to your dev and stage environments. It is possible to use other alternatives in your override.ini file and in your templates to prevent this from happening.
Read the rest of this entry »

Tags: , ,

Useful Debugging in eZ Publish

May 1st, 2010

There are lots of settings and helper functions which can really assist with debugging your eZ Publish site. Here are the key tips I use when I need to work through any issues. I would also recommend a read of an article by Ɓukasz Serwatka on the eZ Publish website.
Read the rest of this entry »

Tags: , ,

Creating nodes in PHP with eZ Publish

April 11th, 2010

There are many threads which detail creating objects in PHP but they all seem to do things slightly differently. Many of the posts are very old and out of date and so they use a very convoluted way of creating objects (this is just half of it!). Since eZ Publish 3.9 there’s been a much better approach to take but it is very well hidden in forum posts. Here’s a summary of how you can use it.
Read the rest of this entry »

Tags: ,