Archive for the ‘Wordpress’ Category

WordPress 3.0 might have feed errors. Fix them!

WordPress 3.0 is the new current hip. Everybody is switching to the new platform while fearing crashes or great upheavals in the world of blogging. I’ve been a bit worried about all this for some days before taking the leap of the full WordPress 3.0 upgrade. Everything went on really fine until…

Errors through CommentLuv.

I was commenting on a blog I usually visit. When I activated its CommentLuv app, I was greeted with a “No last blog post found” error that got my eyes growing like saucers before starting squinting in pure disbelief, as if staring for 2 minutes at the error message would give me explanation. First thing I did was to check my RSS feed where I found a nice error on line 5 at column 6: XML declaration allowed only at the start of the document error. It dawned to me that the WordPress 3.0 update might have generated this error.

Recurring feed error.

After some research, there seems that this type of error is frequent in WordPress, whatever the version. So I went out to try several feed correcting plugins for WordPress but whatever the solution tried (even that of clearing all WordPress files from blank lines) it didn’t seem to be able to clear the errors out. According to all that I read, it all comes from some trailing blank lines in the feed code. Having tried everything in vain, the only solution to this was to go back to the good old hand coding.

The fix.

Fixing this error was not an easy task but I found an article over at www.w3it.org. The code is fairly simple and its implementation is easy. All in all it takes the feed generated by the WordPress core and clears it all up from any blank line held around.

What you need to do is to open this file:
wp-includes/feed-rss2.php

Open this file in a text editor and look for this line:

header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
$more = 1;

Just underneath it add this code

$out = ob_get_contents();
$out = str_replace(array("\n", "\r", "\t", " "), "", $input);
ob_end_clean();

That’s all! Short and sweet. This code clears all empty lines and hey presto, your feed is restored.

Other feed files?

You might be asking why the wp-includes/feed-rss2.php file? Just because it is the one that is really used in the WordPress feed. You can however do like I did, I opened all the other feed files and stitched them up with the same code.

A final word.

What came out of my perusals over the web on this issue is that the “blank line” error can be generated about anywhere in all the WordPress core or theme files. The current solution corrects all of these in one go but calls for hacking the feed. You’ll find different sources, hacks, solutions or what not on the subject out there and each might have a different root so take a good look at all the possible bugs before testing any solution around.

Beware of blogging burnout.

Preparation is the key to success on a blog. Before launching a blog, one has to sit down and think about all the necessary steps to building one’s blog: niche, domain name, strategy, SEO, networking etc. With time and the growing experience on blogging and community building one can now have all the tools for launching a full-fledged successful blog from day one. Pro tips sites are now budding over the web such as Sam’s Web Guide and Icy Tips. One of the topmost tips is to be prepared and, in this field, having a well prepared number of posts even before launching a website is a win win strategy.

After the launch.

I’ve been blogging for nearly 6 years now starting from a daily nonsense life blog on Blogger back in 2004. There was no real direction to that blog and it mixed work and daily life. I must say that life blogging was easy as I chatted away on anything going from my impressions on the way people made extensive use of tramways in Grenoble to my own personal discoveries in the art of Web Designing. Things changed when I started the Web Design Bureau of Mauritius some 2 years ago.

At that time there were lots of pro-blogging websites but I was not prepared as I would have been today. I made the mistake of not planning which explains the difficulties in publishing posts during the first months of this site’s existence. Then, ideas came and I took the pace. But one thing remains difficult to me: taking enough advance on posts to be published. I do spend quality time on the job done here and am a normally well organised person but constant upriver preparation is still not perfect on this blog.

Blogging burnout!

One of the worse things that can happen is blogging burnout. It is not the common “writer’s block”. It is real burnout. This usually happens when one tackles a field that one is unacquainted to or that one doesn’t really master. It can also sprout when too much energy has been put in the launching and preparation of a new blog project and then the whole thing is burnt out because all the subjects or the best subjects have been dealt with. Then, it becomes a real ordeal to manage the whole thing.

Some mistakes I made before.

Getting over excited over the number of posts – When I was a budding blogger, I got really excited over publishing more and more. Each time I had an idea I jumped on my computer and typed my way through my post. I was happy with the job and excited about the ideas I was coming up to. The problem was that, after a while, all the ideas looked bland. Why? Because I was in a certain mood at one time and the posts would have a certain feel and that feel would be here for 5 or 6 posts then change on the following ones. This translated a lack of consistency but, hey, those were the origins of the life blogs where you showed your mood.

Publishing too fast – Publishing too fast was a by-product of my blogging excitement. When you start out writing a lot of posts, you are eager to get a readership and collect the comments on your views. The major problem in that is that you have to refrain yourself from publishing it all. Some days I would be publishing the whole 5-10 posts I would have written in one day. What a waste! It was like eating a whole week’s food on Monday and eating nothing else during the week. Then what? BURNOUT! (short lapse but still…)

This also had the drawback of not giving enough strength to each post. Large traffic websites can go about publishing several posts a day but on smaller sites, this boils down the impact of each post and idea.

Writing long posts – Writing long posts is an art in itself. I happen to be a talkative person and found out you have to master the art of long posts before actually writing them. Readers’ attention-span is short, especially over the web. It doesn’t help to beat around the bush when there’s not reason for it. So keep the posts short until you get enough stamina to run the distance.

Let’s talk about this.

Have you ever experienced this flurry of post ideas and reached the red zone? What were the reasons? Has it impacted on your blogging life?

Note: even if I no longer maintain the other blogs and have closed them down it has never been a result of burnout.

MBC’s new website: a corporate failure?

A whole lot of talking is going on around the new Mauritius Broadcasting Corporation (MBC) TV/Radio website. It always is a major event when a major Mauritian company sets sails out for a new web venture and people can question and appreciate the job. Here, the great thing is that the tool used is WordPress which has now gone past the “blog” platform and has matured into a full grown Content Management System and even been awarded the Overall Best Open Source CMS award in 2009. That’s one good point but there’s a major “but” when it comes to the way the MBC managing board seems to have directed this project!

Corporate you said?

The said website is a corporate one, at least, it’s what is said on the main page title. I will not be going into an indepth analysis of the design and the website as well as its functionalities. The discussion between the webdesigner and the public is nearing trench warfare more than anything on Yashvin’s Blog with all the contradictions and accusations that go with such situations. I will not be adding to this!

My firm belief is that Mauritian companies need to mature in their use of the Internet and start working on online presence. They have to invest in development and user experience with indepth audits of user demands and conversion rates. This calls for a good deal of methodology, vision and professionalism. So my concern here is how can a huge thing like the MBC get involved in an amateur construction of its website.

Templating and project management.

To build a new website, objectives must be laid out, budgets (if any) calculated, but more important, the whole project must be managed with validation procedures, content improvement, calls to action and lead analysis. But what do we have here? A webdesigner who claims to have done the job for free by buying a template (Hello MBC managing board, don’t you even have some money to even pay for a template?) and modifying it to suit the MBC’s needs. And what does the poor chap get even with investing his own money into the project? Just a poor link to his website! This is pure slavery! The MBC might even be de-localising some of its own work to China.

So what’s the problem here? Having a webdesigner claiming high to having made just a template modification for such a big company means that all the steps required to make a real, good, managing board driving, visionary and high level website have been flushed down the toilet. All this has been boiled down to a template available to anyone and just modified. Do they care for their image? Do they have a communication & advertising department?

Amateurish and cheap.

The MBC is not the structure that bears the shiniest image in Mauritius and it would somehow have been logical that the directory board would have had the idea of making use of this occasion to buff it up but once again, the amateurs have hit home. The MBC is a leading Mauritian body and one would expect a site to its grandeur with a huge input in quality content. The whole system is heavy and loaded with glitches. Just one example, how many of you readers will ever read every word in this “About us” page. This is where the group should have had clear specifications in terms of content, design and wireframing. But none of all these are here.

An example of what “not to do”.

Overall, this whole project is a great example of how a major company should not be leading a web project. Specifications should be minute and written clearly. Each element should be made to maximise conversion and user experience. All this is done through thorough statistical analysis and user interview. Usability tests should be made to test each page, each way of delivering content and of the service and not just impose a template to any web designer. As sad as it might sound, the MBC managing committee has failed to make use of a great tool just to save money or maybe for some really obscure reason… who knows?

Changes in the way I blog.

I have to admit that I have been blogging for over 6 years now. I’ve had different types of blogs, mainly “life blogs“. Today, I maintain only this one. It’s not that the other blogs were not successful, they actually bore more traffic than the current blog, but as life blogging goes, too much information on oneself can be bad for the reputation. However, 2010 and especially the new version of WordPress are here to change the way I’m blogging on this site.

I never had real trouble in generating content. This blog’s main aim is to educate people on web design in Mauritius, so it’s never been aiming to become a high traffic one but I do take very minute care of it. Until now I had much problems in working in advance. Defining the editorial line was a day to day job. I read a lot on how to improve my blogging style mainly with great sites such as Nicholas Chardot’s sitesketch101. Though I won’t be doing all he recommends (e.g: I prefer generating content based posts rather than list posts), his idea-mapping techniques and tips to connect with visitors are great.

The greatest help I got though, and I’m currently testing it, actually comes from the WordPress core. I’ve been a WordPress user for more than 5 years now and one thing that always frustrated me was the use of scheduled posts. Over the past years, this option just ended with “missed schedule” errors such that I ended up not using it anymore. Then, surprise, this new version has this error corrected. And here it is. The mini-blogging part of this blog is now in full swing. The posts are written with practically a week’s advance and are published daily at 8 am (French time). Thanks to this new version, the way I blog is changing and I hope to reach new heights now.

Let’s talk about this…

Have you changed, are changing or planning to change your way of blogging? Are there any specific tools you use to emphasize on certain aspects of your blogging life? Do you blog on schedule or have a specific editorial line that respects a given timeline? Share your views with us!

What new year resolutions taught me on blogging.

We are currently in the whole “new year resolution” hype all over the place. People around us, and maybe even you dear reader, are telling everybody around that they/you have made the decision of doing this or that for this new year. All in all, it is a great idea to say all this, the prospect of success, the freshness of it all is like a backfire thrusting you forward in your new resolutions for… 3 weeks!

Problem.

There must be a problem for all those good resolutions to go down the drain. Each year we just list a whole bunch of enthusiastic goals that we drop over some weeks later. As a matter of fact, these are the same things that happen in the blogging world. People start out with an idea for a blog, get excited by the prospect, see how it works or not and drop the whole thing some weeks later. Priscus dealt a lot with the phenomenon on her blog.

What is going wrong?

Just like “new year resolutions” blogging is subject to some #epic #failure reasons that mix, mingle and mess everything.

  • Too many things in one go. Too many resolutions = too many parameters, topics or possible roads to follow.
  • Too much enthusiam in the beginning with a boost of energy which runs out quickly.
  • Sometimes, the blogger forces him/herself in the task. Bad, very bad. This is how you get disgusted with the whole thing. Not enjoyable.
  • The vagueness of it all. Resolution: lose 20 pounds. Great but there’s nothing that says how and through what steps.
  • Life interferes. In the same way that your everyday life will get in the way of allowing you to focus all the time on your resolutions, it interferes in your blogging pattern, be prepared to it.
  • Difficulty. Sometimes one tackles a really difficult resolution and find oneself facing a wall. This is intimidating and the whole thing is dropped

Solutions.

The analogy is quite clear here. So what can be done?

  • Tackle one topic and stick to it and only to this one for some time (like: every for a month) before integrating a new one and stick to both and so on.
  • Keep the juice flowing. Do not overdo things. 200 word posts are enough to begin with.
  • Enjoy doing it. This is the core of the chore. Find a topic that fires your passion, this is the only way of doing it.
  • You want to achieve something, draw your roadmap. Plan the job. Determine your publishing regimen. Be consistent in it.
  • Don’t let yourself get unbalanced by the various unexpected elements of everyday life. Its not dramatic if you can’t post everyday but you need to get back on your feet and carry on posting. By the way, never post apologies (“sorry for not having posted for so long”), readers hate whingerers.
  • Avoid the intimidating element. Start out with easy steps. As one masters one’s field, why not start by the beginning. Some introductory posts are easy to start with.

Improve the quality of Adsense ads.

The title might seem weird to you but let me expose the facts. It does happen that one decides to include Adsense on one’s site. That’s a good idea to base some revenue off one’s site. Trouble is that sometimes you just get some unwanted or completely unrelated Adsense ads on your pages. For example, when testing the Web Design Bureau of Mauritius in the first months, I used to get only a whole lot of furniture ads. When stepping into the detailed view of the site on Google Webmaster Tools, I found out that it was the word “Bureau” that was winning it. Weird to get “pawned” by one’s own site title.

It was necessary to find a parade to this and to improve the Adsense ads. There is a way and a quite simple one as it is. It is given in the Adsense user guide but, hey, like a lot of people, I did not read all online documentation I found as it was just for meddling around. The solution is just to tell the Adsense engine which is the main content of the page and the ads will be modified according to this content. To do this, you need to specify where the content starts and where it ends with these two tags in your code, the first one before your content and the second one after:

<!-- google_ad_section_start -->
<!-- google_ad_section_end -->

Once this is done, you just have to publish your page and the content will be used as a base for publishing your improved Adsense ads. These being closer to your content should be more interesting to the viewers, hence increasing the click rates.

Now for those using WordPress, you can code this directly into your templates or use this great plugin built by Jim Gaudet. It takes 2 minutes to install and it does the job pretty well.

Easy Adsense inclusion with WordPress shortcode.

Your new blog has been built. You have decided to run a WordPress blog and already have a lot of ideas and themes to talk about. Another thing is that you might want to make some money off your blog just for the fun of doing it. Chances are that you will be running Google Adsense on your blog. Why is that so? Just because Google is well known, adsense integration is fairly easy and “everybody else is doing it”.

The semi-problem.

Setting up Adsense on your blog is not a problem in itself. Once your theme is ready you just have to head over to the Adsense portal and create your dedicated ad group and copy and paste the code in your template (if automatised) or in a text editor to copy and paste in each of your posts. But did you know that there was an easier way of including your ad in your text? It is called WordPress shortcode.

WordPress Shortcode.

Basically, WordPress shortcode allows you to generate a specific piece of code in any part of your post without having to write the whole code. Those who are code learned will understand if I say that it is the equivalent of a PHP include or a Java import. Those who are not will understand if I say that it helps you write the equivalent of 10 lines while you’re writing only one word. This is an integrated behaviour of the WordPress core. So you don’t have to activate anything. You only have to have access to your template functions.php file. The easiest way to do this is to use your theme editor in WordPress: Appearance > Editor.

Adsense shortcode.

Once you have generated your Adsense code you just have to copy and paste it like this (this is my ad code, you need to replace the code starting with script):

function showads() {
    return '
		<div class="publicity">
         	<script type="text/javascript"><!--
			google_ad_client = "pub-7734054350163682";
			/* 468x60, date de création 05/08/09 */
			google_ad_slot = "4764339399";
			google_ad_width = 468;
			google_ad_height = 60;
			//-->
			</script>
			<script type="text/javascript"
			src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
			</script>
		</div>
';
}

Once this is done, just add this code under the function :

add_shortcode('adsense', 'showads');

Using it in your posts.

Now you’re done. Anytime you’re writing a post now, you can invoke your ad banner by just typing the shortcode between squared brackets like this:

[adsense]

This saves you the trouble of copying and pasting your adsense code everytime you want to make use of it.

How many plugins do you use on your blog?

Welcome to the Web Design Bureau of Mauritius new “Chit Chat” corner where there will be a lot of nonsense or senseless banter. I needed a part of this blog to be more open to diverse subjects that were not really Web Design oriented. This will also let allow me to get some flow out on other interesting things like WordPress and blogging in general.

Talking about blogging, I have always been a fan of the TV series “How I Met Your Mother” and a new (French) blog has been launched for other fans. So be sure to check it ‘coz its gonna be legen… wait for it …and I hope that you’re not lactose intolerant ‘coz the second part is DAIIIIRY…

On another level, and maybe a more intellectual one, I’ve just installed the brand new RSSCloud plugin to this blog. The idea of this plug in is to give real time RSS updates while it needed some time for propagation before. While installing it, I also upgraded a few of my usual plug ins. I never really had a close look at the number of plug ins enabled on my sites but I was baffled to find that my whole system ran on a massive 25 plug ins chart.

Well, it does look massive to me as the more plug ins you add, the slower your site might get. I’m sure I’m not a record holder in those terms. So, how many plug ins do YOU use?