Joomla: Template parameter file is not writable

While working with joomla themes, one might come across this problem of the template parameter file not being writable. You may have tried to change the permission of params.ini to 0755, but somehow the permission is reset to 0555 everytime you save your changes. What could be the problem?

Seems like the answer lies in the com_template core component. Open the file ~/administrator/components/com_template/controller.php and search for this line “Could not make the template parameter file unwritable”. You’ll see that this component is actively reseting the permission to 0555 with this code:


if (!$ftp['enabled'] && JPath::isOwner($file) && !JPath::setPermissions($file, '0555')) {
JError::raiseNotice('SOME_ERROR_CODE', JText::_('Could not make the template parameter file unwritable'));
}

So the solution becomes straight forward – change the ’0555′ to ’0755′. Do not worry about security concerns as you are only granting write permission to the owner.

Is your wordpress installation safe?

An interesting article discussing the common ways hackers can inject code into a clean wordpress site.

http://ottopress.com/2009/hacked-wordpress-backdoors/

World War II retold on Facebook

A refreshing version of World War II told on Facebook.

Source: http://www.collegehumor.com/article:1802364

Move EBS AMI’s across regions

Was trying out an instance in the Asia-Pac (Singapore) region but realize I can’t simply move my AMI from the EU region here. Fortunately I found the guides below for a potential solution to this problem. Keeping them here for my own future reference.

Summary:

http://citizen428.net/?p=420

Step by step:

http://blog.ibd.com/scalable-deployment/copy-an-ebs-ami-image-to-another-amazon-ec2-region/

Free Transform Manager As3

update: new version!

Put together a simple transform manager for a friend’s project. Supports dragging and single click scaling and rotating. Source provided after the jump.

Continue reading ‘Free Transform Manager As3′

Installing XDebug on Virtualmin

XDebug helps you debug or profile your php code. It is useful for complex sites where it is not feasible to read each line of source to determine where you should start optimizing (especially if those are not your own code, as in the case of contributed extensions). One point to note is that XDebug does not output in a human readable way, you need to use tools like kcachegrind to parse the output to gather information from it.

To install with pecl:
pecl install xdebug

You can craft your own .ini, or you can get a default (albeit unsupported) xdebug.ini from http://gggeek.altervista.org/2007/11/26/the-completely-unofficial-xdebugini/ and place it in /etc/php.d along with the ini’s of other modules.

Important directives:
zend_extension="/usr/lib/php5/20060613/xdebug.so" <– to enable this module, but set the path to your own path to xdebug.so. (use find -name xdebug.so to locate it)
xdebug.profiler_enable=1 to enable the profiller
xdebug.profiler_output_dir is the output directory for the logs. You can leave it as the default /tmp directory

restart apache

node-view-[viewname].tpl.php not working

If you are using row style: node in your view, its recommended that you use the node-view–[viewname].tpl.php to theme your output instead of views-view-row-node–[viewname].tpl.php.

However, you must make sure node.tpl.php exists in your theme (or subtheme) in order for node-view-* to be picked up by Drupal.

Custom content type not showing up?

You’ve created a custom drupal module to define a content type, its showing up in the create content menu, but its not showing up in the admin/content/type menu. What could be wrong?

Check that you have declared the [module_name]_form() function in your .module file.

Function header:

function [module_name]_form($form_state)

Note: if its not even in the create content menu, you need the [module_name]_node_info() function.

Tell it your way

Utilizing a 3d game engine, a series of extremely detailed events is  scripted throughout a large map during a span of 5 hours. Users are allowed to roam freely around the map as a normal player, or they can enter “Director Mode” that allows the user to fly around and record what they see using their fully-customizable virtual cameras.

After the cameras are confirmed, a rendering engine then outputs the selected sequences to HD content on the user’s machine. Using a 3rd party video editing software, the clips are edited together, along with what ever music, effects, overlays the user deem fit. The finish product is uploaded back to the server.

The entries are opened to the public, who are invited to vote for their favorite version of the incident.

The judging panel then reviews the shortlisted entries based on camera work, editing, timing, etc. to filter out a list of 10 finalists and the winners.

Skype for Windows Mobile 6

Apparently Skype decided to discontinue the Skype client for Windows Mobile 6, although existing installations would continue to run. I’m glad that I only found this out after I bought my skype credits.

But thankfully the .cab file can still be found online, and they work fine on my HTC Diamond 2.

http://www.4shared.com/file/GrqhiMzD/Skype_v300256_For_Windows_Mobi.html
http://www.box.net/shared/static/rxi1nb6j3q.cab

God I didn’t know I was buying myself into so much trouble when I got my Diamond 2