Gossamer Forum
Quote Reply
MyLinks Plug in
Hi

First sorry to start a new post.. but it is about time..

Two things paul:

1- the custom links are nt showing up on the main users page.. (their is a confusion since the custom links and the data links are both saved links but they are stored in two tables... I think

2- How do a user delete the custom links? deleting all is not deleting the custom links
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] MyLinks Plug in In reply to
>>
1- the custom links are nt showing up on the main users page.. (their is a confusion since the custom links and the data links are both saved links but they are stored in two tables... I think
<<

Yeah they aren't meant to. I kept them seperate. There is a link at the top to view the custom links - "View Custom".

>>
2- How do a user delete the custom links? deleting all is not deleting the custom links
<<

Whoops, I forgot to add a delete function...will add it.
Quote Reply
Re: [katabd] MyLinks Plug in In reply to
Hi,

I've updated the plugin so users can delete custom links.
Quote Reply
Re: [Paul] MyLinks Plug in In reply to
Thank you..
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] MyLinks Plug in In reply to
In the mylinks_custom_view.html template you may wish to add a link back to the main favorites list as I think it is missing.

<a href="<%db_cgi_url%>/mylinks.cgi">Favorites List</a>

....there is already one in mylinks_main.html linking to the custom list but I forgot the link back.

Last edited by:

Paul: Mar 26, 2002, 5:30 AM
Quote Reply
Re: [Paul] MyLinks Plug in In reply to
Thanks for the tip..

Is there a Global or a way to insert the custom links for the users in the public page?

I think that will make the display of those links optional for the admin..

Also..

Have you find out the way to allow users to delete custom links?
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] MyLinks Plug in In reply to
>>
Is there a Global or a way to insert the custom links for the users in the public page?
<<

Currently not. You could do it wil a global if you wanted. Something like:

Code:
sub {
my $output;
my $sth = $DB->table('MyLinks_Custom')->select( { UserID => $USER->{Username} } );
while (my $rec = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display('mylinks_custom_link', $rec);
}
return $output;
}

That isn't tested but beware that it will select all records for the user and not do any spanning.

>>
Have you find out the way to allow users to delete custom links?
<<

See post 3 Smile
Quote Reply
Re: [Paul] MyLinks Plug in In reply to
Hi paul

This global will return a list of all users custom links, or i will have to create a global for each user..

Is there an easier way to create one global that will work for all users (auto pick their username and custom links)?
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] MyLinks Plug in In reply to
It uses $USER->{Username} so will select the links for the logged in user.
Quote Reply
Re: [Paul] MyLinks Plug in In reply to
Hi

when i tried it it returns a list of all users custom links.
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] MyLinks Plug in In reply to
Oh you want them to show to the public...hmm you can't use a global for that.

It would mean editing the plugin. You'd need to make a copy of the custom_view routine in MyLinks_DB.pm, then at the top of it add:

my $user = $IN->param('user');

...and replace all occurances of :

$USER->{Username} ...with...$user

Then you can do mylinks.cgi?do=your_new_routine&user=<%UserID%>

Last edited by:

Paul: Mar 28, 2002, 8:57 AM
Quote Reply
Re: [Paul] MyLinks Plug in In reply to
Hi paul

I already have this done..

the problem is I want that list to be available in the users_favorites public page..

The instruction you gave works great to display the custom links in a separate page..
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] MyLinks Plug in In reply to
You'd need to put the select query from that routine:

Code:
my $some_output;
my $tab = $DB->table('MyLinks_Custom');
$tab->select_options("ORDER BY $ord $way", "LIMIT $low,$mh");
my $sth = $tab->select( { UserID => $IN->param('user') } );
while (my $rec = $sth->fetchrow_hashref) {
$some_output .= Links::SiteHTML::display('mylinks_custom_link', $rec );
}

.... into the user_favorites routine and then send the output to the template by adding a new tag..

{ custom_fave => $some_output }

....but remember if they choose to span 5 per page, they'll get favorites x 5 plus 5 x custom links too.

Last edited by:

Paul: Mar 29, 2002, 2:09 AM
Quote Reply
[Paul] MyLinks Plug in Bug In reply to
Hi Paul

For some reason..

Some of my users are getting errors when trying to save links..

Oops, we had the following problem:

You have reached you saved link maximum!

They have no favorites on file and I could not find a limit configuration for the users.
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] [Paul] MyLinks Plug in Bug In reply to
Next to the installed plugin click "Edit" ....there are several options there.
Quote Reply
Re: [Paul] [Paul] MyLinks Plug in Bug In reply to
Hey Paul

Sory but there are no options there at all..

what I see is

Plugin Details Plugin: MyLinks_DB Version: 1.0.0 Author: Paul Wilson License: Commercial Description: This plugin allows your visitors to save their favorite links. As it uses your database to save the links there are no access restrictions as with cookies.




Any ideas?
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] [Paul] MyLinks Plug in Bug In reply to
Below that you should see:

Plugin Options

Screenshot attached.

Last edited by:

Paul: Mar 31, 2002, 2:04 AM
Quote Reply
Re: [Paul] [Paul] MyLinks Plug in Bug In reply to
Hi

I had to uninstall then reinstall the plug in to get it working..

have no idea what caused it..

Thanks Smile
Regards
KaTaBd

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