Introduction
Do you have lots of links you want to keep up with? Browser bookmarks
just not cutting it? The TRH Link Manager is designed to work with a
web hosting provider that provides both PHP and access to MySQL. While
the TRH Link Manager includes hooks for the Moveable Type weblog
manager, you are not required to use it with MT.
Requirements
Here are the software versions tested with the code provided:
PHP 4.2.3
MySQL 3.23.39
Moveable Type 2.63
Security – READ CAREFULLY
If you install per the Moveable Type configuration as specified below,
ANY MT author that supplies a valid userid/password AND has been
allowed to "create new weblogs" will be able to use the TRH Link
Manager.
If you don't like that policy, you can use the .htaccess method (also
described below) to secure the TRH Link Manager interface.
Installation
Download the tar.gz file from here
Place the tar.gz file in your blog directory and unpack it.
gunzip trh-link-mgr.tar.gz
tar -xf trh-link-mgr.tar.gz
That will create a 'links' directory.
MT Configuration
For MT users, configuration is simple; edit the file 'links/config.php'
and set the $MT_DIR variable to point to your Moveable Type installation
directory.
Next, copy the 'plugins/TRHLinkManager.pl' file to your $MT_DIR/plugins
directory.
Finally, copy OR append htaccess-example to your blog directory.
This file modifies the PHP include_path so that all the files can be
located.
Adding the links to your MT templates will be discussed later.
Non-MT Configuration
Edit the file 'links/config.php' and comment out the $MT_DIR line and
uncomment the 4 lines for $DBHost, $DBUser, $DBPass, $DBName. Set the
four parameters according to your particular MySQL set-up. Consult your
web hosting provider if you are not sure about the values.
Next, add password protection to the 'links' directory. This is usually
accomplished by creating a 'links/.htaccess' file that references a
password file and specifies which user(s) can login. Additional details
are beyond the scope of this document. A Google search for '.htaccess
password protection' will get you off and running. Your service
provider should also be able to assist and may already have
documentation available.
Finally, copy OR append htaccess-example to your blog directory.
This file modifies the PHP include_path so that all the files can be
located.
Off and Running
Now your ready to begin, point your browser to:
http://your.server.com/blogname/links/
If using MT, login with your MT userid and password; otherwise, use the user created in the .htaccess/.htpasswd set-up.
Next, on the first run of the application, you'll be presented with a
link to create the necessary MySQL tables. Click the link and the next
page you see will let you start adding your own web links!
Adding Links and Link Browsing to your MT templates
The following assumes your MT index files are output as '.php' files.
To show your recently adding links, you may use the following in your MT
template:
<div class="sidetitle">
Recent Links
</div>
<div class="side">
<MTRecentWebLinks number="10" />
</div>
Set the number parameter to your liking.
Additionally, you will probably want to be able to browse your links.
Create a new template (i.e. mylinks.php), and in the content portion,
you may insert something similar to the following:
<div class="blog">
<span class="title">
Web Link Browser
</span>
<div class="blogbody">
<MTLinkBrowser />
</div>
</div>
Features/Limitations
You may add a link that includes category, URL, Site Name/Page Title,
and Site/Page Description.
You may modify a link which includes delete or change URL, Site Name/Page
Title, and Site/Page Description.
Currently, you cannot change the category of a link.
You may add a category which includes choosing Parent Category, Category Name
and Description.
You may modify a category: Category Name only.
Currently, you cannot change the Parent Category (grafting) or Description.
You may delete a Category (prune) if, and only if, there are no
sub-categories and the category contains no links. The delete checkbox
will appear if those criteria are met.
I do plan on addressing the limitations over time.