CodeBlog.ch


Smart text trimming with PHP

Posted in PHP, Uncategorized by Remo Laubacher on the June 20th, 2009

Have you ever tried to create a short preview text using PHP? Did you just count the characters and ended up having texts with a completely different width like shown on this picture?

text-trimming

This tutorial describes a small method which calculates the real width of a string and lets you create better looking preview texts!

(more…)

Concrete5 – more Speed with eAccelerator

Posted in Concrete5 by Remo Laubacher on the June 12th, 2009

UPDATE: The latest eAccelerator version doens’t contain the PHP API anymore. It therefore does no longer work with Concrete5! The upcoming version 5.4 is going to have support for APC and memcache. Sorry!

You want more speed with Concrete5? Make sure you’re using eAccelerator!

In this tutorial I’ll explain how to install eAccelerator on a Debian Linux Server.

eaccelerator1

(more…)

Concrete5 – Staff listing with two Columns

Posted in Concrete5, PHP by Remo Laubacher on the June 6th, 2009

Sometimes content should be presented in two columns. In this tutorial I’ll describe a possible solution that included a very simple block to display a staff/team member with a description on the right side of it. The result will look like this:

staff1

(more…)