Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Modify record

Quote Reply
Modify record
In case of running Links-SQL not as a search-engine I need to identify a link not by URL, for example by ID, to modify the record.

How to fix this?

Michael

Quote Reply
Re: Modify record In reply to
Edit the modify.cgi script...look for URL in that file and change it to ID and you will probably have to edit other codes as well.

Regards,

Eliot Lee
Quote Reply
Re: Modify record In reply to
One of the advantages of running links with user logon enabled for adding/modifying links is that a user is presented with a list of their links and don't have to type in n ID or a URL.

So many features are tied to the ability of Links to know who is requesting the page, that running a non-membership site really makes it harder, not easier, to provide functionality to the masses.

PUGDOG® Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: Modify record In reply to
I want to use links for advertising. User must
register, than they can add and modify. It only
makes sence when they also can delete their ads.
(see other thread). The ads don´t have URL, so this
field will not be used.

Why not using ID instead of URL to identify the owner?

Michael


Quote Reply
Re: Modify record In reply to
I don't think it really makes a difference...but what pugdog was alluding to you is that rather than using columns/fields in LINKS to authenticate users, you should use the built-in USERNAME/PASSWORD authentication from the USERS table.

Simply using ID or URL as accessing records is not very secure to say the least.

Regards,

Eliot Lee
Quote Reply
Re: Modify record In reply to
Yes, I want that user identify by username and password.
The only change I want to make is, that they input the ID instead URL on the modify.html to select which record they want to modify.

You know what I mean?

Easy to fix?

Michael

Quote Reply
Re: Modify record In reply to
I saw this in modify.cgi

sub _list_owned_links {
# --------------------------------------------------------
# Display a list of links the user owns.
#

Does this mean that a list of links they own would be automaticaly displayed??

I tried it, but I get the regular form, where I need to enter the URL ......

Any setting of need to do?

Michael


Quote Reply
Re: Modify record In reply to
Ok,

now I found out:

A user who is logged in clicks on "Modify"
He get the regular modify form (that´s what I dont want)

When I spedify the Link in this way
.....modify.cgi?d=1&LinkID=2374

I will get a filled out form with all Link-Data

How to call that a list with all Links will be displayed?

This routine looks like it should do this:
sub _list_owned_links {
# --------------------------------------------------------
# Display a list of links the user owns.
#


I think I´m close to the result :)

Michael

Quote Reply
Re: Modify record In reply to
Looking at the modify.cgi:

Code:
# If we have been asked to modify a link, let's do it.
CASE: {
$IN->param('modify') and do { _modify(); last CASE; };
$IN->param('LinkID') and do { _modify_passed_in(); last CASE; };
$CFG->{user_required} or $USER and do { _list_owned_links(); last CASE; };

# Otherwise display the modify form.
_modify_form();
}
If you don't set a 'modify' and/or 'LinkID' parameter, but the user is logged in, or required, you'll go to the display link page. You could proabaly force it by:

.../modify.cgi?LinkID=&modify=





PUGDOG® Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: Modify record In reply to
Hi,

It sounds like you want to set the user_required option to yes so that users must log on before a link is added or modified.

The list of links is presented if a user is logged in.

Cheers,

Alex

--
Gossamer Threads Inc.