Category Archives: PHP

PHP Code Samples

Adding a Module Position in a Joomla 1.5 Template 1

Adding a module position in a Joomla 1.5 template is not as easy as it was in the 1.0 templates. It is a two step process:
1. Add code to template PHP file.
For example, this would go in the index.php file in the template folder – or if you are adding it in an include file.
<?php [...]

Last Modified Date or Time on Wordpress Template Page 8

I couldn’t readily find an answer to this question via the google. So here it is: If you want to insert a ‘last updated’ or ‘last modified’ date on your wordpress page, then there is a simple bit of PHP code you can use for this:
<?php the_modified_time(‘F jS, Y’);?>
And via Ardamis’s Blog, there is a [...]

Secure Drupal Admin Login Page 3

Drupal’s administration login area is not secure by default. Usually there is an option in the configuration area of content management systems to set a secure area for logins, otherwise your username and password are sent in plain text over the internet.
Luckily, there is a module which enforces secure login on a Drupal install.
Drupal Module: [...]

Use PHP, GD and .htaccess to Watermark All Images in a Directory 10

The goal here is to watermark all images in a certain directory, except for thumbnails or other selection. You can either do this on each file prior to placing on your webserver – which is probably wise for CPU load issues – but let’s just say you want to do this for all files [...]

ffmpeg PHP Extension Howto for CentOS 1

If you need to compile ffmpeg for PHP (for example, to allow PHP to process video similar to how YouTube does) – then follow this Howto from Nazly. For a CentOS machine with custom PHP, it works great.
Ffmpeg PHP Extension Compile Instructions