Tag Archives: wordpress

I’m a dreamer, a distant dreamer :)

Yes, some of you might recognize the title words as lyrics by Duffy. It’s true, I like the album, a lot. Her official site, however, not so much (I’ll be thinking of Vulcans for the rest of my life everytime someone says ‘however’, no doubt about that).

But I will not steal from my own evening TV time to talk about that. Nuh-uh.

So, believe it or not, I’ve been officialy employed for a month and a half now. Netipični d.o.o. is where I now do what I used to do from home. Code websites, that is :)

In short: I’m satisfied, and (thank god!) the people who work there are quite (haha) normal and easy to get along with.

My backache is killing me, and I haven’t been able to sleep enough lately, but I’ll blame that on the godawful summer in the city too, not just on my impossible way of life and inability to adjust myself to the 9-5 routine. I’ll survive, don’t worry ;)

What else…

You know how WordPress adds ‘category’ in urls when the page is an category archive? I’ve created a plugin that gets
rid of it. But you’ll also need another plugin to make it work. I’ve
been testing it for the past few weeks and haven’t noticed any hickups.
Read on.

I’ve also switched from TinyMCE to WYMeditor and I’m liking it so far. You can download it as a WordPress plugin from here: http://wordpress.org/extend/plugins/simple-wymeditor/. I’ve tweaked its CSS files to suit the WordPress 2.5 color scheme better:WYMeditor

If you like it, you can download the tweaked files from here:


Just paste the two directories over in the ‘wymeditor’ folder (the one residing inside the ‘simple-wymeditor’ folder, if you’re using it as a WordPress plugin) and overwrite the files.

I installed Habari and I like it – it’s fast and feels stable, but it’s also very young and needs more work. I’ll dig in when I find some time.

I’m working with Silverstripe, too, but I can’t say that I’m becoming fond of it. Dunno… Although it seems to be a great piece of software, it just doesn’t feel right for me.

I know I had more stuff in my head that I wanted to write about, but I can’t really remember anything else right now, I’m feeling a bit sleepish :)

I’ll be taking two weeks off starting next Tuesday, gotta start working on my final paper and get that diploma out of my way. Fingers crossed ;)

Music? Something new? Hmm. We’ll see.

Laters :D

Actual work: DAS and Studena

I’ve been working on some interesting projects for the past few weeks.

The first one is the website for the Society of architects of Split (Društvo arhitekata Splita – DAS). My job was to code the layout and choose a CMS. I decided to go with WordPress because the site’s structure isn’t too complex and, except for two categories, it’s mostly just static pages.

I did encounter a few difficulties along the way, but nothing that wasn’t fixable. Most of the pain was caused by the ever popular “/category/” feature of WordPress, which inserts /category/ in the URL if the the page is a category index. While you can access those pages without the /category/ in URL if you’re using a custom permalink structure (such as “/%category%/%post_id%/%postname%/”, for example), the problem starts when your post count per page exceeds 10 (or whatever custom number of posts per page you choose) and you need to go to page 2 of that category – it returns a 404 error. I fixed this problem with a handy plugin called “Redirection“, which made it possible to rewrite “/category/category_name/page/number/” to “/category_name/page/number/”. I tried placing the rewrite rules directly in the .htaccess file, but, for some reason, that didn’t work.

Second problem was adding custom metadata to posts in a way that would make sense to a site editor. For that purpose, I used the rc:custom_field_gui plugin which was a breeze to use :)

Third one, that gave me two days worth of headaches, was how to display only posts with certain metadata on a category index page. First I used the officially recommended way, which consisted of using PHP’s continue statement to filter out the unwanted posts. That produced a empty page 1, and a populated page 2, because WordPress post count occurs before the continue statement. There’s also no way to do it with WP_Query, so I ended up writing a custom query. Again, problem with pages. I used the WP-PageNavi plugin, so I looked at its code and figured out what variables it needs to work properly and I gave them the values they needed.

I can only say that I’ve learned a lot about how WordPress works :) And while it does have its quirks, if you know some PHP, anything is doable.

Second website is for a well known Croatian bottled water, Studena. Again, Blackduke was the one who produced the website and I was asked to compose some background music and a few sound effects. The first version of the music was initially accepted, but then it was agreed that something that currently plays on the site would work better. You can hear and download the first version from below :)

  1. No flash Studena music – 01:42
    Download: MP3 (1,602 KB)

In other news: wish me luck because I’ve got three exams next week. And that’s it. If I pass all three, I get to start working on my master’s thesis.

Future awaits :)

Got problems with Internet Explorer 7 and StatTraq? Here’s a solution.

*UPDATE: As of December 1st, when version 1.1 is released, this issue is fixed.

I’ve just installed StatTraq, a popular WordPress plugin for tracking your site’s statistics. I like it and I can’t wait to see the first ‘real’ results after a month or so has passed.

But the problem is – Internet Explorer 7 just won’t load the page if you’ve got StatTraq running. I was getting a blank page and a “Internet Explorer cannot open this page” error. No code errors, no warnings, nothing, as if the site is unavailable.

So I searched around a bit and found this post by Avery J. Parker with a small clue in it :) Avery wrote:

…carried this error at the bottom of the page (ONLY in IE7 by the way…) “Fatal error: Call to undefined function:() in /var/www/html/radiotv/wp-content/plugins/stattraq.php on line 90”

Around line 90, there’s a function for browser detection and Internet Explorer 7 wasn’t on the list. I guess IE7 didn’t like that very much, heh. Anyways, all you need to do to fix the problem is:

  1. Open ‘stattraq.php’ file that resides in your ‘wp-content/plugins’ folder
  2. Go to line 80/81 and replace:
    if(strpos($ua, 'MSIE 6')!==false || -->
    strpos($ua, 'MSIE6')!==false)
    $ver = 6;


    if(strpos($ua, 'MSIE 7')!==false || -->
    strpos($ua, 'MSIE7')!==false)
    $ver = 7;
    else if(strpos($ua, 'MSIE 6')!==false || -->
    strpos($ua, 'MSIE6')!==false)
    $ver = 6;

    *note: –> means that this is not the end of the line, line breaks at ‘$ver = …’

  3. Save the file and you’re done.
  4. Check the page in Internet Explorer 7 and be happy if everything works :)

It worked for me, but if it doesn’t do the trick for you, please leave a comment.

I’ve posted a comment on StatTraq’s page so this will hopefully be fixed in the next version.

Host body switched in a race for survival

After 3 days (and counting), I finally know who to blame for this huge outage. This is a quote from Abnormis.net:

Everyone can thank the lovely hacker “Jamaycka” for the problems we are currently having. You can see what a wonderful guy he is having hacked over 5700 websites at the following URL: http://www.zone-h.com/component/option,

Wow. That guy certainly has something to be proud of. Shutting down hundreds of websites at once, wow. For what fucking purpose? I’d feel much better leaving Abnormis’ services if it were their fault, if they fucked up something, but now… I want to strap that guy(s) or girl(s) to a splintery wooden chair, naked, and than bring in some small animals or insects that like to crawl themselves into body cavities. OK, maybe that’s a little harsh (hee… >:) ), but this is quite a mess that person has made. A bunch of website is unreachable, (Breedart.org, among others) and Abnormis will be out of business for a while, I presume. And that is wrong on too many levels.
So, I’ve transfered my domain to MediaTemple and it’s all working fine now. Also, I was quite surprised how fast the DNS switch happened — 5 minutes (maybe even less) after I’ve updated the nameservers in GoDaddy‘s control panel, my domain was working once again, e-mail too. I don’t know who to thank for this, I was expecting at least a 24h transfer period. Nice :)

I’ve made another (fairly noticeable?) switch too, I’m now using WordPress. The theme you’re looking at started as a small modification of the default ‘Kubrick’ theme, but I didn’t want it to drown in the sea of similarly looking blogs, so I gave it a touch of… um… me, hehe.

Enjoy your stay, feel free to leave comment, and please report any weird stuff. Thanks for visiting :)