Archive for category Software Development

Increasing the default upload limit in WordPress

Today I was working with a custom WordPress implementation and we had a situation where in the attachment size was going to be around 50mb.

By default the WordPress  installation allows you to upload files with a maximum size of 8mb.

To override this limit all you need to do is create/open the . htaccess file in your WordPress installation directory and add the following lines to it.

php_value upload_max_filesize 50M
php_value post_max_size 50M
php_value max_execution_time 2000
php_value max_input_time 2000

You can modify the file size according to your preference and set a custom upload size :)

Post to Twitter

Cancel Event-Bubbling in Dojo

If you have ever worked with a set of nested div’s which needed to listen for onclick event you must surely have encountered this issue.

If child div is clicked the parent’s click event will also be triggered because of Event-Bubbling.

The Internet Explorer 4 or later and Netscape 6 event model mechanism that propagates events from the target element upward through the HTML Page.

Me and my team mate Anoop were struggling with the problem for a long time and today he finally found a solution to it.

Use the code below to cancel the Event-Bubbling.

dojo.connect(dojo.byId("myDiv"),"onmouseover",

function(evt){

//Do Something
//..
//..

evt.stopPropagation(); //Stop Event Bubbling

});

Here passing the evt paramenter is very crucial otherwise the Event Bubbling wont stop! ;-)

Post to Twitter

Tags: , ,