boardom Forum Index boardom
b2 message board
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

B2Links - A Link Manager for B2
Goto page 1, 2, 3 ... 9, 10, 11  Next
 
Post new topic   Reply to topic    boardom Forum Index -> Hacks
View previous topic :: View next topic  
Author Message
mikelittle



Joined: 11 May 2002
Posts: 376
Location: UK

PostPosted: Tue Sep 24, 2002 2:27 am    Post subject: B2Links - A Link Manager for B2 Reply with quote

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 Sad

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
mikelittle



Joined: 11 May 2002
Posts: 376
Location: UK

PostPosted: Tue Sep 24, 2002 9:35 pm    Post subject: Updated zip Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
mikelittle



Joined: 11 May 2002
Posts: 376
Location: UK

PostPosted: Tue Sep 24, 2002 11:03 pm    Post subject: New page with screenshots Reply with quote

The web page with screenshots is now available:
http://zed1.com/b2links/b2links.html

Mike
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
GamerZ



Joined: 15 May 2002
Posts: 537
Location: Singapore

PostPosted: Wed Sep 25, 2002 2:03 am    Post subject: Reply with quote

nice stuffs there, go back i dl heh

Neat
_________________

++ GamerZ.Per.Sg - Complex Simplicity
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
kichu



Joined: 23 Feb 2002
Posts: 53
Location: Chennai,India

PostPosted: Wed Sep 25, 2002 10:36 am    Post subject: Reply with quote

All dead links :-(
S.K
_________________
Cause something to change, you are not here for ever!
Back to top
View user's profile Send private message Visit poster's website
mikelittle



Joined: 11 May 2002
Posts: 376
Location: UK

PostPosted: Wed Sep 25, 2002 10:54 am    Post subject: Reply with quote

They are working for me at the moment.

Mike
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
annia



Joined: 09 Apr 2002
Posts: 18

PostPosted: Wed Sep 25, 2002 12:50 pm    Post subject: Reply with quote

i can't set up the mysql table (>,_,<)#
Back to top
View user's profile Send private message
mikelittle



Joined: 11 May 2002
Posts: 376
Location: UK

PostPosted: Wed Sep 25, 2002 1:17 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
mikelittle



Joined: 11 May 2002
Posts: 376
Location: UK

PostPosted: Wed Sep 25, 2002 1:26 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
mikelittle



Joined: 11 May 2002
Posts: 376
Location: UK

PostPosted: Wed Sep 25, 2002 11:51 pm    Post subject: New version available Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
mikelittle



Joined: 11 May 2002
Posts: 376
Location: UK

PostPosted: Thu Sep 26, 2002 12:11 am    Post subject: Another silly bug Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
mikelittle



Joined: 11 May 2002
Posts: 376
Location: UK

PostPosted: Thu Sep 26, 2002 1:18 am    Post subject: New version Reply with quote

Folks,
There is a new version on the website, http://zed1.com/b2links-0.4.zip

I've added a couple of calls to stripslashes() in the right places.

I've also added a changes section to the web page http://zed1.com/b2links/b2links.html

Finally, most of my sidebar links on my blog http://zed1.com/b2 use this link manager now.
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
annia



Joined: 09 Apr 2002
Posts: 18

PostPosted: Thu Sep 26, 2002 1:59 pm    Post subject: Reply with quote

thanks mike :) i will try that later!!
Back to top
View user's profile Send private message
mikelittle



Joined: 11 May 2002
Posts: 376
Location: UK

PostPosted: Thu Sep 26, 2002 11:57 pm    Post subject: Another Update: New functionality Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
mikelittle



Joined: 11 May 2002
Posts: 376
Location: UK

PostPosted: Tue Oct 01, 2002 11:35 am    Post subject: Oops, link fixed Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> Hacks All times are GMT + 1 Hour
Goto page 1, 2, 3 ... 9, 10, 11  Next
Page 1 of 11

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2 © 2001, 2002 phpBB Group