Archive for February, 2008

Shared hosting and SSH

I was surprised. I get used to the fact that most hosting providers has SSH off by default for their customers. I think it’s normal. It’s ok when you have to write them email/post a ticket/whatever. You have to explain why do you need ssh access, you have to prove them that you aren’t criminal, you aren’t going to spam/hack/whatever. And finally you’ll get an access. It’s ok, I can wait three days untill I receive ssh so I can work comfortable.

But this time I was asked for scan of photo ID. Not even asked, the upload form was built into cPanel. I think it’s kind of idiotism. I’m not going to send over all internet my ID just to have possibility to extract archives or quickly edit files right on server. And nobody will protect such hosters from somebody who’ll write small or shell.php, which will just exec() what it receives from request. Isn’t it easier to setup proper chroot?

Friday, February 15th, 2008

Form-building components for Joomla

Recently I was creating contact form for one Joomla-based site. It was a standard contact form, everybody did similar hundred of times. But this time I decided to use one of existing components for building forms. There was one commercial, but it wasn’t the case, I didn’t even give it a try.

First one I tried was FacileForms. I just picked up the first one in rating. Well, my first impression was positive. There was everything I needed. Component has a lot of examples and Javascript library. I spent about an hour building my form (there was quite a lot of fields). Finally it was done, I opened frontend for last time.. Fuck. All form elements were absolutely positioned with coordinates I gave through admin. Did you ever heard about absolutely positioned form? I don’t. I decided that it was my mistake or lack of documentation, so I dived into sources. Fuck.
$attribs = 'position:absolute;';. I throw it away. You can do the same or make a code contribution. I didn’t have a time.

Second component was ArtForms. It was much better for my needs, it has customizable template for each form element. And it has nice ajax-based admin, which is much more convenient for editing. But it has disadvantages too. When you create input elements you cannot assing “name” property to them. I could live with it so I stopped my searches.

Friday, February 15th, 2008

How to skip image alignment in WordPress and HTML

For example, you have posted picture with left alignment. And thus all the text is starting from the right side of the picture. How to skip this if you want only part of text to be from the side of the image?

You can use multiple <br> tags, but this is not a good idea in WordPress. It is not working there. It is not good for HTML also, because representation can be different for different browsers, displays etc. There is special parameter for <br> tag, which skip all image alignment. This is <br clear=”all”>

Thursday, February 14th, 2008