Republish a feed (or other data) protected by HTTP basic access authentication

Some services let you access or download data on a url that is protected by username and password-popup, or “basic access authentication“, for example your twitter replies at …:


… or your bloglines subscriptions in opml format at :


PHP script to access authenticated URL

With the following simple php script you can access those files and make them available without authentication:

download Authentication Script zipped together with Snoopy Class file.

Unzip and configure the file/page to fetch (e.g. for Twitter) and your username and password:

// Configuration! Change values here, 
// leave rest of script untouched.
$url_to_be_fetched           = "http://someserver/somepage/";
$username_to_be_sent        = "your_user_name";
$password_to_be_sent        = "your_password";

Upload it to a directory on your (php-capable) webserver together with the (included in the zip file) Snoopy PHP class file.

Use Cases

Keeping Private Feeds private

In case of personalised RSS feeds, most services do not protect the feed with authentication, but provide the user with a freely accessible feed at a “secret url”. As soon as you use that feed in Web-based feed readers (Bloglines, Google Reader…) chances are other users will stumble on them when searching.

Which is why Bloglines introduced an <access:restriction> element:

 <access:restriction relationship="deny" />

If a feed contains this element, it won’t show up in searches within Bloglines. Which is why I’ve included the restriction by default in the feed, although you can switch it off by setting the $feed_preferably_private to false:

// in case you use this to be able to read an authenticated feed 
// via Bloglines, you probably do not want it to show up in search 
// results
$feed_preferably_private    = true;

// end configuration

Support for access:restriction element

I haven’t found any mentions of Google Reader supporting it as well, but I have a feed in Google reader with this restriction for more than a month now, and it doesn’t show in the results when I search for it (using a different account). Some people have pointed out though that Google does allow you to share these “protected feeds” via Google Shared Items or Feedburner.

From the services with “personalised/secret feeds” I am using, Facebook supports it, most others like Google Reader Shared Items, the “for” feed and Wakoopa alerts don’t.

Feel free to leave your comments!

Posted in Scripts, Syndication | 12 Comments

Gregarius plugin: do not aggregate yourself (when aggregating search feeds)

Yesterday evening I knocked together this “Paola246” aggregator site.  Paola246 aka Paolavdb is the Flemish version of “Lonelygirl15“: a fictitious online persona posing as real.  “Paola” tried to tap into social media so systematically (starting a Twitter, Flickr, Youtube and a few blog accounts in one day ), that no one seems to have ever believed she was genuine.  Still, nothing beats a good Alternate Reality Game, and I guess quite some people will have fun following the story as it unfolds.

Do not feed yourself

If you aggreate Technorati searchfeeds (blogs writing about Paola246/PaolaVdb), and you syndicate the superfeed, then chances are URLs of your aggregator site will show up in your search feeds.  That is because Technorati indexes pages and not only feeds.  So I needed to filter out all URLs from the originating site.

Gregarius plugins

Gregarius has a plugin architecture, just like WordPress (example) and Vanilla.  There’s an API you can use and a long list of “hooks“, with which can inject your own code into in the script without touching the core – so you can upgrade very easily.  Probably you will not even need to study the API, because there are already a lot of plugins available to modify.

Filtering incoming items

In my case, I started from the “PerFeedItemFilter“, that allows to filter every incoming feed with a specific regular expression.  I just wanted to prevent both aggregating and displaying (if the harm already had been done) URLs with the same hostname, so I just stripped most of the code and inserted twice a snippet like this:

      $parsed_feed_url = parse_url($item->url);
      if (is_array($parsed_feed_url)) $parsed_host = $parsed_feed_url["host"]; 
      #-- kill item if regex DOES NOT match
      if ($parsed_host == $_SERVER['HTTP_HOST']) {
         $item = NULL;

Upload and activate the plugin in the Admin Panel… and done!  Download the plugin here.

About Gregarius

Gregarius is a php-based RSS aggregator: put it on a site, add feeds to the configuration, and it will create a so-called “planet site” with all the items of the added feeds in a “river of news” display.  Typically you’ll want to follow a planet site on a specific topic or group of people when you want the maintainer of the planet to do the selection of feeds for you.

The resulting superfeed has links that don’t point to the planet, but to the individual original items.

[tags]Gregarius, Plugin, Plugins, technorati, searchfeeds, search feeds, loop, filter[/tags]
Posted in Gregarius, Syndication | Leave a comment

FCKeditor extension for Vanilla: long URLs don’t work

The FCKeditor extension for Vanilla is a great plugin that (obviously) enables the FCK editor for forum posts, including an easy way to posts videos from the major online video sites (Youtube, Google Video…).

There’s one issue however I’ve been struggling with: some long html links simply did not display, i.e. a xhref=”http://somelongurl” mce_href=”http://somelongurl” was in the database, but in the html output the href attribute simply was missing.

This turns out to be configurable in /extensions/FCKeditor/settings.php (line 6):

// $FCKeditor_allowed_tags = array( 'a' => array('accesskey' => 1, 'class' => 1, 'href' => array('maxlen' => 100), 'tabindex' => 1, 'title' => 1, 'target' => 1, 'onmouseover' => 1), // modif pvh 20070320 maxlen modified urls -> up to 300

$FCKeditor_allowed_tags = array( ‘a’ => array(‘accesskey’ => 1, ‘class’ => 1, ‘href’ => array(‘maxlen’ => 300), ‘tabindex’ => 1, ‘title’ => 1, ‘target’ => 1, ‘onmouseover’ => 1),

Problem solved!

[tags]Vanilla, FCKeditor, extension, add-on, long url, long urls, links not showing, length, configuration[/tags]
Posted in Vanilla | 1 Comment

Adding a tab to your Vanilla Menu – the AddGabblyToMenu Extension as an example

Gabbly is a service with which you can transform any web page to a chat box – simply by prefixing the web page with

There are lots of situations where this can be handy – in my case, I was asked to create a chat box on a Dutch-language Second Life Forum in case the SL grid goes down (and people flock to the forum in search of an alternative :-).

Let’s implement this with an extra link in the upper menu, and create a the most basic of all Vanilla extensions for it.

How to create an extension?

  • make a subfolder in the folder /extensions, e.g. “AddGabblyToMenu”
  • create a page called default.php
  • you first need to include some information about the extension, as is documented in the Vanilla Wiki:
Extension Name: Your Extension Name Here
Extension Url: The url to where this extension can be downloaded
Description: A description of your extension
Version: The current version of your extension
Author: Your Name
Author Url: Your personal url

// your code starts here

Typically, your extension will contain some info that’s configurable: names of menus or links (you need to separate them out in order to make them easily translatable), the place on the page where the output of the extension will come.  In Vanilla, you define this respectively  in the “Dictionary” and “Configuration” of the global $Context variable:

$Context->Dictionary['AddGabblyToMenu'] = 'ChatBox';
$Context->Configuration['TAB_POSITION_GABBLYCHAT'] = '80';

So now we want to add our Gabbly Link to the Menu.  The $Menu object happens to be another global variable that you can simple call a method “AddTab” from: 

if (isset($Menu))
// the menu text
    // the menu item name
    // the menu link
    // extra attributes for the link (optional)
    // the position in the menu

Here you see how to access terms from the dictionary ($Context->GetDefinition()) – and from the configuration (the $Configuration[]) array.  Note that the order of the tabs in the Vanilla upper menu is determined by an integer number.  You’ll find the order of the default menu options defined in /appg/settings.php – you determine your menu tab position by choosing a numer between or greater than those:

// Vanilla Tab Positions
$Configuration['TAB_POSITION_DISCUSSIONS'] = '10';
$Configuration['TAB_POSITION_CATEGORIES'] = '20';
$Configuration['TAB_POSITION_SEARCH'] = '30';
$Configuration['TAB_POSITION_SETTINGS'] = '40';
$Configuration['TAB_POSITION_ACCOUNT'] = '50';

And that’s it!  The only thing you need to do now, is to enable your extension in the adminstration panel and you’re done! 


  • it was only while writing and searching on the Vanilla Community forum that I noticed there alread is a GabblyChat extension for Vanilla (see also extension page, discussion here) – this solution adds a link in the right nav bar.
  • Probably a link in the right nav bar is even better from a usability standpoint, but anyway, Gabbly was a good excuse to show how to add a link to the menu with a Vanilla extension…
[tags]Vanilla, extension, menu, tab order, Gabbly[/tags]
Posted in Vanilla | Leave a comment

My favourite Vanilla extensions

For the Second Life discussion site, I’ve used:

  • Account Pictures
    This extension will allow your users to upload their icon and picture and store it on your server. You’ll have to create an upload directory and make it writeable. Also, the files which will get uploaded should have writing permissions. You can change the icon and picture sizes on the settings .
  • Attachments
  • Comment Removal
    Allows administrators and comment/discussion authors to delete posts and discussions directly from the database (ie. no first hide then clean up procedure). Please be aware that this is a permission, so if you’re an admin and you’re not seeing any ‘remove’ button on posts, it’s because you haven’t
  • Comments Permalinks
    Adds a permalink in every comment, so you can share a single comment’s url.
  • FCKeditor
    FCKeditor is a popular WYSIWYG toolbar for your comment forms and posts. Includes Source editing, smileys and Youtube/Google/Soapbox/Vimeo/Revver/Dailymotion/VideoJug/MetaCafe video embedding
  • Google Analytics
    Adds the Google Analytics code to your vanilla forum pages. You must set up an account with Google Analytics and enter your account number in default.php before this add-on will work. Also see further discussion at
  • Guest Welcome Message
    Adds a welcome message to the panel if the person viewing the forum isn’t signed in.
  • Inline Images
    This extension will display uploaded image attachments in your comments. Users can use an image tag (e.g. [Image_154]). You can only use the image tag for comments where you uploaded the image to. !!!REQUIRES ATTACHMENTS 2!!!
  • Next Unread Discussion Link
    This extension adds two links between the last comment of a discussion and the comments form. Previous Page Next Unread “Previous Page” simply goes back in the browser history. “Next Unread” will link to the most recently active discussion which contains unread comments.
  • Notify
    The extension “Notify” enables to subscribe to the complete forum, categories or single discussions to be notified about new comments/discussions. Every user won’t get more than one mail, until he visits the forum again.
  • Predefined Attributes
    The extension allows administrators to predefine attributes. Administrators may add custom fields like “Phone-Nr.” or “Shirt-Size” (Respect your users privacy). Users fill this information on Appliance and on the Account “Personal Information” page.
  • RSS2 Feed
    Adds a link to an RSS2 feed on any applicable pages of Vanilla. It’s a WYSIWYG type of feed where it will deliver exactly what you see when you are browsing the forum. So, if you run a search and then click the RSS2 feed, you will get a feed of the search results.
  • Sidepanel 1.0
    Enables you to insert everything you want to appear in the sidepanel easily (based on Statcounter by JP Mitchell) this is basically the code to extend the sidepanel.
[tags]Vanilla, extensions, RSS, notification, navigation, custom attributes, image upload, FckEditor[/tags]
Posted in Forums and discussion, Vanilla | 2 Comments

PHP forum software: phpBB, BBpress or Vanilla?

I was searching for bulletinboard/forum software for a a Second life forum that was:

  • easy to set up
  • easy to maintain, in the sense that I didn’t want to develop basic functionality myself
  • had a sufficiently large community


  • themes system not yet in place..
  • integration with WordPress would be interesting for the longer term, but not just now


  • webstandards based
  • smallish community
  • contributions:
    • Themes: templates that involve php code
    • styles: pure layout, ie css and image
    • Add-ons: adds new functionality


  • huge community
  • lots of extensions, but mod system
  • no webstandards-based
  • no good seo, no friendly urls


  • huge community
  • more a development platform than an application

Are there any other options? Full list on Wikipedia.


I went for Vanilla:

[tags]vanilla, bbpress, drupal, phpbb, extensions, forum, bulletin board, comparison[/tags]
Posted in Forums and discussion | Comments Off on PHP forum software: phpBB, BBpress or Vanilla?

Avoiding phpBB registration spam

Online marketing report boosts a phpBB registration bot – a tool that will register a user on a phpBB forum, in order to drop a link in the user profile.

Since phpBB doesn’t put a nofollow tag on a profile link (check for yourself on the mother of all phpBB forums), phpBB forum memberlists are an easy target for linkspamming.

I used to manually remove fake registrations on a phpBB forum I run until I got sick of it and installed this anti-registration-spam mod. It simply removes the url field upon registration, and discards the registration if an automated process tries to post a url field anyway.

[tags]phpbb, spam, anti-spam, registration, nofollow, memberlist, forum, mod, phpbb mod[/tags]
Posted in Forums and discussion, PhpBB | Comments Off on Avoiding phpBB registration spam

Inline Flash Player mod for PhpBB

– based on…



other inline players: list, also list to playlist thingies

Posted in PhpBB | Comments Off on Inline Flash Player mod for PhpBB