Tag: Site Updates.

Something is horribly b0rked

And I don’t have time to fix it now. A bit later. Please hold on

Update: Fixed - Phew.

I think that I will not use the AskApache plugin. Even though it looks very useful (especially since I’ve been mildly hacked once) it managed to b0rk the site twice (although I will admit that the first time it was my fault as well).

However the fact that it is so easy to break your site, even if you have some passing knowledge of web administration like me, makes it a bit dangerous for the faint of heart.

Another problem is that I couldn’t even leave a comment at the plugin’s page due to the heavy spam filtering or whatever. This is especially exasperating when your site is freaking up (not finding the admin pages and whatnot) and you’d like some support. Fortunately I managed to search for keywords and find a comment left by the author of the plugin advising how to fix my problem.

Very big Note: When the author talks about the .htaccess file. He means the .htaccess in the wp-admin/ folder not the one in your domain root. Do not touch the one in the root! I learned that the hard (or rather, the run around in panic, waving my hands around) way,


About this entry


Maintenance day

Please bear with me as I perform some maintenance.


About this entry


Blogshares

Hah, I’d completely forgotten about this and now I discover that I’m worth 1M :)

Listed on BlogShares


About this entry


Squashing Wodrpess Performance Bugs

I think I’ve finally managed to trace down and smite all the things that were making my site so Gawd awfully slow. I had finally been annoyed enough by 30 sec loading times that I just had to do something about it.

Initially I thought it was with my host, and I did contact support about it via Email. They did check out the MySql slow logs and noticed some strange queries from BadBehaviour, but when this little plugin blocks around 1000 bots per week, it’s not worthwhile to disable it :).

In Dreamhosts’s opinion I should try and disable my plugins and then switch to another theme to check. Well, even though it was painful, I did it but it didn’t really make much of a difference. My site still seemed to be slow. However a test site I created had a quite normal speed. Perplexing

Initially I thought that it might just be the difference in DB size and indeed, my other WP sites, which have much less content that this, seemed to be loading faster (albeit slightly).

Fortunately a few google searches led me to some good content. Initally I discovered Firebug from a post explaining how it can help you diagnose Wordpress performance issues. That was quite helpful to tell the truth. I managed to immediately spot that the Wordpress Automatic Upgrade (WPAU) and the Popularity Contest were severely slowing down my Dashboard. I also found a few items in my theme that were just taking too long to load (like my FSF badge for some reason). Disabling them dropped the load time but I still had a problem.

You see, for some reason there is a 5-9 second loading time from the time I click on a link, to the time the page refreshes and starts to load. Firebug, unfortunately, will not give you any information on what is causing this, other than to tell you that the link is loading. It will not even take into account this initial loading time when giving you the total load time of the page (thus a page taking 13 secs will be reported as taking 4.5). Since this loading time dissapeared

This meant that I had no idea what was causing it, so back to the search I went. This time I managed to find a more interesting post on Improving Wordpress performance which not only gave some great info, it linked to some other sources. Unfortunately, most of the tips given were to be used on a private server and were not really applicable to a shared hosting service like mine. Of course, this person was talking about receiving 500.000 hits a day, whereas I’m barely receiving 3000…a month. Still I applied the wp_config.php edit although it didn’t seem to make much of a difference.

My final hint came from wolfie who advised that I remove all widgets and links that point to other addresses as these may increase the loading time. I did that and I also took down the Popularity contest as well, just to see the results.

It seems it worked. The initial loading time has dropped to around 4-5 seconds. Although I don’t have as much bling in my site anymore, I am hoping that the increase in speed will make up for it. Unfortunately 4-5 secs is still quite bad and while I still don’t have any idea where to look in order to fix that, it’s at least better than 6-9 secs + 4 secs of extra stuff. With the WP-Cached page, the load seems to be instantanteous OTOH so at least that helps. Still for a ~100 hits per day, it certainly should not happen.

As an aftereffect, I decided to finally update this site to WP 2.5 as the functionality of Popularity contest was the only thing preventing it. At least I now have a snazzier Dashboard :)

After improving my performance I decided to also start a Wordpress Performance page on the dreamhost service wiki. I would urge all of you, Dreamhost customers or not, to take a look and improve this page so that others that have similar issues can find a focal point to troubleshoot. I also hope to see tips specific for Dreamhost shared hosting customers eventually.

If there is a good Wordpress improvement page or tips that I should check btw, feel free to let me know. Also, if you have any idea what causes these ~4 secs of initial loading delay, I would be really glad to hear it.


About this entry


Semi-Maintainance mode

Bw aware that I’ll be trying to figure out where my performance problems are coming to so you might see various things not working.


About this entry


Where’re my damn icons?

I don’t get it. My lifestream icons are not loading for some reason even though you will see in the page source that they are loaded as part of the class. For some reason, initially the last.fm and facebook icons stopped loading after I hacked the SimpleLife plugin to make it play with all kinds of feeds. Then, I discovered why the colours of the custom feeds were not being used (a missing colon) and fixed it, and now <a>all</a> my icons are gone…

Grrr!

Nothing I do seems to fix this and I just cannot see why it is happening. There does not seem to be an obvious error in the code and the rest of the css class (text, background colours) are loading just fine. In the source of the page, you can see the css clearly loading correclty


a.lastfm {
background: 0c0c0c url(http://dbzer0.com/wp-content/plugins/simplelife/lastfm.png) no-repeat 10px 50% !important;
border-top: 1px solid 0c0c0c !important;
border-bottom: 1px solid 0c0c0c !important;
color: #BFBFBF !important;
}

And then the item call

<li class=”item”><a href=”http://www.last.fm/music/Machinae+Supremacy/_/Stand” class=”lastfm” title=”db0’s Recently Played Tracks”><span class=”timesf”>09:48</span> Machinae Supremacy – Stand</a></li>

And the icon exists…
Anyone have any idea what is going on?

At least now I can have feeds from any source (feedburner, del.icio.us, google reader) without losing formatting. I just need to wait for the next plugin version to add options for more streams :)

UPDATE: Nevermind. I found the culprit. Apparently I’m blind…


About this entry


Mighty plugin hacking

Well…for my newbie standards at least :P

I’ve been playing around with the SimpleLife Wordpress plugin, trying to create a simple lifestream I can embed in my about page and perhaps in my sidebar as well. It turned out that this was a job which needed a bit more attempt to make it work.

Below are the changes I did in order to wrangle it.

  • Had to edit the plugin in order to get it to diplay correctly in the plugins page. For some reason it floods the screen with it’s contents. Apparently editing and saving should solve it but in my case I needed to delete some newlines as well.
  • Changed the classes .date and .time to .datesf and .timesf and modified where they were called. Leaving them as they were, they were screwing with other css classes on my site under the same name
  • Changed the if statement for last.fm to look for the string ‘last.fm‘ instead of ‘last‘ since that string may be a part of any other url.
  • Put three new if statements, similar to the ones that check for last.fm and facebook, that check if the link goes to this blog, the ACP or the Wesnoth Journals. Then set the class according to that. The way the plugin is setup, it does not assign the class depending on the feed url bur rather according to the current link url. This means that you cannot use feedburner as your feeds address as it will never trigger an if statement[1]. I actully find the way this is handled a bit weird as it would serve much better to check the feed url and assign a class, rather than check the current link. I’ll have to check if that’s actually feasible…
  • Commented away the if statements for the first three feeds. I’m using the custom ones instead now.
  • Manually set the colour of the last two feeds within the plugin. For some reason even though the php call takes the variable I’ve set in the plugin configuration page (I can see it in the source code of the page) the colour is not being used and the text stays black. Weirdly enough, the background colour is changed well enough and the “blog feed” works just fine.
  • I didn’t want all my delicious feeds to be posted because I seem to be doing an awful lot of them. I prefer to log only the ones that signify my comments for which I use the mycomments tag. Fortunately I’ve discovered that you can use a del.icio.us tag by using the form: username/tagname
  • Created a new page template and inserted the php code there.

All-in-all, the plugin seems very promising and it already seems to work fine for me. However it does seem quite error-prone and lots of people most likely won’t be able to use it yet. Fortunately this will be fixed in the short future.

Now I just have to see if I can add more stuff for it to track.


About this entry


Comment Quickly

I’ve just discovered a neat little service that allows readers who want to rate an article to quickly rate it.

I’ve now spent the last hour hacking it so that it integrates nicely with my site so currently you should see it on the single post page, on the sidebar. Hopefully this will allow people who don’t have anything specific to say on the post to simply press a button and label it as cool, insightful or fun (or on the opposite, boring, bad or just dissagree).

It should also embed itself into my feed but for some reason I doubt it will work. Oh well, we’ll just have to see ;)

Unofrtunately from the limited time I’ve used it, it seems that their servers are severely overloaded so the script most often than not does not appear at all, and when it does, it tends to appear last (after all the items in the page have loaded).

I’m still wondering where to place it as it is. By placing it on the sidebar, it means that you might miss it after you finish reading. By placing it on the bottom of the post, it’s very easy to see but it also does not merge as well as I would have liked with my site :-/

Opinions appreciated.


About this entry


OpenID

I’m trying to make this blog OpenID compatible through the wp-openid plugin but I seem to be running into some problems. If you try to submit through the OpenID field, let me know of any problems


About this entry


Dynamically expanding single-post sidebar

Yay, I’ve now managed to do something I always wanted for my site. It always bothered me that when I wrote a lengthy blogpost, the right side of the screen always stayed empty when you scrolled down. Unfortunately I did not want to just chuck a few random items to expand it as it would mean that even when I wrote a short post, the sidebar would draw the post down which would have the unfortunate results of making the reader scroll down too much to read the comments (as well as look ugly)

After I used the FSD Sidebar I thought to myself that I really should find a solution to my dilemma. Initially I though to use different post templates and then just select one depending on how lengthy the post came out. Unfortunately, after I created the first, I discovered that WP does not support different templates for posts but only for pages. Unfortunately I could not find a plugin to activate this functionality. This was a bit unfortunate but I didn’t give up.

I went for my second idea: To have the single-post sidebar expand downwards with more items depending on the word count of the current post. I looked around the documentation for a way to collect the word count of a post but nothing was built in WP. Fortunately a short Googling led me to the page of someone who created a plugin exactly for this reason. Perfect!

Now I only needed to figure out how to use a php statement so that the sidebar does this expansion. Unfortunately since I don’t have any php skills to speak of, I turned to the nets again and fortunately it was easy to find what I needed. Unfortunately this statement does not accept an actual sidebar item within the brackets {} but a quick look at other themes informed me to the use of <?php if() ?> and <?php endif(); ?> statement. I still don’t know exactly how to use it properly but I did manage to make it work for me so all’s well.

All in all what I did is test if the wordcount is over a specific limit and then insert the item between the if and endif. Use four of these statements for increasing wordcounts, and your sidebar will expand only when you write an appropriate number of words. Of course this doesn’t take into account pictures or videos, or even different screen resolution that might change the size , but I don’t know if there is a way to test this unless I start checking their resolution each time and changing the word count needed…hmmm…

Ack no!


About this entry


FSDaily Sidebar

It was proposed to me by a member of FSDaily to add their new sidebar to my site. Apparently a few of my posts have hit their front page and that drew their attention :)

In case you don’t know what FSDaily is, it’s a nice digg-clone which focuses on free software issues. A good alternative since now that digg is heavily sponsored by Microsoft there are fears of conflict of interests (and also digg has become way-way to popular imho).

So I said, why the hell not and dived in. I didn’t want to put it in my horizontal sidebars above and below but thought that this might be the perfect candidate to fill up my empty sidebar on single posts. Unfortunately the way the theme is formatted, it means that when I write something long, there is nothing to see on the left other than the initial information above. I was thinking of a way to fill this and as luck would have it, I got this proposal.

I think I will create special page template that I will use for short posts and in there I will not put anything in the sidebar. However on longer posts it would be worth filling that lonely and empty part with something. Perhaps I should diversify even more and create different page templates for different content. For example, on pages where I talk about religion, I could put the atheist blogroll, and on the ones I talk about Free Software, I can have the FSD along with other related stuff.

Still, I will need to ponder on this. The best thing to do would be to widgetize my single-post sidebar and have it easily updated. I just need to figure out how to widgetize.

Oh, well. Tell me what you think ;)

PS: It is ironic that, had I left this post in the original version, you would not not able to see the sidebar on this page. This is because I’ve recently modified my theme (I’ll write about it later) to dynamically expand the sidebar items depending on the word count of the current post. Unfortunately since this was a really short post and in order to see the FSD item you need at least 400 words, it stayed invisible. My solution? Write this post script ;) . As a matter of fact, I needed a post script with at least a 100 extra words which easily makes this the largest one I’ve ever written :D


About this entry


Comments and stuff

So I’ve put a two new tricks on my comment forms.

The first one is that you can now see a preview of what you are going to post. Just write your text and press the preview button and you should see it below. No more orthographical or html errors ;). This was done via the AJAX Comment Preview plugin. It needed me a little css tweaking in order to get it to display as I need it but fortunately I was able to find how to wrap the preview so that it fits with the normal comments.

The second one is the threaded comments option which is done through the plugin with the same name. Although at the moment you can have only one thread per comment, this might make it easier to follow the discussion in case it starts to derail (although I will admit that I don’t have so many commenters). The nifty addition to that is that the author of the comment will now receive an email notification when someone replies to his comment. The bad thing is that you can’t unsubscibe from that but given the low number of comments I get, I do not think that would be a big issue. You can still use the subscribe feature as well, but since this will inform you of every subsequent comment in the thread (even if you do not follow it anymore) most people don’t use it.

This plugin needed me even more time to get right as I needed to format the thread correctly and also test if more than one thread is viable. It is but currently the comment box is screwed on the second comment so I need to work on the css part of it. Until then I’ve enabled only a single thread replies.

One last update is that I expanded the comment field in order to give you a bigger view of what you are writing. I always found the one I had before a bit too small.

I think I’m now going to enable these on my two other blogs as well ;)


About this entry


Spam-b-gone

Finally I seem to have managed to find the correct combination of WP plugins to stop spam from even logging a comment. Initially I had only Akismet, which, although good, logged the spam comments only after they were enterred and as a result my Popularity Contest plugin was affected which forced me to manually recount comments in order to fix the values. Bad Behaviour helped considerably but spam comments still kept avoiding the filter and thus bogging down my count. The latest one I tried was bcSpamBlock which appears to work admirably along with my other two spam blockers. For 2 weeks now I have not had a single successful spam comment logged in Akismet.

Finally…


About this entry


Pluginess Updateness Goodness

So I’ve decided to go and update all my plugins now that WP2.3 is good enough to inform me that they have newer versions. All in all I updates Akismet, Popularity Contest, Wordbook, WordPress Database Backup, wp-cache and WPG2. Some of them didn’t make much of a difference but a few had notable improvements.

Popularity Contest actually now works with WP2.3 and it also seems to cooperate nicely with wp-cache as well, something that in the previous version required a modified version. Unfortunately for some reason my most popular posts per category still do not seem to work so I’ll need to investigate this eventually.

WPG2 seems to have achieved v3 while I was not looking and fortunately it seems to be working much better now. As part of the installation process it created a new page called WPG2 which surprised me and my old “Gallery” page stopped working. Fortunately that could easily be fixed by deleting the old one and changing the name of the new one. It still probably needs more configuration but I’ll get to that eventually.

I was thinking of upgrading to the hacked version of UTW but it seems to require double tag posting so for now I think I’ll wait a bit yet. Perhaps I could use the importing function of WP but the idea scares me a bit. If it isn’t updated soon, I may just switch to other things to see if it works. So FYI, tags are still off

Now if only I can figure out why the scrolling in the ACP site in FF in Linux is so slow…

and if it wasn’t so damn cold as well…


About this entry


Broken Popularity

Hmmm, it seems that a part of the popularity contest plugin has broken too much for my limited coding capabilities to fix. I tried modifying a few entries but it did not work very well. Oh well, I’ll just wait until the newer version. Until then, just don’t expect to see the most popular posts by category ;)

I just hope that the version of the plugin I am using will be updated accordingly or at least that the original author will take this opportunity to implement the changes Richard made so that it can work with WP-Cache from now on.


About this entry


Lost categories

Ok, I think I know what has happened with the upgrade to 2.3. Apparently, my wp_categories table has been renamed to wp_terms and nobody bothered to update the WP knowledge base about this little fact (at least not yesterday that I was looking for it). Good job![1]

I guess something like that must have happened since I was looking at my MySQL tables and I got a bit panicked when I noticed my wp_category and wp_post2category tables missing. I upgraded another WP installation I have for testing and noticed the change.

Now, for my problem with the “Zoulapia” error (which is part of my modified theme), I’ve managed to find the solution myself. I just needed to change the following in the function call.

("SELECT cat_ID FROM " . $wpdb->categories . " WHERE cat_name='" . $hemingwayEx_options['asides_category'] . “‘”)

to

("SELECT term_ID FROM " . $wpdb->terms . " WHERE name='" . $hemingwayEx_options['asides_category'] . “‘”)

And you can see it worked :)

Now I need to find out how to modify the popularity contest plugin so that it can search in the correct table when taking the popular category :-/

Oh, also the 2.3 feature that supposedly would use the previous tags you had, did not work. UTW has a (apparently) scary function to import them to [tag]Wordpress[/tag] db, but I’d rather wait a bit for that.

[1] UPADE: It seems they did mention it here


About this entry


Ach scheisse!

I just updated my WP installation and things did not seem to go that well this time :(

You will probably be able to see that something is wrong as the new installation seems to have changed the WP categories table name and now one of my plugins that depended on that as well as a feature from my theme stopped working. Now I need to figure out in which way to fix it :( Probably that will mean editing the relevant plugin and modifying the table it is looking for :-/

Oh well, at least it seems to have some shiny new features (like the notification for updates). It supposedly supports tags by itself (even using the old tags I had) so, supposedly I won’t have to use to UTW plugin anymore and this post is a relevant test to that as well. However the tag functionality does not seem as good as UTW’s (missing the list of tags etc) so it remains to be seen if it is workable.

I was initially a bit wary of the new version because of what I read it transmits to the WP servers when checking for updates, but this time I decided to leave my tinfoil hat on the side and go ahead. Seeing the results, perhaps I should have waited until the plugins were updated accordingly.


About this entry


Facebook, bitches!

So here I am in Facebook now. I was never much into social sites (I pretty much loath Yourspace) and I don’t know how much this fad will last me but I’ve created a little profile and started enriching it with pics and vids and group memberships and shit.

Initially it all was so that I could help out with the Non-christian group but then I decided to start an ACP group as well and things went quickly downhill from there. Now I’m at the point where I’m spamming all my friends to join so that I can tag their faces with their name ;)

Even this post is a tribute to this monster of lost time as I’m actually trying to see if my wordbook plugin is working since it decided to make my life a bit difficult by not being configured as a good little plugin.

Anyway, y’all come and join now and then add me as a friend. I’ve got pictures with your ugly mugs around that I need to classify. If you are already there and are using nifty application, let me know of any good ones that I might like. Cheers!

Oh, I’m also posting this to the Planet LGU since we have a little group in there as well that you might want to join.


About this entry


Αυτόματη αναβάθμιση

Είναι επιτέλους καιρός να κάνω μία αναβάθμιση του Wordpress και αποφάσισα να το κάνω με την βοήθεια ενός πολύ καλού plugin που ανακάλυψα μέσω του Wordpress GR.

Το δοκίμασα ήδη στην δοκιμαστική εγκατάσταση μου και δούλεψε μια χαρούλα, αλλά το πρόβλημα είναι οτι η αυτή η εγκατάσταση είναι λίγο παλαιώτερη καθώς και πολύ πιο γεματούλα. Γενικά τρέμει το φυλλοκάρδι μου διότι ακόμα θυμάμαι τι τράβηξα την προηγούμενη φορά και τελικά αναγκάστηκα να εγκαταστήσω καινούργιο theme (Όχι οτι το μετανοιώνω ή κάτι τέτοιο)

Ήδη έχω φτάσει στο 3ο βήμα. Τώρα βαθιά ανάσα και…

Update: ΟΚ, τα κατίφερα! έκλασα μπανάνες όταν η MySQL απο πίσω άρχισε να κλαίει και οι σελίδες να μην φορτώνουν αλλά σύντομα ανακάλυψα πως ήταν μια ατυχής σύμπτωση. Ο σέρβερας που με χοστάρει για κάποιο λόγο τα ψιλοέπαιξε και ούτε την σελίδα της Dreamhost δεν μπορούσα να ανοίξω. Ευτυχώς τα πράγματα φαίνεται να επανέρχονται σιγά σιγά στο κανονικό, και η αναβαθμισμένη σελίδα μου δουλέβει κανονικά :)

Επίσης βρήκα και την ευκαιρία να γραπώσω μερικά ακόμα plugin που μου φάνηκαν χρήσιμα. Είδομεν


About this entry


Damn spam!

I am annoyed. I thought I was mostly free of the ravages of spam after activating Akismet and Bad Behaviour but it seems that there is one thing that is still affected by them and that is the Popularity Contest Plugin. Unfortunately even though Akisment is good enough to grab the spam after it’s been posted, the popularity plugin still logs the Wordpress call and counts the comment. As a result I see posts rising to the top when they have no reason to do so and Populatiry Contest reports 50+ comments while there none (they’re all caught).

Argh! So annoying…

Now I have to find a way to reset the count for these particular posts and hopefully get a better version of Bad Behaviour that will be able to stop more [tag]spam[/tag] bots before they have a chance to post.

UDATE: Fortunately the author of the plugin anticipated this and provided a handy button to recount the comments (I initially did not push it because it said “reset”). Popularity is back to normal now. Eeeeexcellent! :)


About this entry