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

MyLinks SQL

(Page 5 of 8)
> > > >
Quote Reply
Re: [afinlr] MyLinks SQL In reply to
Here is the script to upgrade to MyLinks2. Just run it from your Links SQL cgi directory.

I've tested it briefly and it worked - the only problem you may encounter is moving the date from the MyLinks_Custom table to the MyLinks2_Custom table because the original MyLinks used a date but the new plugin uses a timestamp. It should insert an up to date timestamp though if the date can't be converted successfully.

Also I can let you all know that links in multiple categories are handled properly =)

Last edited by:

Paul: Apr 4, 2003, 3:32 AM
Quote Reply
Re: [Paul] MyLinks SQL In reply to
Thanks a lot for that. There did seem to be a problem with the date - an example in the new table for the timestamp: 1019775600 which I assume isn't correct. Anyway didn't have many custom links so that wasn't a problem.

Moving the line in the script yesterday sorted out the number of span pages for the users list - I now have the correct number of pages but the whole list is shown on every page. (Also they don't seem to be sorted by the field I selected in the options).

Laura.
Quote Reply
Re: [afinlr] MyLinks SQL In reply to
Quote:
1019775600 which I assume isn't correct

What makes you say that? ...that is a correct timestamp - it is something like April 2002.

I'm investigating the span/sort problems now.

Darn bugs Cool
Quote Reply
Re: [Paul] MyLinks SQL In reply to
Sorry for nagging but I'm just putting the new version live on my site now so I'm going through it to check its working. I may make a few posts with little things I find Wink

On the page for someone else's public links in a folder it doesn't show the number of links - just:

There are currently link(s) in the Default folder!
Quote Reply
Re: [Paul] MyLinks SQL In reply to
Sorry - confused between timestamp and datetime!
Quote Reply
Re: [afinlr] MyLinks SQL In reply to
To fix the wrong count on the public page, on line 706 of MyLinks2.pm change:

Code:
my $total = $DB->table('MyLinks2')->count({ my_folder_id_fk => $fid, my_folder_public => 1 });

...to...

Code:
my $total = $DB->table('MyLinks2','MyLinks2_Folders')->count({ my_folder_id_fk => $fid, my_folder_public => 1 });
Quote Reply
Re: [afinlr] MyLinks SQL In reply to
Nevermind, I've fixed all issues and uploaded the update.

The error with the spanning was caused by the fact I'd defined a table object using:

my $table = $DB->table('Users');

...then set the ordering/limits but stupidly used a new table object for the query instead of $table which had all the options set.

The sorting problem was partly related to that, but I'd also forgotten to add the user sort order to the admin panel.
Quote Reply
Re: [Paul] MyLinks SQL In reply to
Was just about to send you a pm.

Bit worried about installing - can I do it over the top of the existing one - I don't want to uninstall and lose all the information in the tables?
Quote Reply
Re: [afinlr] MyLinks SQL In reply to
You can do the uninstall and leave the templates and tables installed, then when you reinstall the plugin will ask if you want to overwrite templates - say no, and it will detect your tables and ask if you want to drop them, select no again.
Quote Reply
Re: [Paul] MyLinks SQL In reply to
Unfortunately, not quite fixed. The sort order seems to be working but I now get 1 or two users per page - and the number of users has gone back up to near the total number of users instead of the number with public folders.Unsure

Having had a look through the sub, I think that the problem may be that you limit the number of users you're looking through before deciding whether they have any public folders - does that sound right? I think that may be why you weren't using $table to begin with?

I'm playing around with it - I'll let you know if I fix it.

Last edited by:

afinlr: Apr 4, 2003, 7:11 AM
Quote Reply
Re: [afinlr] MyLinks SQL In reply to
Bah.

I'm going to look again =(

It seemed to work on my copy. Ugh.

Would I be able to access your copy - this might be the best way to fix it.
Quote Reply
Re: [Paul] MyLinks SQL In reply to
Hi Paul,

A couple questions...

Will this work with Community?

Is there a version that is void of the user profile section?



Thanks!

Brian
Quote Reply
Re: [Teambldr] MyLinks SQL In reply to
Just use hidden fields and insert <%comm_password%> instead of <%password%> then it works :-)

Klaus

http://www.ameinfo.com
Quote Reply
Re: [klauslovgreen] MyLinks SQL In reply to
Hello all:

I am thinking I would like to add this.... but I wanted to see it in action! Paul was going to dummy one up for me, but also suggested I ask a couple of you users to see your versions!

If one or two of you would be so kind... would you PM me with a site URL with this up and running so I can see it?

Thanks!
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [Teambldr] MyLinks SQL In reply to
Quote:
Is there a version that is void of the user profile section?

Currently not but you can just rename the appropriate subroutines relating to the profile to begin with anything other than my_ and then they can't be accessed.
Quote Reply
Re: [afinlr] MyLinks SQL In reply to
To anyone reading:

The bugs Laura pointed out have been fixed. I'm not totally happy with the code for the fix as it does a few too many queries than I'd like so I'm going to keep working on it and will hopefully post the fix over the weekend.
Quote Reply
Re: [carfac] MyLinks SQL In reply to
You can have a look at mine at

http://www.theukhighstreet.com/...hops.cgi?do=my_users

I haven't finished customising it yet but it is live so you're welcome to play around with it. Please let me know if you find anything broken.

Laura.
The UK High Street
Quote Reply
Re: [afinlr] MyLinks SQL In reply to
Laura:

That is exactly what I wanted to see... and exactly what I was hoping this would do! Thank you!
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [Paul] MyLinks SQL In reply to
Hi Paul,

I tried setting a comment from one PC and then accessing it from another machine and got Comment is not a valid tag?

I then clicked - Set Comment - and my comment was there - I clicked Submit and then it worked?

I am showing the comment as text in the my_link.html - ie not using the javascript bit. Should I load the comment somehow or?

EDIT: Got it sorted - using <%my_comment%> instead...


Klaus

http://www.ameinfo.com

Last edited by:

klauslovgreen: Apr 4, 2003, 11:58 PM
Quote Reply
Re: [klauslovgreen] MyLinks SQL In reply to
Was that a typo on my part or had you used the wrong tag?
Quote Reply
Re: [Paul] MyLinks SQL In reply to
No it was my typo when I removed the escape_js from the template. Funny thing is that it worked with <%comment%> - well sometimes?!?

Anyway - sorted thanks!

Klaus

http://www.ameinfo.com
Quote Reply
Re: [klauslovgreen] MyLinks SQL In reply to
Quote:
Funny thing is that it worked with <%comment%> - well sometimes?!?

Hmm it shouldn't have ...are you using mod_perl?
Quote Reply
Re: [Paul] MyLinks SQL In reply to
no not using mod_perl - yet...

Klaus

http://www.ameinfo.com
Quote Reply
Re: [Paul] MyLinks SQL In reply to
I have a problem sorting links - I use ex:
/mylinks2.cgi?do=my_folder_list&my_folder_id=4&sf=Title&so=DESC

and did a template dump and found that sf and so are the default values set in the profile?

Was it not suppose to show be the current setting in the dropdown or?

Klaus

http://www.ameinfo.com
Quote Reply
Re: [Paul] MyLinks SQL In reply to
And another small problem:

I tried to use the javascript warning as follows:

Code:
onclick="the_warning('<%escape_js Title%>');"

But - even if I click cancel - the n it deletes the link anyway... any suggestions?

Klaus

http://www.ameinfo.com
> > > >