BlibbleLinks

BlibbleLinks is an application which runs as part of your website, and allows you to easily add, delete, and categorise links to other sites.

See it in action!

Also used in the software listings

1: Preparation

As with most web applications, you will need PHP installed on your website. This is available for free download, and is already running on many websites. To see if PHP is installed, enter the following tag on one of your webpages, and give the file a .php entension. If you can see the text in a browser, then PHP is working

<?php print("PHP is working!"); ?>

PHP works on Windows, and on GNU/Linux, and on BSD, and on most Unixes, and on Macs, and on IRIX, and on RISC-OS, and on Novell. It works with almost any webserver, Apache being the most popular.

See MiniXAMPP for an easy-to-install way of getting Apache and PHP working together with zero fuss. MiniXAMPP also includes a database server, and a configuration tool, but it's a good way of getting web applications to work quickly

Read the bit about securing the installation if you choose to use MiniXAMPP

2: Installing the files

The program resides in two files: general_index.php, and include.php. These files can go anywhere on your website, and form the core of the application. (see download link)

A directory structure is then created, to represent the categories of links. For example, my Links directory has Programming and Science subdirectories, which then become categories for the website.

To tell your website that you want BlibbleLinks to handle this directory, simply create a one-line file called index.php, and put the following tag in that file:

<?php include("${DOCUMENT_ROOT}Links/general_index.php"); ?>

That file is very small, which is good, because you will need to copy it to each directory in your directory structure. For example, I have about 330 copies of index.php in my /Links/ directory-structure, each of which is an identical copy of the line above.

Note that I've put general_index.php in the /Links/ directory of my website: you may have a different location, in which case you should change the text to reflect the location where you keep the general_index.php file

As soon as you copy the index.php file into each directory, you should be able to view it in your browser, and it will list all subdirectories, allowing you to navigate the site easily, even without finishing the setup

You'll need to look at the website, of course, not at the local .php files on your hard-disk, otherwise the PHP interpreter won't be invoked. If you see the include(...) statement printed out as text, then PHP isn't working. If you see an error of the form 'PHP: error x in file y line z', then PHP is working but one of the PHP files has a problem. If you can't figure out the problem easily, ask a PHP expert, or email me to see what needs fixing

3: Creating your website

When you have the basic navigation structure working, the next step is to add some links.

A link is just a subdirectory, but with a file called link.txt in it!

In one of your categories, create a new subdirectory, then put a blank text file in it, with the name link.txt. This directory should appear in a different font when you look at it on your website, to indicate that it's a link, and not a subdirectory

Paste the URL of the website into the link.txt file. It only needs to be a one-line file, containing something like "http://www.slashdot.org/" (without the quotes). Save the file, and it should appear on your website as a link.

Giving names to things

Up to now, the text displayed on your website is simply the name of each directory. You need to choose good directory names, as they form a major part of the information you're storing. However, there is a way to add more information to each link

Simply create a file called description.txt in each directory, and use it to write a short description of the directory. Descriptions can be used for both categories and links, and work in the same way. The program will look for a file called description.txt, and use it if it finds such a file

You don't need to do any special HTML-stuff with the description, just plain text will normally do. However, it will be displayed as HTML, so you need to replace &, ", <, and > with &amp; &quot; &lt; and &gt; respectively. Of course, proper HTML is also allowed, for anyone who wants to use that too. Weird characters such as pound-signs, fancy-quotes, accented characters and foreign characters will need to be written in their HTML form, so have a look on an HTML tutorial site if you need to use any of those.

More configuration options

There is loads more which can be done to configure the system, so I've put that into a separate file

4: Download links

general_index.php The main program
include.php The function library
styles.css Stylesheet
index.php Put this in each directory, and check the filename in it is right
description.txt Sample description file
link.txt Sample link file

Just copy these files to a suitable place on your webserver machine, and start checking that PHP is working correctly, that you have the right filenames, etc.

Note: Look for a TOCHANGE: line in the include.php, which needs to know the full filename (or length thereof) where it's installed

Create a single subdirectory, copy index.php into it, then check again that the filename is correct, and that the new directory displays properly. It's important to make sure that index.php is correct before you make hundreds of copies of it!

Once you've got everything setup, you'll probably want to take a backup of general_index.php, and start customising it to the look and feel of your website. Just make small changes, and keep testing it to make sure it's still working

License

            Copyright © 2002-2003, Oliver White

	    This program is free software; you can redistribute it and/or modify
	    it under the terms of the GNU General Public License as published by
	    the Free Software Foundation; either version 2 of the License, or
	    (at your option) any later version.

	    This program is distributed in the hope that it will be useful,
	    but WITHOUT ANY WARRANTY; without even the implied warranty of
	    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	    GNU General Public License for more details.

            Contact the author at www.blibbleblobble.co.uk
	

Improve the program!

For comments, feedback, bug-reports, requests, or patches, see the Contact link at the top of this page, or email software@blibbleblobble.co.uk

Alternatives

I've listed some other programs which will help you to create link categories on your website. Most of the alternatives use a database server (MySQL or similar) which takes a while to setup, but allows you to edit things directly from your website

These systems all have good multi-user capabilities, and many more features, such as news, polls, FAQ, and discussion-forums, packed into an easy-to-install application.