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

MyLinks Database Version

(Page 5 of 5)
> >
Quote Reply
Re: [Paul] MyLinks Database Version In reply to
If you can tell me what to do that would be great....I'm still trying to learn about this stuff so every bit helps!

Thanks Paul!
Perl Hopefull
Quote Reply
Re: [stilton] MyLinks Database Version In reply to
Ok, in MyLinks_DB.pm line 81 in EditPlus, you'll see:

my %grp;

...change it to:

my %grp;
my %match;

Then a few lines down you'll see:

Code:
while (my $rec = $sth->fetchrow_hashref) {
push @{$grp{$rec->{CategoryID}}}, Links::SiteHTML::display('mylinks_link', { %$rec, MyLinks_Font => $tmp->{MyLinks_Font} } );
}

....you need to change it to:

Code:
while (my $rec = $sth->fetchrow_hashref) {
unless (exists $match{$rec->{LinkID}}) {
push @{$grp{$rec->{CategoryID}}}, Links::SiteHTML::display('mylinks_link', { %$rec, MyLinks_Font => $tmp->{MyLinks_Font} } );
$match{$rec->{LinkID}}++;
}
}

Then on about line 112 you'll find:

Code:
while (my $rec = $sth->fetchrow_hashref) {
$tags->{saved_links} .= Links::SiteHTML::display('mylinks_link', { %$rec, MyLinks_Font => $tmp->{MyLinks_Font} } );
}

You'll need to change it to:

Code:
my %match;
while (my $rec = $sth->fetchrow_hashref) {
unless (exists $match{$rec->{LinkID}}) {
$tags->{saved_links} .= Links::SiteHTML::display('mylinks_link', { %$rec, MyLinks_Font => $tmp->{MyLinks_Font} } );
$match{$rec->{LinkID}}++;
}
}

Then you'll need to make the same changes for the user_favorites routine further down (about line 287 and 314).

Let me know if you get stuck.
Quote Reply
Re: [Paul] MyLinks Database Error In reply to
Paul, I updated my linksSQL to 2.1 and it works fine now. I have changed the templates some if you want to take a look. I will be sending you $40 soon.



Michael

http://www.adultdvdlinks.com

Michael Carpenter

Adult DVD Links
Adult Detective
Quote Reply
Re: [adultdvdlinks] MyLinks Database Error In reply to
Thanks. Will do.

Last edited by:

Paul: Mar 26, 2002, 2:21 AM
Quote Reply
Re: [Paul] MyLinks Database Error In reply to
Paul, I tried to install your plugin again without uninstalling first. Now this is the error I get.



Error running installation code: Plugins::MyLinks_DB (1333): Unable to create: Could not create table 'Links_MyLinks'. Reason: It already exists at /home/dvdlin/cgi-bin/linksSQL/admin/GT/Plugins/Manager.pm line 247.



Michael

http://www.adultdvdlinks.com

Michael Carpenter

Adult DVD Links
Adult Detective
Quote Reply
Re: [Paul] MyLinks Database Version In reply to
In Reply To:
When you've customized the design (if you are doing) I'd love to see it :)




See

http://www.2muslims.com/...in/links/mylinks.cgi?

use user test

password test
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory

Last edited by:

katabd: Mar 26, 2002, 8:52 PM
Quote Reply
Re: [adultdvdlinks] MyLinks Database Error In reply to
Yep thats because you need to uninstall first :)
Quote Reply
Re: [katabd] MyLinks Database Version In reply to
Hey, that looks cool!
Quote Reply
Re: [Paul] MyLinks Database Error In reply to
Paul, the plugin does not show up anymore as an installed plugin. So, I can't un-install whats not showing up.

Michael Carpenter

Adult DVD Links
Adult Detective
Quote Reply
Re: [adultdvdlinks] MyLinks Database Error In reply to
You'll need to drop the following tables:

MyLinks
Mylinks_Rating
MyLinks_Custom

and drop all columns from the Users table prefixed with MyLinks_

You can do all of the above using mysqlman.
Quote Reply
Re: [Paul] MyLinks Database Error In reply to
Paul, that worked fineSmile. You will have your $40 once my bank finishes the transfer to paypal.



Thanks for help

Michael

http://www.adultdvdlinks.com

Michael Carpenter

Adult DVD Links
Adult Detective
Quote Reply
Re: [Paul] MyLinks Database Version In reply to
Paul,

I can't find this:

Code:
while (my $rec = $sth->fetchrow_hashref) {
$tags->{saved_links} .= Links::SiteHTML::display('mylinks_link', { %$rec, MyLinks_Font => $tmp->{MyLinks_Font} } );
}


in the MyLinnks_DB.pm to get my script working properly.

Mandi

Last edited by:

Evoken: May 26, 2002, 6:34 AM
Quote Reply
Re: [Evoken] MyLinks Database Version In reply to
Its in sub main and sub user_favorites on about the lines mentioned above.
Quote Reply
Re: [Paul] MyLinks Database Version In reply to
No, the line definately didn't exist - I searched out bits and pieces of it and found nothing similar. So I unstalled then re-installed the plugin, and there was some options that weren't there before (bad users, who can rate). So I'll give the changes another go, but I also have another problem - the registration file I just got isn't working for the re-installed version I just installed. It says it has been successfully updated, but the plugin itself is telling me that it's a 3 day trial.

Mandi

Last edited by:

Evoken: May 26, 2002, 6:51 AM
Quote Reply
Re: [Evoken] MyLinks Database Version In reply to
Oh, big difference - the MyLinks_DB.pm file I had was 14k, the new one is over 25k. Smile
Quote Reply
Re: [Paul] MyLinks Database Error In reply to
I also have this error

Undefined subroutine &Links::init called at /home/task/public_html/sql4/mylinks.cgi line 20.


I use Links 2.1.0

Any idea?

--
Michael Skaide

http://www.cycle24.de

Quote Reply
Re: [Michael Skaide] MyLinks Database Error In reply to
Hi,

Double check that the "use lib" path in mylinks.cgi is correct.

Last edited by:

Paul: Jun 19, 2002, 3:18 PM
> >