Monday, January 31, 2011

Windows con mistary

Have you even try this:

In Windows, should you run such a thing, create a new folder. Try and give it the name 'con'.

Can't be done, can it?


Why we can't create a folder named 'con' in windows?

May be below is one reason, i'm also not sure about it-

It's not that weird. 'con' is a reserved word from the old DOS days, simply meaning 'console'. If you wanted to create a new text file in DOS you could type 'copy con newfile.txt' meaning copy from the console to newfile.txt. This would let you type some lines and when you ended the file with ^Z (DOSish for 'end of file') you would have a file called newfile.txt containing whatever you wrote in the console. This is indeed still possible in the Windows XP console, and can you see what mess it would cause if you let files or folders have the name 'con'? What would 'copy con newfile.txt' then mean?

Giving this list of other DOS devices that can't be used as folder names:
CON, PRN, AUX, CLOCK$, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9.

Sunday, January 23, 2011

Customized uploadify in Zend

Customized upload button in uploadify


In uploadify web site they give a good example that how can you hide the default button and apply your customized css . I'm going to show you how can you place anchor tag instead of button, Its not a new thing but might be helpful for someone. I face this problem when i have to give link which have similar functionality like uploadify button.


What i did is just by CSS below is the code and explanation, please let me know if you find any other issue related to this one and off course please appreciate if find useful :)


In page.phtml






$('#upload_file').uploadify({

//

..........

......

'auto' : true,

'hideButton' : true // We need it for custom browse button

});




in uploadify .css


#upload_fileUploader {

background: none;

z-index: 2;

position: absolute;

margin-left: 5px;

width: 40px;

}


#upload_file {

display: inline;

}


#upload_file a {

position: absolute;

padding-left: 5px;

}



Its done. :)


few things that i have to mention, overlap a upload button with href mainly depends on few CSS steps:

(a) First and most important is z-index

(b) position

(c) display


Hope it helps for you.