MyBlog RSS Trouble
Posted on May 07, 2009 by james2 in joomla , components
If you're interested in hiring me for a project, Contact me for more info.
Posted on May 07, 2009 by james2 in joomla , components
On one of the sites I work on, Azrul's MyBlog component is utilized for the site's blogging. Recently, one of the users informed me of the fact that the feed wasn't working. Upon closer inspection using a feed validator, I realized that what was being spit out in the feed was nowhere near what should be in an RSS feed. Instead, the feed URL seemed to be spitting out an XHTML valid web page.
After some digging in the MyBlog forums, I came across a few users who suggested that it might be other junk in the URL causing the problem. Taking a look at the current URL, it looked something like this:
http://example.com/index.php?option=com_myblog&Itemid=120&task=rss
Nothing specifically suspicious about this. Just for kicks though, I tried removing the "&Itemid=120"bit from the URL. Low and behold, it suddenly validated.
Now that I knew what the correct URL was, I had to change the URL that was in the MyBlog toolbar and the RSS URL that was picked up by the browser. To do that I had to dig into two files.
First up, the 'Feed' link in the MyBlog toolbar. To change this, I first found this file:
/components/com_myblog/templates/_default/toolbar.tmpl.html
On line 18, look for the following piece of code:
<.li class="toolbarFeed"><.a href="<.?php echo $toolbar['rssFeedLink']; ?>">_MB_FEED<./a><./li>
...and replace it with this (without the '.' in the opening and closing tags):
<.li class="toolbarFeed"><.a href="http://example.com/index.php?option=com_myblog&task=rss">_MB_FEED<./a><./li>
That essentially hard-codes the correct URL into the link. The next task is to change the link that MyBlog spits out for browsers to pick up on. To do that, I tracked down this file:
/components/com_myblog/task/base.php
On lines 160 and 161, you'll see the 'if' part of the RSS URL function that deals with the 'Itemid'. This may be useful to some, but it wasn't to me, so those two lines got completely commented out. What I found out that doing this will do is that it will add the "&Itemid=xx" to the end of the RSS URL, which apparently still works for feed validators and RSS readers.
As you can see, both fixes are hacks to the core of the MyBlog component. Hack at your own risk, and don't forget to back these files up when you update the component in the future.
Overwhelmingly, the solo Freelancers out there tend to present themselves as a group: We can provide this or that... and they've found that it actually improves business. Their reasoning is that it makes the person seem less susceptible and more professional. Case in point: companies don't have sick days while individuals do.
Do you know what they said was the only time that a Freelancer should admit to being solo?
When they were directly confronted by the client. And even then, only about half of the responses said that they'd be honest with their clients.
Just so there is no confusion, I am a solo Freelancer. I work one on one with my clients. If you have a question, call me or email me. That's how I work. However, I am a big believer in delegating and playing to one's strengths, so if there is something that a client of mine needs, I have a team of go-to people that can help me deliver what the client needs in less time and for less money. But it will still have my stamp of approval on it.
So that's where I stand. I prefer honesty in life and in the business place. I don't think there's enough of it out there and all that does is lead to clients who are suspicious of their service-providers and an undercurrent of distrust in most business relationships. I sincerely hope that doing business with me in whatever capacity I can serve you will be an honest and open setup where we can both trust one another. If you ever have a question, you know how to find me. :)
I had a meeting today with a couple of guys who have a great idea and the willingness to see it through. I'm not sure if it was their excitement or their vision that I enjoyed, but whatever it was, I left the meeting feeling energized. There's something in the way that people with big ideas talk about their ideas that make them seem so plausible and achievable--almost like you could reach out and make it happen. In a way, the confidence they have in their ideas gives me a greater confidence in my big ideas too!
So, if you're a person with big ideas, I'd love to talk to you! Even if there's nothing I could do for you other than be a sounding board for your ideas, I'd love just to sit around and listen to you talk for a while about your big ideas. In the long run, it will probably help me achieve my big ideas!
Since IE6 is so amazingly non-standards-compliant, since it refuses to live by the rules of other browsers, since it interprets code for only the good of its creator's web content, we poor developers have had to learn a trick or two.
Because IE6 doesn't either recognize a few crucial CSS properties, or because it does something completely different with those properties, we've had to learn our way around in spite of its misgivings. We've had to come up with genius little hacks to make IE6 submit to our design. We've had to develop workarounds and alternative methods to things that should be a breeze to accomplish via CSS.
So, all of you developers out there cursing under your breath at an IE6 bug, take a step back and realize that it's making you a better web developer and problem solver. Let's all go give IE6 a hug.
Ha! Hardly.
While the above may all be true, I fully hate IE6 as well and look forward to a completely IE-less future.