Archived : Techno Babble

This is the archived version of my b2evolution code blog.
If you require any help regarding b2evolution then
visit it's support forums

You can find my current blogs here
Code : {@link : WafflesOn}
Personal : {@link : InnerVisions}

The Blacklist

Posted on 30th Dec 2006 in : Techno Babble

There's been a few mutterings on the dev list about converting the blacklist into a plugin because, as it stands at the moment, it's a bit like a dictatorship that has no regard for who or what it tells to sod off and thats something that the members have had problems with for a long time. So I've decided to have a look at it and see just how feasible it is to convert it into a plugin for 2.0. This isn't something that's going to happen immediately as the blacklist is deeply intwined in the core, and just to seperate it will take a fair amount of work, to say nothing of all the new hooks that will be required (yay, dAniels gonna love me :|).

Apart from abstracting (geeky term for "put in another file") the blacklist into it's own plugin I'm also thinking of extending it's abilities. One of the main things I'm going to be aiming at is to make it differenciate between a member/editor/admin making a post or comment and a spamming wanker .... urm... visitor making a comment. I'm also looking at building in a whitelist and possibly reviving one of my old antispam hacks which checks for "flooding" by a url.

As well as all that I'm also looking into ways that blog admins can network individual installs so that they just need to add a url to a single install, either manually or by doing an evo update and have all of their installs update automatically. If this was done successfully enough then we could, at the very least, reduce the load on the central blacklist, or even get rid of it altogether!!

None of this is going to happen at any great rate though, in fact it might not happen at all, it's just something I'm looking into, but if you have any suggestions/features that you'd like adding then feel free to leave a comment on this post (or, if you don't want to register, send me a PM via the forums).

¥

Smiley plugin v 1.9.2

Posted on 30th Dec 2006 in : Skins, Plugins & Widgets

Well, this time the skin changes are my fault :p

For those of you running 1.9.2 who are using a customised skin, you need to make the following changes to _feedback.php to make the smilies toolbar appear :-

PHP:

<span style="color:red">echo '<div class="comment_toolbars">';</span>
        <span style="color:red">// CALL PLUGINS NOW:</span>
        <span style="color:red">$Plugins->trigger_event'DisplayCommentToolbar'array() );</span>
        <span style="color:red">echo '</div>';</span>
        // Message field:
        $Form->textarea'p'$comment_content10T_('Comment text'), T_('Allowed XHTML tags').': '.htmlspecialchars(str_replace'><',', '$comment_allowed_tags)), 40'bComment' );
        <span style="color:red">// set b2evoCanvas for plugins</span>
        <span style="color:red">echo '<script type="text/javascript">var b2evoCanvas = document.getElementById( "p" );</script>';</span>

Yeah yeah, so shoot me, at least you can have a smiley toolbar and smilies in comments without hacks now though huh?

If you're running 2.0 then look out for some groovy changes comming up with the smilies plugin, don't bother looking for them yet though as I haven't uploaded the new version ;)

¥

Yayyyyyy, it's gone live at last :D

Posted on 4th Dec 2006 in : Techno Babble

Powered by LinkCentre, coded by AstonishMe & hosted by Happily Hosted ........ http://directory.lycos.co.uk.....

Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-UK" lang="en-UK">
<head>
<title>Lycos Homepage&nbsp;&raquo;&nbsp;Directory</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="pragma" content="no-cache" />
<meta name="keywords" content="Lycos directory" />
<meta name="description" content="The Lycos directory is your source for the best links on the web" />
<meta name="author" content="AstonishMe.co.uk" />

:D

¥

Clean urls on windoze !!

Posted on 2nd Dec 2006 in : Hacks

Damn it would appear that I've stumbled across a way to get clean urls working on a windoze box. It requires a shedload more testing, but this is the gist of it.

1) Enable a custom 404 for your blog folder ( urm, there's probably summat in your ControlPanel to do it, or just hit IIS huh?) and point it at /[path to blogs]/index.php

2 )Create a conf/hacks.php with the following code :-

Code:

<?php
/*
* Extra Path ? On windows? :O
*/
if( !defined('EVO_CONFIG_LOADED') ) die( 'Please, do not access this page directly.' );
 
if( ( ! isset( $resolve_extra_path ) || $resolve_extra_path ) && is_windows() )
{
  $ReqPath = preg_replace( '#^(.+?):80([^?]+?)(\?.+?)*$#', '$2', $ReqURI );
  $ReqURI = preg_replace( '#^(.+?):80(.+?)$#', '$2', $ReqURI );
}
?>

3) Turn extra path on in admin ..... kinda helps

That's it, extra path should now work!

¥

Potential exploit

Posted on 30th Nov 2006 in : Techno Babble

It would appear that kiddie scripters are pissing around again. If you're running a b2evo blog I'd advise that you remove (or rename, whichever) /inc/control/imports/

They would appear to mostly just dump an index.html into your blog with their "I'm da nuts" tags, in which case just delete it (you may also need to reupload index.php), but they've also deleted a few blogs and left viruses in others.

You'll also want to check your folders for unknown or changed files and don't forget to change all your database passwords huh ;)

¥

*edit*

They've just released this security alert, I advise you read it

Playing with custom pages

Posted on 29th Nov 2006 in : Plugins & Widgets

As EdB points out in this post on the forums, lots of people want custom pages and there's no "native" way to do this with evo. So, I decided to have a play and see if it was possible to do.

I've knocked together a plugin that allows you to include files in a blog post by using a comment like this :-

Code:

<!--include my_page -->

The contents of that file are :-

Code:

<?php
  // yet another hello world :D
  echo '<p style="border:1px solid #ff0;">hello world from my page ...... '.rand( 1, 100 ).' is a random number between 1 and 100 ;)</p>';
  ?>

and here's the results :-

With a tad of abuse to the linkblog you could turn this into a bunch of custom pages that are shown in your sidebar, although you then lose your linkblog, but there's ways round that as well.

In it's current form this one's definately not for public consumption, so if you want to have a play with it then you'll need to register and leave a comment, or send me a pm via the forums.

I'm probably not going to go much further with this, although I might incorporate it as part of my linkblogPlus plugin

¥

Page archived : 6th Mar 2010
 

X