Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Updating a link before it has been approved

Quote Reply
Updating a link before it has been approved
Is this possible ?

From the manual it seems that it should be

Page 29
Quote:

If a link has been modified by a user but has not yet been validated, the "Update" option will appear beside it. Clicking on "Update" brings up a form allowing you to either approve or reject the changes made by the user.



This is my one of my biggest problems with links and I'm not sure if it is an oversite on my part.

Lots of users start to add something and then come back later to improve it only to find that they can't modify it until it is approved

I tried taking out
Code:

<%if isValidated eq No or isUnpaid%> disabled="disabled"<%endif%>


From modify_select.html

but that just produces
Quote:
You are not authorised to modify this link


Am I missing something obvious ?

Last edited by:

chapelier: Jun 18, 2009, 2:05 PM
Quote Reply
Re: [chapelier] Updating a link before it has been approved In reply to
Hi,

You could not bring up the modify form in this case even the select box is enabled.

There are many ways to do this but I had this urgly one:

copy the current error.html temlate as error_include.html

replace its content with the below:

Code:
<%~set chk_text = Links::language('MODIFY_NOTOWNER')%>

<%if error and error eq "$chk_text" and in.LinkID ne ""%>

<%load_link($in.LinkID)~%>

<%endif%>
<%if user.Username eq "$LinkOwner"%>
<%Links::Tools::category_list()%>
<%include modify.html%>

<%else%>
<%include error_include.html%>
<%endif%>

And here is the global 'load_link' if you don't have this.


Code:
sub {
my($id)=@_;
my $link = $DB->table('Links')->get($id);
my $rec = Links::SiteHTML::tags(link => $link);

return $rec;


}

Cheers,

Dat

Programming and creating plugins and templates
Blog
Quote Reply
Re: [tandat] Updating a link before it has been approved In reply to
Thanks a lot. I'll give that a try later today and let you know how I get. on.

Cheers

Andy
Quote Reply
Re: [chapelier] Updating a link before it has been approved In reply to
Hi

I tried this but it didn't seem to work for me.

It allowed me to get back to the the form but with the error messagein red "You are not authorized to modify this link."

Then when i try to submit the form again it won't let me.
Quote Reply
Re: [chapelier] Updating a link before it has been approved In reply to
Does anyone else have an Idea how I could achieve this ?
Quote Reply
Re: [chapelier] Updating a link before it has been approved In reply to
The problem is, when someone submits an edited link, it gets saved to another table (can't remember the exact name) ... so if someone submits another change, you would need it to "update" that table, instead of trying to add another "change".

Its possible, but not simple (maybe GT would add it in the next version, as I can see a few people may like that feature)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Updating a link before it has been approved In reply to
Thanks for the reply Andy.

Yes, i think it would be a useful addition , especially for people like me who require large amounts of information on the include_form

Most people think they can come back later and finish it and they either end up adding a new link or just give up.

I'm a fan of Links but this is one thing that I have seen as commonplace on other directory scripts which seems to make sense.

Cheers

Andy