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

[UPDATE] MyFaves v2 (SQL support)

(Page 1 of 2)
> >
Quote Reply
[UPDATE] MyFaves v2 (SQL support)

MyFaves v2 (SQL and Cookie Version)

I've finally managed to get this done. This is still the original MyFaves plugin, *but* it now has the option for the admin to set the users storage of favorites to be saved in the database (instead of cookies). If the SQL version is defined, then it obviously needs the user to be logged in (they will get a login page if they are not already logged in).

Details are as follows;

http://www.linkssql.net/cgi-bin/myfaves.cgi
(running on cookie version)

or the directory to add links from;

http://www.linkssql.net/cgi-bin/page.cgi?d=1



Availability: Requires Purchasing
Price: $35 - << BUY >>
Links SQL Version Required: 2.1.2+

Requirements;

  • Links SQL 2.1.2+

  • Cookies enabled on the users side...[/url]

Does several things;

There are quite a few features in this plugin. The main one's I am proud of are;



  1. Span pages


  2. Automatic deletion of links from their favourites if a link gets deleted by the admin...


  3. Delete function


  4. Purge All function (i.e delete all their favourites)


  5. Obvious addition of links via one simple click...


  6. Language controlled, so there is need to hack the script if you want to change an error message...


  7. Template based, so its as easy as possible for you to make the pages look like your site :)


  8. Both MySQL and Cookie based option now (definable by admin)
    *new*

To purchase the script, please see the link on the previous page called <<BUY>>

If you have any queries, please let me know.

Current owners can download the new version from : http://new.linkssql.net/page.php?page=account

[/url]

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [UPDATE] MyFaves v2 (SQL support) In reply to
Hello Andy,

I do not find the version MyFaves 2 on the page counts.

There is a recording moreover?

Thank you for your assistance.

Mick

Quote Reply
Re: [mick31] [UPDATE] MyFaves v2 (SQL support) In reply to
It is updated, I just havn't got round to updating the accounts script, so that it shows the new version. Just try downloading it, and you will see 2.0 is available Smile

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [UPDATE] MyFaves v2 (SQL support) In reply to
Hello Andy,

Script is formidable...

I put myself a question.

It is possible to lay down a condition?

If <%fave_total%> = 0

Message 1

If <%fave_total%> = ou > 1

Message 2

Thank you for your assistance.

Mick

Quote Reply
Re: [mick31] [UPDATE] MyFaves v2 (SQL support) In reply to
Yeah, just use something like;

Code:
<%if count%>
show stuff if they have favorites saved
<%else%>
show stuff for no faves being saved
<%endif%>

<%count%> holds the number of favorites they have saved. IF they don't have any, then it shows as 0.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [UPDATE] MyFaves v2 (SQL support) In reply to
Great plugin Cool

I'd like to use the <%if count%> thing on standard (dynamic) LSQL pages, such as the login success page. Is that possible? (not out of the box, it seems).

John
Quote Reply
Re: [gotze] [UPDATE] MyFaves v2 (SQL support) In reply to
You could use a global, similar to the below (untested);

Code:
sub {

use Links::Plugins;

# no point doing anything if we dont hae a username...
if (!$USER->{Username}) { return; }

my $opts = Links::Plugins->get_plugin_user_cfg('MyFaves');
my $per_page = $opts->{LinksPerPage} || 25;
my $save_type= $opts->{SaveType} || 'c';

if ($save_type eq "c") {

# grab the old list of ID's...
my $cut_up = $IN->cookie('IDList');

# now explode the list, so we can check this ID doesn't already exist...
my @sliced = split(/ /, $cut_up);
my $count = 0;

# count the links....
foreach (@sliced) {
$count++;
}

return $count;

} else {

return $DB->table('MyFaves')->count( { Username => $USER->{Username} } ) || 0;

}


}

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!

Last edited by:

Andy: Oct 21, 2003, 12:10 AM
Quote Reply
Re: [Andy] [UPDATE] MyFaves v2 (SQL support) In reply to
  
Thanks. But it chokes at the first line :-(

Last edited by:

gotze: Oct 20, 2003, 4:07 PM
Quote Reply
Re: [gotze] [UPDATE] MyFaves v2 (SQL support) In reply to
Any particular error? Unsure

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [UPDATE] MyFaves v2 (SQL support) In reply to
It says:

Can't locate object method "get_plugin_user_cfg" via package "Links::Plugins" at (eval 10) line 3.

John
Quote Reply
Re: [gotze] [UPDATE] MyFaves v2 (SQL support) In reply to
Can you try the modified version? Probably cos I didn't include the Links::Plugins module (the new one does). I would have thought it would be included when the script runs... oh well.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [UPDATE] MyFaves v2 (SQL support) In reply to
Cool, it works now :-)

Thanks Andy.

PS: I posted here with Mozilla, but nothing showed up ...

Last edited by:

gotze: Oct 21, 2003, 1:13 AM
Quote Reply
Re: [Andy] [UPDATE] MyFaves v2 (SQL support) In reply to
Hey Andy,


Thanks for another great plugin, But I am having a small problem. When end user tries to delete all the listings, it shows an error


Oops, we had the following problem:

The ID you sent does not seem to be valid...


This is the tag I am using in myfaves_list.html page.


<a href="myfaves.cgi?action=remove">Click here to delete all the listings in your favorites.</a>


Can you tell me how can I correct this.

Thank you.

Need Scripts

Vishal
-------------------------------------------------------

Last edited by:

NeedScripts.Com: Nov 21, 2003, 12:57 AM
Quote Reply
Re: [NeedScripts.Com] [UPDATE] MyFaves v2 (SQL support) In reply to
Hi. You should be able to do the following;

myfaves.cgi?action=delete&ID=<%ID%>

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [UPDATE] MyFaves v2 (SQL support) In reply to
In Reply To:
Hi. You should be able to do the following;

myfaves.cgi?action=delete&ID=<%ID%>

Cheers


Nope.. it does not seem to be working. :(

Vishal
-------------------------------------------------------
Quote Reply
Re: [NeedScripts.Com] [UPDATE] MyFaves v2 (SQL support) In reply to
myfaves.cgi?action=remove&ID=<%ID%>

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [UPDATE] MyFaves v2 (SQL support) In reply to
Nope.. I am still getting the error. :(

Also, I am not using the code in myfaves_link.html but I am using it in myfaves_list.html as I want to delete *ALL* the listings at a time.

Vishal
-------------------------------------------------------
Quote Reply
Re: [NeedScripts.Com] [UPDATE] MyFaves v2 (SQL support) In reply to
You sure? What version of MyFaves are you using?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [UPDATE] MyFaves v2 (SQL support) In reply to
In Reply To:
You sure? What version of MyFaves are you using?

Cheers


Plugin: MyFaves Version: 2.0 Author: Andy Newby

:)

Vishal
-------------------------------------------------------
Quote Reply
Re: [NeedScripts.Com] [UPDATE] MyFaves v2 (SQL support) In reply to
You need to use;

myfaves.cgi?action=purge

... which will delete ALL their links, or....

...to delete a specific link, use;

myfaves.cgi?action=remove&ID=<%ID%>

(just tested both of these).

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [UPDATE] MyFaves v2 (SQL support) In reply to
In Reply To:
You need to use;

myfaves.cgi?action=purge

... which will delete ALL their links, or....

...to delete a specific link, use;

myfaves.cgi?action=remove&ID=<%ID%>

(just tested both of these).

Cheers


Thanks bro :)

It is working like a charm.. I just love it Smile Smile Smile Smile Smile Smile Smile

Vishal

Vishal
-------------------------------------------------------
Quote Reply
Re: [NeedScripts.Com] [UPDATE] MyFaves v2 (SQL support) In reply to
Glad to hear it :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [UPDATE] MyFaves v2 (SQL support) In reply to
Andy,
Could myfaves be enhanced to allow users to add link not in the my LSQL database to the list of links?

CCUnet
my Christian web
Quote Reply
Re: [ccunet] [UPDATE] MyFaves v2 (SQL support) In reply to
MyFavLinks allows that, and allows a user to edit a link that is in the database, and turn it into a "custom" link as well.

I'm trying to see the differences between it and the bookmark system in 2.99 to see where it's different.

But it works on 2.x, 2.99(3.0?)


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] [UPDATE] MyFaves v2 (SQL support) In reply to
Pugdog,
Has it been released as a part of ultranerds??

CCUnet
my Christian web
> >