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
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
$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 :
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
Posted in : Silly O'clock quotes
Posted in : Spam Trap
Top challengers, all of whom played 200 games or more
.... You'd think they'd get the hang of it by now :|
| IP | Joined | Last played | Games played |
|---|---|---|---|
| 200.88.223.98 | 7:46 - 6th Mar | 13:26 - 22nd Mar | 836 |
| 220.226.63.254 | 21:20 - 10th Mar | 13:08 - 22nd Mar | 549 |
| 82.146.57.30 | 0:59 - 19th Mar | 23:43 - 31st Mar | 537 |
| 85.185.36.133 | 21:20 - 15th Mar | 12:38 - 31st Mar | 497 |
| 66.192.6.131 | 5:30 - 9th Mar | 9:34 - 31st Mar | 479 |
| 89.149.202.214 | 9:08 - 1st Mar | 15:23 - 28th Mar | 423 |
| 82.146.57.48 | 12:04 - 6th Mar | 23:55 - 18th Mar | 363 |
| 220.226.63.242 | 2:19 - 8th Mar | 6:36 - 21st Mar | 302 |
| 220.194.47.120 | 3:42 - 3rd Mar | 20:10 - 30th Mar | 300 |
| 220.181.31.44 | 13:04 - 15th Feb | 7:51 - 8th Mar | 240 |
| 61.155.41.35 | 12:56 - 1st Mar | 9:17 - 23rd Mar | 228 |
| 60.217.227.135 | 20:19 - 2nd Mar | 7:29 - 7th Mar | 224 |
| 85.214.77.184 | 9:29 - 10th Mar | 1:36 - 30th Mar | 201 |
March was the first full month that Hang The Wankers has been running and as you can see from the results on the right the competition was fierce, with the top 13 contestants playing a total of 5,179 games ..... all of which they lost.
Now I don't know about you lot, but if I was a spammer I'd probably think " ohh, I don't appear to be able to spam that blog, I know, I'll save my resources and spam someone else instead ", and I'd like to think that I'd come to that conclusion waaaaaaaaaaay before the 200th time it told me to take my spam and shove it up my arse ...... so what does that tell you about the intelligence of these players?
Now, before a load of spammers leap to their own defense and point out that they just play a game of numbers, lets take a look at those numbers. In total there were 27,701 games played, all of which they lost. On average each contestant played 4.8 games, all of which they lost. The actual number of contestants that played 4.8 games or more was 815. Between them these 815 geniuses played 20,680 games, all of which they lost ..... are you starting to see a pattern here?
The simple fact is, if I got told to shove my spam up my arse 20,000+ times I'd like to think I'd start to get the message, but not these guys, they appear to have problems understanding. So, let me try and make it a smidge clearer for them.
Somehow I still don't think they'll get the message, so I might have to add some new twists to the game to see if that encourages them to activate their brain cell ... I'm fairly certain that they'll hate the new rules ;) ..... to be fair though, here's a warning ......
and you'll still get told to shove it up your arse :|
Anyway, I think it's time that I meandered off to add the new rules to the game,
¥
Posted in : Silly O'clock quotes
Posted in : Plugins & Widgets
I finally found the time to finish off the nested comments plugin. If you fancy having a pre-release play with it you can find it here. Please note : it has a known problem - when you preview a comment it "forgets" which comment it's a reply to. This is caused by the fact that the core redirects through htsrv when creating a preview and doesn't pass on the plugins parameter. I'm working on it ;) *solved : zip file update 12th March*
Unlike most of our plugins this one also involves some code in your skins _feedback.php, not a lot though so don't worry. First find this segment of code and add the new bit :-
<?php
$CommentList = & new CommentList( 0, implode(',', $type_list), array('published'), $Item->ID, '', 'ASC' );
[color=red]// Nested comments part 1 of 3[/color]
[color=red]$Plugins->call_by_code( 'amNestCmnt', array() );[/color]
The next piece of code can go anywhere in the comment loop and will spit out a "reply to this comment" link
<?php
// Nested comments part 2 of 3
if ( $Item->can_comment( NULL ) )
{
echo '<p class="replyTo"><a href="'.url_add_param( $Item->get_permanent_url(), 'am_nestCmnt_reply_to='.$Comment->ID ).'#bComment_form_id_'.$Item->ID.'">Reply to <span>comment '.$Comment->ID.' by </span>'.$Comment->get_author_name().'</a></p>';
}
?>
The final bit of code is just a demonstration of how to use the comment depth to indent your comments
// Nested comments part 3 of 3
<div class="bComment"[color=red]<?php echo ( isset( $Comment->depth ) ? ' style="margin-left:'.( $Comment->depth * 2).'em"' : '' );?>[/color]>
And that's pretty much it. The plugin should work in all 1.8.x and 1.9.x versions, let me know if you manage to break it ;)
¥
Posted in : Spam Trap
Other top challengers, all of whom made over 100 attempts
.... damn, that's dedication for you
| IP | Joined | Last played | Games played |
|---|---|---|---|
| 220.226.63.254 | 18:36 - 15th Feb | 23:39 - 28th Feb | 266 |
| 220.181.31.44 | 13:04 - 15th Feb | 23:58 - 28th Feb | 181 |
| 89.149.202.214 | 13:01 - 23rd Feb | 5:18 - 28th Feb | 175 |
| 61.120.200.163 | 16:03 - 16th Feb | 20:34 - 21st Feb | 135 |
| 61.55.135.167 | 0:25 - 20th Feb | 10:12 - 23rd Feb | 130 |
| 203.82.55.26 | 16:21 - 16th Feb | 22:14 - 28th Feb | 117 |
| 218.59.175.39 | 22:44 - 15th Feb | 22:12 - 28th Feb | 114 |
I bet yer all dying to know how my "Hang The Wanker" game is going, so here's a swift update with Februarys results. These results only reflect a partial month though as the game didn't start until the 13th : In total there were 2,212 wankers who decided to participate, making a total of 10,653 attempts to win the prize ...... they all failed ..... bitch huh? Of course the number one challenger was 81.177.14.26 who had 606 attempts before I decided to ban their arse from the server completely, a game's a game but this tit just takes the piss.
Whilst all this looks like just a bit of fun it does have a serious side. Every single one of these hits that have been stopped have been shown a "piss off you wanker" message which is about 140 characters in length. If they hadn't been stopped at the door then each one of them would have involved the whole of the evocore being loaded, several database hits whilst it struts it's stuff, and then the bandwidth of sending the page to a wanker ... all 50,123 characters of it. If you multiply those figures up, you have a bandwidth saving of 532,468,899 characters alone ( just over half a gig :| ). God knows how much cpu/mysql resources I've just saved as well.
Now I don't know about you lot, but personally I prefer to use that half a gig of bandwidth and the associated cpu and mysql resources to serve up my blog to the twisted few [i]that actually read it[/i]! .... wierd or what? Don't get me wrong, I have shedloads of bandwidth going idle, and the cpu is hardly breaking into a warm, never mind a sweat, as my blogs pretty much all on its lonesome on this box, but I begrudge wasting any server resources on spammers ..... unless it's to play games with them ;)
Anyway, I think it's time I wandered off and added some new rules to the game so that the spammers don't get bored ....
¥