Archive for October 2013

Update Your Copyright Year

No idea why I never did this before… I guess it boils down to being a big fat lazy head, and that – to me at least – it seems like such a minor little issue to just go change it when the new year rolls around.
However, I always forget to do it on some site or another. So, here’s the simple java script snippet to automatically update with the current year.

<script language=”javascript” type=”text/javascript”>
var today = new Date()
var year = today.getFullYear()

And here’s a simple PHP snippet:

<?php echo date(“Y”); ?>

For the PHP to work, you may need to add the following line to your .htaccess file.

AddType application/x-httpd-php .htm .html

Note: PHP will not work directly in Joomla content or modules. Luckily, there’s a nifty little non-commercial extension for that!

Thank you Access Communications

Web Stuff

I am constantly looking stuff up, to solve little problems in my websites. So, I’m just going to start keeping the little tips and tricks I find in one spot, mostly for my own reference. I will update as I find and use various resources. I will try to always credit and link to where I find these things.
If I post stuff that I’ve looked up before, and kept locally for further reference, I may not remember and/or be able to relocate the source. So apologies in advance if that occurs.
As stated, this is mostly for my own reference, so lots of groundwork as to how I’m coming to these answers will be missing. If you do happen upon this blog while searching for an answer, and would like to ask any questions about what I’ve got here, please feel free.

So, you want to load a module position in Virtuemart Pages?

Put this in your default.php, wherever you want that position to load. Works exactly like {loadposition xx} in regular content.


$modules =& JModuleHelper::getModules(‘position’);
foreach ($modules as $module)
echo JModuleHelper::renderModule($module);

Remember to change “position” to the name you’ve created.

More options/info available at stackoverflow