Archive for December, 2007

How to quit smoking? 1

Today I quit smoking. Right now. After Years of trying, reading books, stopping & starting to smoke again…

I just quit. Now. The reason is very strong, and it has to do with my father, son, family.

And I do not regret. Not a 1%.

External mailserver for domain in ISPConfig 0

If you want to set up External Mailserver for some domain, you should set under ISP Site / Options / Mailserver to External Mailserver. I believe that you found that. But, usually this is not enough. You have to do the same for every co-domain.

Under Co-domains, click on every co-domain, and there you have Options / Mailserver. Set that to External too, or Your mail will not be sent as expected.

ISPConfig is a great package, but sometimes some procedures are not so obvious.

Right-trim the text at word boundaries 0

Very interesting post about the trimming the right part of a text at word boundaries, but without losing a text content completely - so called Accessible. This is very usefull in displaying article titles in any CMS system. The blog post is here: Breaking the text at word boundaries.

The effects of CSS minifying 0

I needed to implement some CSS compression, and minification, so I made some tests regarding the improvements. The content is delivered by Apache’s GZIP deflate, so the only thing to check was the effect of putting all CSS in one file, and packing it afterwards. For me, the results were surprising.

  1. Original file, after GZIP (19 CSS files) - 22Kb
  2. Just included into one big file - 17Kb
  3. In one file, removed comments and newlines -11kb
  4. One file, PHP cssTidy-ed - low compression - 10Kb
  5. One file, PHP cssTidy-ed - high compression - 10Kb
  6. One file, PHP cssTidy-ed - highest compression - 10Kb

The most interesting part was a difference between 1. and 2. I’m not sure why this happened. The other curious thing is that basically cssTidy compression does not improve much (besides it does changed some margin that I noticed, and did not wanted).

My conclusion: packing all CSS in one file and removing comments and  newlines is quite enough.

Return values from included files 0

Something I did not know, but when I found it on this post, then I just realized that is include somewhere in PHP manual, so I quote from original manual entry.

“If called from the global scope, then execution of the current script file is ended. If the current script file was include()-ed or require()-ed, then control is passed back to the calling file. Furthermore, if the current script file was include()-ed, then the value given to return() will be returned as the value of the include() call. If return() is called from within the main script file, then script execution ends.”