May 15th, 2008 by zytzagoo
HRT (Croatian National Television) redesigned their web site. One thing is certain: IT FAILS.
This post is just to make sure that the shame and evidence of blatant ripoff never go away or get forgotten. Seeing anyone do stuff like this in the year 2008 when (almost) everyone has Internet access is leaving me speechless:

It goes without saying that:
- the implementation sucks
- it’s nowhere near the functionality or aesthetics of the original BBC version
I could go on and on about various technical stuff that sucks, but I just don’t have the strength to do it anymore. Resignation is slowly kicking in…
Mi3dot.org’s Plagiarism forum thread has the inside scoop on who’s responsible, who profited and whatnot. Aljoša’s post illustrates the similarities even more.
Some other (Croatian) sources:
Posted in Elsewhere, Reality check | 3 Comments
May 12th, 2008 by zytzagoo
http://framework.zend.com/issues/browse/ZF-405
There’s a “workaround” available, if you’re keen on tainting your ZF install. Grab the zip file + diff from the above link and unzip inside the library/ folder.
Note: this gives you just Zend_Feed::import() functionality for those fugly rss 1.0 rdf feeds.
If you absolutely must create such feeds programatically, well, you’re shit out of luck as long as ZF is concerned. Try voting for the issue in the tracker (linked above) or dig in and patch the whole damn thing yourselves. Luckily, I needed just the import() functionality.
Posted in Webdev | 1 Comment
May 2nd, 2008 by zytzagoo
I’ve got everything I need (to get the job done) right here in the lovely city of Pag, back in the yard:

Posted in Life | 6 Comments
April 29th, 2008 by zytzagoo
Posted in Uncategorized | No Comments
April 28th, 2008 by zytzagoo
After reading through a bunch of posts all over the internet, trying out every solution that worked for others, and still not getting results on my blog — it was time to roll up my sleeves.
A quick view-source on the wp-admin’s post page revealed this shiny gem:
autosaveL10n = {
autosaveInterval: "AUTOSAVE_INTERVAL",
...
}
Well, hello there Mr. Classic Example Of An Undefined Constant!
A few quick greps against the current trunk showed that the constant AUTOSAVE_INTERVAL should be defined in wp-config.php (if you wish to override the default 60 second interval), or that it gets set to the default in wp-settings.php if it hasn’t been defined beforehand.
Opened up my curent wp-settings.php, ctrl+f, type in “autosave” — no match. It turns out that somewhere in the update process from 2.3.x to 2.5, stuff got mixed up: my (thought to be) latest wp-settings.php file was actually not the one from the 2.5.1 release, but, somehow, a different one (and not the one from 2.3.x either).
I have no idea how it happened, or the time right now to backtrack and figure it out. I did notice a weird thing on wordpress svn. The 2.5-tagged wp-settings.php is different from the 2.5-branch wp-settings.php — they could be using tags for different things though.
Aaaaaanywhooo, what I did to fix the issue: grabbed the latest 2.5.1 from wordpress.org and replaced my current wp-settings.php with the one from the newly downloaded ZIP file. Woot! It’s all good now: uploads working, no more autosave ajax requests happening every possible millisecond etc.
The second issue was the image/media uploader not working and just displaying “HTTP Error”. The culprit was mod_security, which i quickly got disposed of via some .htaccess directives inside the wp-admin directory:
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
The above is only a quickfix to see if it is really mod_security or something else — once you’re sure it’s modsec, narrow down the directives to deal only with certain filenames, so you don’t expose your entire wp-admin directory to possible future exploits etc.
Posted in Misc, Webdev | 6 Comments
April 24th, 2008 by zytzagoo
The amount of spam is just o_O
If you need to contact me, there’s an email address in the source files, or you can use my domain-at-gmail address — I’m turning off comments for now…
UPDATE: activated akismet… we’ll see how it goes
Posted in Reality check | 5 Comments
April 21st, 2008 by zytzagoo
TLDR version: You can not, must not — and hence — will not truncate any larger body of text in the middle of a word. Let the people read the whole sentence, or at least the whole word… God forbid you add an ellipsis indicating more stuff is there…
The scenario is pretty stupid (and unfortunately all too common these days): A web site decides to publish certain parts of their content in an RSS feed. The stupid part being that they decide to limit the amount of content in the feed in hopes of folks clicking the link and reading the whole thing on the site. OK — resistance is futile — that’s just the way it is.
[Yes, I know there are sites that have valid reasons for such an approach. We're not talking about those here]
But, how stupid do you have to be to not realize that with code along the lines of:
$abstract = substr($body_of_text, 0, ABSTRACT_LENGTH_LIMIT);
you’re bound to end up with chopped up: words, sentences, dates, times, people’s names, god-knows-what-else?
[replace the above PHP code with any language you want, the principle is the same]
Does that thought never cross anyone’s mind? Is that an advanced concept people cannot grasp? If it is I need to find a way to make money of it…
Anyway, crap like that gets served to the “readers”. Worse yet, the web site proudly displays their RSS 2.0 (oh, look, 2.0!) badge on the footer of every page on the site (BTW, how hard is it to add a bloody autodiscovery <link>? You can slap a badge in the footer, but not in the <head>? I don’t get it.), the CMS generating that crap is happily adding a “generated by” comment in the feed itself… Pathetic.

Posted in Reality check, Webdev | No Comments
April 11th, 2008 by zytzagoo
Tired of explaining to others how to turn off thumbnail caching on Windows, how to install TinkerTool on Mac? Deleted your fair share of those damn files manually? Me too! Never again!
/**
* housekeeping.php
*
* Removes various annoying hidden and/or useless files leftover from
* different people doing different stuff on the filesystem using
* various OSes.
*/
Source: housekeeping.php (5KB, .phps file)
When and how you invoke the function (cron or scheduled tasks, manually, before/after/during some scm process, on login/logout…) is up to you.
Questions, comments, etc — use the form below. Enjoy nuking those files.
Posted in Misc, Todo, Uncategorized, Webdev | 8 Comments
April 10th, 2008 by zytzagoo
The idea for this little script was born while chatting with Medo, a year or two back in London. The bunch of us were in London for that year’s FOWA event. Anyways, the code has been lying around for way too long — I finally found the time to finish it up and release it.
What does it do?
Well, not much. It’s an unobtrusive Javascript implementation of search & replace basically. It replaces ampersands (in their various possible forms) inside certain (configurable) html elements with something along the lines of <span class="amp">&</span> (also configurable).
This replacement, however, enables you to do some sexy styling of ampersands inside your headings for example. It can get really freaky, and really, really, really nice visually.
People usually do this on the server-side (and there are many, many server-side flavored plugins/functions/solutions out there), but my take on this is client-side. Anyone should be able to use it. (well, almost anyone).
Check out the demos and the configurator.
The code is very simple, documented, MIT licensed and comes in two flavors:
- The full source (5KB)
- Packed version (820 bytes)
[don't get this one. modify the full source and pack it yourself with your modifications. This is used just as an example of the file size reduction gained with packing]
Have fun, and drop me a line if you have something to add.
P.S.
The lack of updates on the blog is noticeable. Sorry about that, it’s been hectic around here. Hoping it would normalize soon, so I can put the finishing touches on the rest of my drafts…
Posted in Webdev | 5 Comments
April 9th, 2008 by zytzagoo
Posted in Funny | No Comments