Adding Tweetmeme to your Joomla site
Posted by: Qasim Virjee
on Wednesday, 30 December 2009
There are so many reasons to making your site easily visible on Social Networking websites and platforms - they raise general visibility and offer access to communities which may not otherwise find the information you spend time publishing in your posts.
Of course, one of the most agile word-of-mouth Social platforms on the web is Twitter and you may have recently noticed a pretty cool widgety thing people are using on their blogs/sites to include a 'retweet' link and counter of how many times a post has been tweeted - its powered by a site called 'Tweetmeme' and installs pretty easily on any website - whether using static html or a CMS like Joomla.
When you take a peek at the tweetmeme page containing the necessary embed code it may not be too easy to tell how to use it with your Joomla site - and though there's a couple of plugins/extension floating around Joomla, it may not offer the flexibility you require for clean theming/templating. However, there's an easy way to go about embedding this and all it takes is a small modification of the de facto embed code.
All you have to do is:
- copy the following code(s),
- replace 'http://mysite.com' with your own root URL and:
- replace 'twitterhandle' with your twitter handle (if you want reweets to automagically incude @yourtwitterhandle - you can opt to delete that line from the code otherwise.
For individual article template files (eg 'templates > your_template > html > com_content > article > default.php'):
<script type="text/javascript">
tweetmeme_style = 'compact';
tweetmeme_url = 'http://mysite.com<?php echo $this->article->readmore_link; ?>';
tweetmeme_source = 'twitterhandle';
</script>
For article list pages - like section or category template files (eg 'templates > your_template > html > com_content > category > blog_item.php'):
<script type="text/javascript">
tweetmeme_style = 'compact';
tweetmeme_url = 'http://mysite.com<?php echo $this->item->readmore_link; ?>';
tweetmeme_source = 'twitterhandle';
</script>
The trick then is to take this code and include it in the appropriate version of your theme's template files - Of course, you can see I've wrapped the code in a div called 'tweetmeme' so you can then add in some css for that div wherever you want in your template to style the tweetmeme widget. You can learn more about Joomla templates and the files which they can comprise of in the official documentation wiki.
Basically what we've done here is include some php to tell the embed code the specific URL for each post - so the widget works cleanly on individual article pages as well as displays showing multiple articles at once.
*You can see the widget in action here on this site above - just below the title of each post. Try it out and retweet this post to see how it works!
Another custom 404 error approach - JoomSEF
Posted by: administrator
on Monday, 23 March 2009
Out-of-the-box, Joomla 1.5 has pretty silly error handling pages - for times when a user hits your site to find a page no longer in existence ('404 Not Found') etc... A simple work-around I've previously posted about is to create a custom error page as static HTML.
Now, if you like to have your error messages presented to site viewers with the same look and feel as your website, a custom page outside of Joomla might be frustrating - everytime you change the layout of your site you'll likely want to edit that page and so on.
There's another approach; some semantic URL extensions can actually redirect those errors to particular content within Joomla. I recommend using JoomSEF - its a weird extension because of the partially-free (ie. non-GPL) license they've released it under, but you can download and install it for free and then make one edit to its code to remove a footer message created with the free version.
With JoomSEF, you can choose a custom 404 message by typing it directly into a field through the extension's admin side or by choosing a menu item already linking to a message page you've created. Plus, you can keep track of 404 messages to help streamline your site's navigation!
JoomSEF will make managing your site's error pages easy, and it makes it much easier to navigate your site by URL because you have more control over the format of URL writing rules than with Joomla's stock SEF URLs option!
Error page handling with Joomla 1.5 (403, 404 etc..)
Posted by: Qasim Virjee
on Tuesday, 20 January 2009
The new joomla handles errors differently, and there's been quite a bit of discussion about why this is, as well as whether the current solution works as well as it should. Mainly, this discussion stems from people being concerned about making their site uber-Search Engine Friendly.
Now, I have my own personal gripes with some people who spend too much time throwing the 'SEF' acronym around [ie. paying more attention to garnering machine-love than making their site relevant to readers], but out of the discussion comes an important mini-predicament; Joomla 1.5 uses an error.php file [stock URL: /administrator/templates/system/error.php] which resides outside of the CMS.
Error.php is the file which gets loaded when viewers cannot be presented the info they request (leading to 403 and 404 errors) - the default one is super ugly and sure to scare people away from your site at first glance; this is something to avoid and doing so is easy; you have to create a custom error.php and bung it into your front-end template's main directory.
I recommend reading the documentation on this approach and then looking @ the source code through your browser for a page on your site - then copying and pasting in whatever error message you want to replace the copy of that page you were looking at. Here on Why Joomla? you'll notice that I've thrown in the site's search form - so people can quickly keep looking for the info they wanted in the first place.
As we've just upgraded to 1.5 and done away with JoomSEF/OpenSEF; a quirky URL rewriter module, our out-of-box semantic URLs have changed throughout the site - so I'm sure some of you will come into contact with our homemade error.php soon :)
If you have other approaches to this problem, please comment!
Simple tip: SEO + semantic URLs = easier Google Analytics administration
Posted by: Qasim Virjee
on Tuesday, 25 September 2007
I was just cruising through a bunch of stats for some sites we run and got frustrated with the simplest thing...
...Joomla's inherent URL paths are really annoying when you want to move quickly through your stats reports and see how specific site content is reacting with your visitors - even the stock 1.0.x Search Engine Friendly (SEF) URLs aren't too intelligible to people despite making Google slightly happier. Things will change in this respect when 1.5 goes stable - its supposedly going to ship with a stock solution for human-readable URLs!! (yay)
So, until 1.5 goes stable and we all tackle site upgrades, I highly suggest installing a 3rd party extension to handle human-readable URLs... they'll make your site return in Google better plus make your stats data mining exercises less laborious.
Lots of people use Artio JoomSEF and a bunch of plugins for it are available to make it work with other extensions but I've got years of experience with OpenSEF and highly recommend it for simple sites that mainly deal with stock Joomla setups for publishing/content management. In fact, the long-time stagnant status of the OpenSEF project's been kicked in the britches and its been renamed as NuSEF ...
damn you, infernal Item IDs!!!
Posted by: Qasim Virjee
on Tuesday, 20 March 2007
One major criticism I have of Joomla 1.0x is that you have to use a 3rd party component to enable and control semantic URLs for your website.
The native Search Engine Friendly URLs that Joomla can produce are pretty good mind you - they're short, follow your section/category structure and are read well by Google. That's great but its often still necessary to tell someone a URL that they can remember etc - personally, I've been using OpenSEF for quite some time on a number of sites.
I must say, OpenSEF's pretty good - and there are arguably better packages available these days but I'm still annoyed at how we have to turn SEF on in Joomla *and* install some extra program to get nice clean human-readable URLs, which might break with funky characters in the article titles etc (the reason why JoomlaFeed has gone back to using plain old SEF URLs) - something which happens often when you republish content from external sources.
Anyway - I'm really excited for a big change in this area: Joomla 1.5 is getting far more accessible and Jinx has recently spent 6 weeks overhauling the whole URL writing architecture of the CMS - resulting in lovely structures like this:
http://localhost/joomla15/the-news/joomla-overview/faq.html
Ahhhhhhh - yes folks, its the death of Item IDs!
SEO-no!
Posted by: Qasim Virjee
on Monday, 20 November 2006
Although it was just launched a few days ago, the traffic to Joomla Feed has been pretty good - and the feedback even better! It seems that the Joomla community, like anyone I'd expect, enjoys reading aggregated news.
Personally, I've been using the site a couple of times a day to see what new extensions have ben released as well as catch up on a couple of news and blog sites - all in one place. Lovely stuff.
I know its monday but I was surprised to see the site's Google Analytics stats just now - only about 30 people have been to it today.. then I did some poking around.. somehow a Google search for 'Joomla Feed'doesn't return the site yet 'joomlafeed' brings it in as the top item!
I always assumed that Google would look for combined words in URLs automatically !?
Ah well, I suppose its time to actually put my SEO cap on and get into the META tags (surely the most tedious aspect of web development eh - making sure people can find your site? Well, that asides from making CSS work somehow in IE6!)
q./