In this tutorial I'll be showing you how to create a 3D-looking button, made out of pure CSS. The button we'll be building is similar to the button I've used on my project pages. Take note that this uses a number of CSS3 properties, like
box-shadow. Anyway, let's get into it.
The only HTML code we'll need is a
div tag with the proper class:
<div class="big-button">Your Text Here</div>
If you want the button to link somewhere, just wrap a link round it:Read more
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 JUserHelper(); $salt = $instance->genRandomPassword(32); $final_pwd = $instance->getCryptedPassword($pwd, $salt) . ':' . $salt; ?>
(Note that I have to use the <?php tags to get syntax highlighting to work properly.)Read more
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:
© <?php echo strftime('%Y', time()); ?> Legion of Weirdos.
You might want to wrap around the code in a helper function:Read more