scriptygoddess

22 May, 2003

TRH Link Manager with optional MT plug-in

Posted by: Jennifer In: Scripts

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.

8 Responses to "TRH Link Manager with optional MT plug-in"

1 | VIncent

May 26th, 2003 at 11:19 am

Avatar

When I try to open the archive it says it's empty.

2 | James

May 27th, 2003 at 8:57 am

Avatar

That archive is fine, perhaps the software your using to retrieve it….try this url:
http://jerobins.freeshell.org/house/docs/justcode/trh-link-mgr.tar.gz

3 | Vincnet

May 27th, 2003 at 12:52 pm

Avatar

Hmm. WInzip 8.0 wasnt opening it.

4 | Carla

August 10th, 2003 at 6:46 am

Avatar

Found this solution for universal bookmarks as well last night: sitebar.

5 | Bill

December 6th, 2003 at 11:38 pm

Avatar

try as I might i can't get the TRH Link manager to work quite right. Well I can get it to work but it is inconvenient because of an annoying cookie writing problem.

I saw that someone posted a similar error at Jame's site but I saw no follow up so I thought I would try here.

basically when i go to the link manager page I get the following error:

Warning: session_start(): Cannot send session cookie – headers already sent by (output started at /home/finalcut/public_html/links/index.php:2) in /home/finalcut/public_html/links/session.php on line 60

i can use the tool, i just have to login before every page loads (every time I click a link or a button) since it isn't remembering my info.

I mucked with the session.php site some to try and get it to stop displaying those errors, and did, but the result was I still had to login each time.

I managed to hide the errors by commenting out the lines:
60, 102, 105, 108 of session.php (these are the origional line numbers).

I have reverted back to the origional uncommented file so the errors still appear at rawlinson.us/links

I imagine the solution to this is pretty easy and has been found before so any help would be great! thanks.

6 | The Robinson House

May 23rd, 2003 at 10:36 am

Avatar

My Link Manager
I finally got around to putting some polish on the link manager code (mentioned earlier). You'll find the details here: TRH Link Manager with optional MT plug-in. Enjoy. Feedback welcome. I'll tackle the limitations as the need arises….

7 | gigamatic

May 29th, 2003 at 7:45 am

Avatar

Thank you scriptygoddess
This sounds like a good solution to links w/o using Blogrolling.

8 | rawlinson - us » WordPress -vs- Moveable Type

July 22nd, 2004 at 9:22 pm

Avatar

[…] e it was a deal breaker and is what really pushed me over the edge to WP I was using a MT plugin to handle my links b […]

Featured Sponsors

Genesis Framework for WordPress

Advertise Here


  • Scott: Just moved changed the site URL as WP's installed in a subfolder. Cookie clearance worked for me. Thanks!
  • Stephen Lareau: Hi great blog thanks. Just thought I would add that it helps to put target = like this:1-800-555-1212 and
  • Cord Blomquist: Jennifer, you may want to check out tp2wp.com, a new service my company just launched that converts TypePad and Movable Type export files into WordPre

About


Advertisements