Only fill this in if you're a spammer huh? Your name :
Your email :
Your message :

Archives for: April 2007

Apr
23rd
2007

Playing with clouds

Posted in : Plugins & Widgets

Yay I got a Zeitgeist ........ whatever the hell one of them is .... personally I call it a search cloud, it's far easier to spell :| In the true spirit of OpenSourceSoftware I stole the idea off Whoo and decided to see how easy it would be to create a b2evolution plugin that did the same thing. It's probably taken me longer to write this post than it took to code it :p

How does it work ?

It's pretty simple really, the plugin scurries through your hitlog and finds all of the hits that have been flagged as coming from a search engine. It takes all these hits and meanders off to count them, grabs a beer and a smoke and then ambles back with a cloud ready to be slapped on your blog. If it's enabled then you should see a cloud below the first post on the first page of my blog, the font-size indicates how often that search term was used to find my tacky lil pad :D

If any of you fancy having a pre-release play with it then you can steal it from here (we've now released version 1.0 of the plugin on Sourceforge ), unzip/upload/install it and then add the following skintag to your skins _main.php

Code:

$Plugins->call_by_code( 'am_srchcloud', array() );

You can pretty much throw that anywhere in your skins main, even inside your post loop as it defaults to only showing once per page. There's a couple of parameters you can use :

  1. blog : spookily enough this is the blog ID that you want to show the cloud for. The default is to use the current blogs id. If you set it to 1 then it will show all hits for all blogs
  2. show_once : by setting this to false you can display more than one cloud, the default is to only show once

If you want to play with the styling then just take a root around in the plugins source and you'll see all the classnames it uses, you can even play with the html it produces to bend it to your will. The chances are that most of that bit will become params by the time the release version comes out.

That's pretty much it really. As always if you find any bugs or want to send me the odd million quid then feel free to leave a comment
¥

*edit* 29th April

This plugin has how been released on Sourceforge, unfortunately we forgot all about the help file so here's a quick rundown of all the parameters

*edit*4th May

We've now released version 1.1, which actually has a semi-useful helpfile ;) ... you can read all about it on AstonishMe

823 views and only 9 comments
Top ways you found my blog