WordPress/links.html
mikelittle b7e64e6d6c Added in a version of b2links with update from
weblogs.com.


git-svn-id: http://svn.automattic.com/wordpress/trunk@21 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2003-05-12 22:33:47 +00:00

256 lines
14 KiB
HTML

<html>
<head>
<title>Links</title>
<link rel="stylesheet" type="text/css" href="http://zed1.com/main.css" />
</head>
<body>
<h1>Links</h1>
<pre class="quote">
// $Id$
//
// Links
// Copyright (C) 2002 Mike Little -- mike@zed1.com
//
// This is an add-on to b2 weblog / news publishing tool
// b2 is copyright (c)2001, 2002 by Michel Valdrighi - m@tidakada.com
//
// **********************************************************************
// Copyright (C) 2002 Mike Little
//
// 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.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// Mike Little (mike@zed1.com)
// *****************************************************************
</pre>
<h2>Links is an add-on to b2 weblogging software.</h2>
<ul>
<li>It plugs in to the admin screens. </li>
<li>It adds to menu commands: Link Categories and Link Manager </li>
<li>It allows you to define multiple categories under which to store your links. </li>
<li>You can then define links with a url, name, optional image, href target and category. </li>
<li>You can then list your links in your template with a simple function call. </li>
<li>You can list them by category id or category name </li>
<li>You can specify text or html to be output before and after each link. </li>
<li>You can specifiy the sort order of the links displayed. </li>
<li>You can add a 'star' rating to your links. </li>
<li>There is special category type, auto-toggle which will allow only on link in the
category to display at once. </li>
<li>Each link is owned by the user who created it. You can only edit or delete links
created by you or someone with a lower b2 administration level than you. </li>
</ul>
<p>You can download it from <a href="http://stats.zed1.net/pphlogger/dlcount.php?id=journalized&amp;url=/links/links-1.2.zip">http://zed1.com/links/links-1.2.zip</a><br />
or as a tar ball: <a href="http://stats.zed1.net/pphlogger/dlcount.php?id=journalized&amp;url=/links/links-1.2.tar.gz">http://zed1.com/links/links-1.2.tar.gz</a></p>
<h3>Files:</h3>
<dl>
<dt>links.readme.txt </dt><dd>readme file </dd>
<dt>links.sql </dt><dd>sql to create the necessary database tables </dd>
<dt>links.update-0.5.sql</dt><dd>sql to update the pre 0.5 tables </dd>
<dt>links.update-0.7.sql</dt><dd>sql to update the pre 0.7 tables </dd>
<dt>links.update-1.0.sql</dt><dd>sql to update the pre 1.0 tables </dd>
<dt>linkcategories.php </dt><dd>admin plugin to manage link categories </dd>
<dt>linkmanager.php </dt><dd>admin plugin to manage links </dd>
<dt>links.php </dt><dd>template functions </dd>
<dt>links.install.php </dt><dd>alternate installation method </dd>
<dt>links.config.php </dt><dd>configuration file </dd>
<dt>links.bookmark.txt </dt><dd>mozilla bookmarklet </dd>
<dt>links.all.php </dt><dd>Sample page to show all links </dd>
<dt>links-images\rating-0.gif</dt><dd>ratings image </dd>
<dt>links-images\rating-1.gif</dt><dd>ratings image </dd>
<dt>links-images\rating-2.gif</dt><dd>ratings image </dd>
<dt>links-images\rating-3.gif</dt><dd>ratings image </dd>
<dt>links-images\rating-4.gif</dt><dd>ratings image </dd>
<dt>links-images\rating-5.gif</dt><dd>ratings image </dd>
<dt>links-images\rating-6.gif</dt><dd>ratings image </dd>
<dt>links-images\rating-7.gif</dt><dd>ratings image </dd>
<dt>links-images\rating-8.gif</dt><dd>ratings image </dd>
<dt>links-images\rating-9.gif</dt><dd>ratings image </dd>
<dt>links-images\star.gif </dt><dd>ratings image </dd>
<dt>license.txt </dt><dd>GNU General Public License Version 2 </dd>
</dl>
<h3>Installation:</h3>
<ol>
<li>Execute the SQL from the file links.sql. This will create the two tables
and add a default category and an example link. Alternatively, upload
the file links.install.php to your B2 installation directory and load
it into your browser.</li>
<li>Edit the b2-include/b2menutop.txt file to add in the two new commands.<br />
5&nbsp; &nbsp; &nbsp; linkcategories.php &nbsp; &nbsp; &nbsp; Link Categories<br />
5&nbsp; &nbsp; &nbsp; linkmanager.php &nbsp; &nbsp; &nbsp; Link Manager<br />
Note: there should be a tab character after the 5 and after the filename.</li>
<li>Add the files linkcategories.php, linkmanager.php, links.config.php, and links.php into your b2 install directory.</li>
<li>Edit links.config.php to your requirements. There are comments in the file to explain each configuration variable.</li>
<li>Login and click on the Link Categories menu command. Here you can edit link categories.<ul>
<li><i>Name</i> is the name of the category.</li>
<li><i>Auto-toggle</i>: if you check this box, this category will only allow one link in this category to be visible at a time.
If you edit an existing link or create a new one with the visible flag set on; all the other links in this category will be
turned off. You can use this feature for a current mood category or current CD.</li>
</ul>
</li>
<li>Click on the Link Manager command to edit links:<ul>
<li>The <i>url</i> is the href part of the link tag. This is optional; if you wanted to, for example, use it for mood icons.</li>
<li>The <i>name</i> will either be the linked word(s) or the alt and title tag for the image. </li>
<li>The <i>image</i> will be used as the src for an image tag. Use either an absolute address or one relative to your template.</li>
<li>The <i>target</i> is the target of the link. _blank to open in a new browser window, and _top to open in the same window.</li>
<li>The <i>category</i> is the category under which to store this link.</li>
<li>The <i>description</i> is the description to be used as the title tag for the link (if it exists) and the text displayed after the link when no image is defined.</li>
<li>The <i>visibilty</i> flag is used to turn off an individual link. Perhaps when a site goes down temporarily but you don't want to delete your link. See also auto-toggle categories above.</li>
<li>The <i>rating</i> is used to display a number, a number of characters, an image, or a number of images after the link.</li>
</ul>
</li>
<li>In your template include_once("links.php")<ul>
<li>You can then &lt;?php echo get_linkcatname(1); ?&gt; or any category id.
This will output the name of the category (perhaps for a heading) </li>
<li>Then &lt;?php get_links(1); ?&gt; to output all the links in category 1.
You can also specify text to be output before and after the link, and the order
of the links. </li>
<li>You can also &lt;?php get_linksbyname('General'); ?&gt; To output all the links in the category called General. </li>
<li>Other functions are get_linksbyname_withrating(), get_links_withrating(), and get_linkcatname().</li>
<li>See the comments above each function for full details.
</ul>
</li>
<li>Bookmarklet: I have a partially working bookmarklet to add to your browser toolbar.<ul>
<li>Clicking on this while viewing a site will cause the 'add a link' form to
pop up in a new window with the site url and title pre-filled. </li>
<li>This currently *only* works if you are already logged in to b2. The
bookmarklet *only* works in Mozilla.</li>
</li>
</ol>
<h3>Updating:</h3>
<ol>
<li>If you are updating from a pre 0.5 version, you will need to execute the sql in links.update-0.5.sql</li>
<li>If you are updating from a pre 0.7 version, you will need to execute the sql in links.update-0.7.sql</li>
<li>If you are updating from a pre 1.0 version, you will need to execute the sql in links.update-1.0.sql</li>
</ol>
<hr />
<h2>Changes</h2>
<ul>
<li>1.2 - Name change and minor bug fixes.</li>
<li>1.1 - Added sample 'list all links' file.
Added links_popup_script() function.
Added the ability to return links in random order.
Bug fixes: Can't create new category without auto-toggle.
links.install.php does not compile with smartquotes turned on.
Added missing title to linkcategories.php</li>
<li>1.0 - Added mysql_connect() call to install script.
Added separate configuration file.
Added cookie to remember 'show' filter when managing links.
Add ratings system.
Added auto-toggle category flag.
Added descending to sort order.</li>
<li>0.9.1 - Added links.install.php DB installation script</li>
<li>0.9 - URLs are optional. Delete asks for confirmation. You can now turn
off the descriptions, even if you have no image or images turned off.</li>
<li>0.8 - Added orderby parameter to output functions.
In the link manager you can now sort your list of links.
User level visibility now controlled by a variable at the top of
linkmanager.php</li>
<li>0.7 - Added link owners. Added truncation of long urls.</li>
<li>0.6 - Added ability to not show images. Partially functional
'add link' bookmarklet. Documented template functions.</li>
<li>0.5 - Added description and visibility flag.</li>
<li>0.4 - Add stripslashes() calls in a couple of places.</li>
<li>0.3 - fixed bad mysql call</li>
<li>0.2 - fixed bad sql script</li>
<li>0.1 - initial release</li>
</ul>
<hr />
<h2>Screen shots</h2>
<ul>
<li>When you've added the lines to b2menutop.txt your menu should look like this:<br />
<img src="menu.png" alt="picture of admin menu"/></li>
<li>Clicking on the 'Link Categories' menu will give you a page like this:<br />
<img src="link-categories.png" alt="picture of editing link categories"/></li>
<li>Editing an existing category looks like this:<br />
<img src="edit-category.png" alt="picture of editing a link"/></li>
<li>Clicking on the 'Link Manager' menu will give you a page like this:<br />
<img src="link-manager.png" alt="picture of managing links"/></li>
<li>You can choose display all your links or just a single category of links. You can also select the sort order.</li>
<li>Adding a new link is at the bottom of the link manager page:<br />
<img src="add-a-link.png" alt="picture of editing a link"/></li>
<li>Editing an individual link looks like this:<br />
<img src="edit-a-link.png" alt="picture of editing a link"/></li>
<li>In your template you can output the link categories as seperate lists like this:<br />
You can see the description as title attribute for both text links and image
links. You can also see the description output after the text links.<br />
<img src="sidebar.jpg" alt="picture of link output"/>&nbsp;<img src="sidebar2.jpg" alt="picture of link output"/>
&nbsp;<img src="links-with-ratings.png" alt="picture of link output"/></li>
</ul>
<hr />
<p>Thats about it really. This is reasonably stable software, however is has not been extensively tested. Use with caution.</p>
<hr />
<a name="buttons"><h2>Buttons</h2></a>
<p>I've now created some 'Powered by Links' buttons for those of you who wish to show your support.</p>
<p>All you need to do is choose one of the images below, upload it to your own server, and create a link with the following HTML:
</p>
<pre>
&lt;a href="http://zed1.com/links/" title="Links"&gt;
&lt;img src="/path/to/the/image.png" alt="Links" border="0" /&gt;&lt;/a&gt;
</pre>
<table border="1">
<tr>
<td align="center" bgcolor="#00000"><img src="links-black.png" alt="Powered by Links" /></td>
<td align="center" bgcolor="#00000"><img src="links-black-trans.png" alt="Powered by Links" /></td>
</tr>
<tr>
<td>Rendered <br />on a black background</td>
<td>Transparent (Rendered <br />on a black background)</td>
</tr>
<tr>
<td align="center" bgcolor="#ffffff"><img src="links-white.png" alt="Powered by Links" /></td>
<td align="center" bgcolor="#ffffff"><img src="links-white-trans.png" alt="Powered by Links" /></td>
</tr>
<tr>
<td>Rendered <br />on a white background</td>
<td>Transparent (rendered <br />on a white background)</td>
</tr>
</table>
<hr />
<p>--<br />
Mike Little<br />
mike@zed1.com</p>
<!-- PowerPhlogger Code START -->
<script language="JavaScript" type="text/javascript" src="/pphlogger.js"></script>
<noscript><img alt="" src="http://stats.zed1.net/pphlogger/pphlogger.php?id=journalized&amp;st=img" /></noscript>
<!-- PowerPhlogger Code END -->
</body>
</html>