Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Can users delete links?

Quote Reply
Can users delete links?
Hello Tongue

I wonder if the user can choose to delete link instead of modifying it?

Robo
Quote Reply
Re: [Robo] Can users delete links? In reply to
You could do this by
  1. adding a new field to the database called "Delete Requested"
  2. add a template called delete
  3. copy the stuff from modify.html into delete, however, only allowing the user to press a delete button
  4. put a link on detailed.html as such <%if Linkowner%><a href=page.cgi?p=delete&ID=<%ID%>>Delete It</a><%endif%>
  5. Insert <%Links::Utils::link_info%> into the template
  6. then, from the admin, search for links where Delete Requested eq 1

Last edited by:

TLA: Jul 23, 2002, 5:33 AM
Quote Reply
Re: [TLA] Can users delete links? In reply to
Thank you TLA Cool

I will think about it... Right now I don't want to add nothing which wouldn't be absolutely automatic, becasue the directory will be maintained by total amateurs and I am afraid that just saying "Searching the database" would scare them to death Wink

Thank you for your concern Sly

Robo
Quote Reply
Re: [,] Can users delete links? In reply to
Hi,

thank you for this idea of solving a problem.
But it does not work exactly like this for me - maybe because certain things have been changed???

in 4) one needs to change "<%if Linkowner%>" to "<%if isLinkOwner%>"
Then this part works fine

in 5) the inclusion of "<%Links::Utils::link_info%>" does not work

One gets errors that the subroutine does not exist:
---------
Error: Unable to load module: Links::Utils. Reason:

Error: No subroutine 'Links::Utils::load_ink' in 'Links/Utils.pm',
Error: No subroutine 'Links::Utils::load_ink' in 'Links.pm'
---------

If one takes a look into these files it seems that one needs to change the call against "<%Links::Utils::load_link%>"

But if I do so, I simply get "Unknown Tag" errors where the certain link should be shown.

The call looks like "...page.cgi?p=delete&ID=10" (where 10 is the correctly passed ID of the link I would like to delete.

What am I doing wrong here?


Another thing:
If I get this part running, how can I lead the user to a specific page after pressing the "Delete" button. This page shoud not be "modify_success_html" but rather a special page for this purpose.

Any help is welcome,
Lars