View previous topic :: View next topic |
Author |
Message |
mikelittle
Joined: 11 May 2002 Posts: 376 Location: UK
|
Posted: Tue Sep 24, 2002 2:27 am Post subject: B2Links - A Link Manager for B2 |
|
|
Folks, I've written a Link Manager add-on for B2.
From the readme:
Quote: |
B2 Link Manager is an add-on to b2 weblogging software.
* It plugs in to the admin screens.
* It adds to menu commands: Link Categories and Link Manager
* It allows you to define multiple categories under which to store your links.
* You can then define links with a url, name, optional image, href
target and category.
* You can then list your links in your template with a simple function call.
* You can list them by category id or category name
* You can specify text or html to be output before and after each link.
|
As per the guidelines. All the files are standalone, although you do have to edit b2menutop.txt andof course your templates to use it. Instructions are given in the readme.
You can download it from http://zed1.com/b2links-0.1.zip
It is the first pass and there is not yet much error handling. Use with caution.
I will welcome bug fixes, and suggestions ofr improvements.
But right now, I'm going to bed it's 2:30am here
I hope you enjoy it.
Mike _________________ Mike Little
http://zed1.com/journalized/
"Share what you know. Learn what you don't."
Last edited by mikelittle on Wed Apr 30, 2003 12:27 am; edited 1 time in total |
|
Back to top |
|
 |
mikelittle
Joined: 11 May 2002 Posts: 376 Location: UK
|
Posted: Tue Sep 24, 2002 9:35 pm Post subject: Updated zip |
|
|
I've discovered a bug in my code when renaming a link category.
I've fixed it and re-issued the code as 0.2
You can get the new zip from http://zed1.com/b2links-0.2.zip
I'm currently putting together a web page with screen shots to explain what the add-on does.
Mike |
|
Back to top |
|
 |
mikelittle
Joined: 11 May 2002 Posts: 376 Location: UK
|
|
Back to top |
|
 |
GamerZ
Joined: 15 May 2002 Posts: 537 Location: Singapore
|
Posted: Wed Sep 25, 2002 2:03 am Post subject: |
|
|
nice stuffs there, go back i dl heh
Neat _________________
++ GamerZ.Per.Sg - Complex Simplicity |
|
Back to top |
|
 |
kichu
Joined: 23 Feb 2002 Posts: 53 Location: Chennai,India
|
Posted: Wed Sep 25, 2002 10:36 am Post subject: |
|
|
All dead links :-(
S.K _________________ Cause something to change, you are not here for ever! |
|
Back to top |
|
 |
mikelittle
Joined: 11 May 2002 Posts: 376 Location: UK
|
Posted: Wed Sep 25, 2002 10:54 am Post subject: |
|
|
They are working for me at the moment.
Mike |
|
Back to top |
|
 |
annia
Joined: 09 Apr 2002 Posts: 18
|
Posted: Wed Sep 25, 2002 12:50 pm Post subject: |
|
|
i can't set up the mysql table (>,_,<)# |
|
Back to top |
|
 |
mikelittle
Joined: 11 May 2002 Posts: 376 Location: UK
|
Posted: Wed Sep 25, 2002 1:17 pm Post subject: |
|
|
If you have telnet access to your server you should be able to do
mysql -uusername -p dbname < b2links.sql
and then type in your password when prompted.
If you are using phpMyAdmin you should be able to paste in the sql (one bit at a time) or upload the file for it to execute. |
|
Back to top |
|
 |
mikelittle
Joined: 11 May 2002 Posts: 376 Location: UK
|
Posted: Wed Sep 25, 2002 1:26 pm Post subject: |
|
|
OK just tried that and I've messed up the syntax :-(
Try this
Code: |
-- DROP TABLE IF EXISTS b2links;
CREATE TABLE b2links (
link_id int(11) NOT NULL auto_increment,
link_url char(255) NOT NULL default '',
link_name char(255) NOT NULL default '',
link_image char(255) NOT NULL default '',
link_target char(25) NOT NULL default '',
link_category int(11) NOT NULL default 0,
PRIMARY KEY (link_id)
) TYPE=MyISAM;
-- DROP TABLE IF EXISTS b2linkcategories;
CREATE TABLE b2linkcategories (
cat_id int(11) NOT NULL auto_increment,
cat_name tinytext NOT NULL,
PRIMARY KEY (cat_id)
) TYPE=MyISAM;
INSERT INTO b2linkcategories (cat_id, cat_name) VALUES (1, 'General');
INSERT INTO b2links (link_id, link_url, link_name, link_image, link_target, link_category)
VALUES (1, 'http://www.cafelog.com/', 'Cafelog', '', '_blank', 1);
|
Sorry about that. I'll do another release later.
Mike |
|
Back to top |
|
 |
mikelittle
Joined: 11 May 2002 Posts: 376 Location: UK
|
Posted: Wed Sep 25, 2002 11:51 pm Post subject: New version available |
|
|
I've now uploaded the new zip to my website.
If you already have the 0.2 zip then the only change is the fixed sql posted above.
Get it at http://zed1.com/b2links-0.3.zip
Mike |
|
Back to top |
|
 |
mikelittle
Joined: 11 May 2002 Posts: 376 Location: UK
|
Posted: Thu Sep 26, 2002 12:11 am Post subject: Another silly bug |
|
|
I found another silly bug.
in b2links.php around line 53:
the code
Code: |
$result = mysql_query($query) or die("Couldn't execute query. ".mysql_error());
while ($row = mysql_fetch_array($result)) {
echo($before);
|
should read
Code: |
$result = mysql_query($query) or die("Couldn't execute query. ".mysql_error());
while ($row = mysql_fetch_object($result)) {
echo($before);
|
That's what I get for zipping up the wrong copy of the files.
Sorry folks.
Mike |
|
Back to top |
|
 |
mikelittle
Joined: 11 May 2002 Posts: 376 Location: UK
|
|
Back to top |
|
 |
annia
Joined: 09 Apr 2002 Posts: 18
|
Posted: Thu Sep 26, 2002 1:59 pm Post subject: |
|
|
thanks mike :) i will try that later!! |
|
Back to top |
|
 |
mikelittle
Joined: 11 May 2002 Posts: 376 Location: UK
|
Posted: Thu Sep 26, 2002 11:57 pm Post subject: Another Update: New functionality |
|
|
Another new version of my B2 Link Manager add-on
Get it here: http://zed1.com/b2links-0.5.zip.
This time I've added a description for each link and a visibilty flag to turn off individual links.
The description is used as the title for the anchor and, if you have no image defined, will be displayed after the linked word(s).
Comments, bug reports, and suggestions welcome.
Enjoy,
Mike |
|
Back to top |
|
 |
mikelittle
Joined: 11 May 2002 Posts: 376 Location: UK
|
Posted: Tue Oct 01, 2002 11:35 am Post subject: Oops, link fixed |
|
|
Oops, at some point I moved the zip into a subdirectory and didn't update the readme! Sorry.
The zip file can found at http://zed1.com/b2links/b2links-0.5.zip
The readme and screenshots can be found at http://zed1.com/b2links/b2links.html
Sorry for the confusion.
New features: I'm working on a new feature, I've got most of it sorted, just a couple of glitches to iron out.
Is anyone using this yet? How do you find it? Does it work?
Mike |
|
Back to top |
|
 |
|