Ritchie Swann

RSS

Don't OpenSource developers believe in regression testing?

Sorry, it's Monday morning and I fancy a bit of a rant. I feel like I should be contributing to the Linux Hater's Blog than here, but what the hell.

I recently helped a site upgrade from phpBB 3.0.5 to 3.0.6 to fix a specific bug with polls that the users were having. Now, I would assume, given the difference in version numbers, that this would be a minor upgrade containing bugfixes. But no, there's a whole slew of new features, none of which I need, and a number of features simply don't work anymore. Didn't anybody test this?

To quote directly from the phpBB site:

"Active topics doesn't work anymore after updating!
Actually, it is now working even better than before. "

Now, I don't know about you, but a rash of users complaining that "I click on the 'View Active Topics' button but I can't see anything - waaah!" doesn't really qualify in my mind as "even better than before". Yes, it's a FAQ, it's easy to fix and I didn't waste too much time - but if it was that easy to fix, surely it would have been preferable to defer to the previous release's behaviour as a default rather than just break it.

Custom templates is a similar story - the design of them has changed between 3.0.5 and 3.0.6 meaning that none of my old templates work anymore. There doesn't seem to be a satisfactory answer to this on the phpBB forums either, just a bunch of people saying "well you might need to do 'x' and 'y'". Or maybe just rewrite them from scratch, which seems to sometimes be the open source way of doing things.

I'd prefer those who say a system is "release quality" to actually mean they, like, make sure the upgrade path is smooth and doesn't break stuff that used to work. Or do I expect too much?

1 comment
Monday, 25 January 2010

JavaScript stopwatch

Today I needed a nice stopwatch utility. There wasn't one that quite did what I wanted, so I wrote one based on something similar here.

You can view the source for this here

0 comments
Tuesday, 28 July 2009

PHPBB authentication for DokuWiki

Last month, I wrote a phpBB authentication module for MediaWiki. However, that's not the only wiki software out there, and another one I've come across is DokuWiki. Unlike MediaWiki, it uses file storage by default instead of requiring a database, which might make it an alternative for small, portable stuff.

Anyway, to install it, you'll need to do the following:

  • Download the source Here
  • Unpack this into the directory you've installed DokuWiki
  • Edit your conf/local.php to include the following:
    
    $conf['authtype'] = 'phpbb';
    
    // Change this to where you've installed phpBB
    $conf['phpbb']['path'] = '../forum/'; 
    
    // Important setting - this will disable
    // dokuwiki's UTF8 functions and use phpbb's instead
    define('NO_UTF8',true);
    

    The standard phpBB group names are available for ACL authentication. For an example conf/acl.auth.php...

    
    # Moderators have full access
    *    @GLOBAL_MODERATORS  8
    # Registered users have read access
    *    @REGISTERED         1
    

2 comments
Thursday, 23 July 2009

Thoughts for a dull June

You know you've made it as a developer when Raymond Chen answers one of your questions, without dismissing it as blindingly obvious, silly or spam.

Mind you, I'd completely forgotten about the question in the first place, but there we go. Cheers, Raymond.

0 comments
Thursday, 11 June 2009

Auth_xphpBB

Well, it's been a while since I've blogged on here, due to getting snowed under with coding, but I've now got something you might find useful.

If you run a user interactive site, you might well use phpbb as your bulletin board software, and MediaWiki for your user generated documentation. (Well, at least I've run a site or two doing this).

There's already a nice extension here that allows MediaWiki to use phpBB login credentials, so you don't have to keep shuffling two sets of users around, but I thought it would be nice to go one further and use the actual phpBB API. This is the result.

This extension requires PHP5.2, MediaWiki 1.11+ and phpBB3. To get this working, you'll need to do the following:

  1. Because MediaWiki and PHPBB both make prominent use of a class called 'user', and because PHP 5.2 doesn't provide a nice way of using include or require and yanking the whole lot into a separate namespace, you'll have to modify one codebase or the other to avoid conflicing class names. I recommend changing phpBB, and renaming user to phpbbuser. You will need to change the class definition and constructor in includes/session.php and the single instantiation point in common.php.
  2. Download the source here, unpack it and put it in the extensions subdirectory where you've installed MediaWiki.
  3. Add the following code to the bottom of LocalSettings.php:
    
    require_once './extensions/Auth_xphpBB.php';
    
    $wgAuth_Config = array();
    // Name of your PHPBB group
    // users need to be a member
    // of to use the wiki. (i.e. wiki)
    // This can also be set to an array 
    // of group names to use more then 
    // one. (ie. 
    // $wgAuth_Config['WikiGroupName'][] = 'Wiki';
    // $wgAuth_Config['WikiGroupName'][] = 'Wiki2';
    // or
    // $wgAuth_Config['WikiGroupName'] = array('Wiki', 'Wiki2');
    // )
    $wgAuth_Config['WikiGroupName'] = 'Wiki';
     
    // This tells the Plugin to require
    // a user to be a member of the above
    // phpBB group. (ie. wiki) Setting
    // this to false will let any phpBB
    // user edit the wiki.
    
    $wgAuth_Config['UseWikiGroup'] = true;
    // Path from this file to your phpBB install.
    $wgAuth_Config['PathToPHPBB']    = '../phpbb3/';
     
    // Localize the messages
    $wgAuth_Config['LoginMessage']   =
    'You need a phpBB account to login.';
    $wgAuth_Config['NoWikiError']    =
    'You are not a member of the required phpBB group.';
     
    $wgAuth = new Auth_phpBB($wgAuth_Config);
    
    These settings should be familiar if you've used the Auth_phpBB.php extension, though you'll notice there are a lot less options.

    Any thoughts, comments, praise to the skies or flamewars, do let me know!

3 comments
Monday, 04 May 2009

Archives: