Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

[PRE] MyFavLinks Plugin

(Page 2 of 2)
> >
Quote Reply
Re: [pugdog] [PRE] MyFavLinks Plugin In reply to
Moving along. Almost ready for the first pre-alpha test of the system.

In looking through the code, it seems that andy has the cookie code completely separate, so it might be possible to allow a user to pick "c" over "s" in their profile, and use the cookie code. I'm still planning an import of the cookies to SQL, so people can get the advanced features, but it might be possible to enable both, depending on the user preference. The admin can still pick a default option for the site, but if there are existing users of cookies, and the admin wants to add the SQL functionality, I think it can be done. I've added the c/s option to the user profile, so in the testing, if it works, I'll leave it in.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] [PRE] MyFavLinks Plugin In reply to
Deleted Links:

This is an issue that I'm not sure how to resolve.

1) Andy's program did a clean up during a list.
2) MyLinks seems to have ignored it
3) I was figuring on subclassing the table like CatLinks so if a user or a link is deleted, so are the MyFavLinks

But, looking at the template, I realized that maybe this (#3) isn't a 'good' thing after all.

A user would wonder where their link went to, and maybe the link was deleted from the database for reasons other than the site wasn't there any more -- we all know what they could be. The user would want to keep their link -- but it would have to be moved to the Custom Links table, since it no longer has a valid LinkID

How do we want to handle this?

I've got a few ideas, but none are really easy to implement.

Hmmmmm [Brainstorm]:

The Link and Custom Link table differ only by a URL and a LinkID. What if I did merge the two tables, but a "custom" link was defined as a link without a LinkID (or a LinkID=0) but had a URL, and a regular link had a non-zero LinkID but no URL.

In that case, when a Link was deleted from the database, ONLY the LinkID could be deleted from the custom/MyLinks table, and the URL set to the last good URL. Something like:

On a delete_link post_hook,

Update MyFavLinks_Links set MFL_LinkID=0 and MFL_URL = URL where MFL_LinkID=ID

If the MyFavLinks_Links delete fails (but a good Links table delete) then the non-found ID will be caught during the standard functioning of the routines (the user will get a Link_Not_Found error, but the program won't bomb). For completeness, I'd need to trap the Link_Not_Found error, and offer a move to custom status, but that can be later.

I'm open to suggestions on this, as this is a polishing thing, not a core thing (since missing link errors are routinely trapped).


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
> >