Tag: PHP

The Inconsistencies of PHP

Posted on June 12, 2011 in General

Over the past few months I've come to love the Ruby programming language for many reasons. After using this language for a while and having a blast of a time, when I came back to PHP, I found it disgusting. I used to love the language; my tastes of syntax have definitely changed, but one thing that really bugged me as I examined PHP closer, is its inconsistencies. As you can tell by the title,...

Read more...

Generating a Joomla Password (for reseting)

Posted on February 23, 2011 in Tutorials

I recently found myself in the awkward situation of having only a Super Admin user in the Joomla installation, and neither I nor my client knew the password. I had to the fix the problem, and I decided to do so by generating a Joomla user password (which required a lot of searching through code, mind you). Here's the PHP code I used: <?php // JUserHelper class from libraries/joomla/user/helper.php $pwd = 'my_new_password'; $instance = new...

Read more...

Making a Dynamic Copyright With PHP

Posted on February 23, 2011 in Tutorials

I though I'd just write a quick tutorial on how I make a dynamic copyright for my websites. If you don't know what a function does in the code, look it up on the PHP manual. <?php echo strftime('%Y', time()); ?> That's the year generating code. It's just grabbing the year from the current timestamp. So we could do something like this in the copyright: &copy; <?php echo strftime('%Y', time()); ?> Legion of Weirdos. You...

Read more...