Tips, Tricks and Information for the Modern Technologist

Category: PHP


Exporting Announcements from WHMCS

Posted 6th September in Code Samples, PHP. No Comments

Doing some integration work with WHMCS, I found the need to export some of the announcements into Wordpress. Since there isn’t any native implementation of this, I found the best way is to export it directly from the database. The PHP code to do this is fairly easy…


Adding Random Quotes to the Bash Login Screen

Posted 21st December in Code Samples, Linux, PHP, Shell. 4 Comments

According to “official” system administrator rules and guidelines you shouldn’t be adding so-called vain scripts to the login prompt – only utilities that will add something useful to the system (for example, current system load, memory and disk usage, etc). However I have some systems that I frequently connect to and thought it would be [...]



Find Out If A Twitter Username Exists Using PHP/JSON

Posted 19th November in Code Samples, PHP, Social Media. 4 Comments

I’ve been trying to grab a Twitter screenname that people continually register and do not use. Twitter eventually deletes it, but I suppose it is in high enough demand that someone else registers it right away (and then continues to never use it). Wrote up a quick and dirty php script to check the Twitter [...]


A phpBB 3 iPhone Style Theme With Option to Disable

Posted 16th August in Code Samples, PHP, Software. 16 Comments

A forum that I am an adminstrator for has been clamoring for an iPhone theme (style) for a long time now. In the past, I hadn’t seen any usable iPhone template for phpBB3, until now.

View this entire post to view my modifications to a theme switcher for mobile devices, so that the end user can disable a mobile theme for their login if they should choose to do so.



Adding a Module Position in a Joomla 1.5 Template

Posted 27th September in Code Samples, Configurations, Joomla, PHP. 6 Comments

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 [...]


Last Modified Date or Time on WordPress Template Page

Posted 15th September in Code Samples, PHP, Software. 11 Comments

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: 1<?php the_modified_time(‘F jS, Y’);?> And via Ardamis’s Blog, there [...]


Secure Drupal Admin Login Page

Posted 26th August in Configurations, Drupal, PHP, Security. 3 Comments

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. [...]