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

post_modify_link variables

Quote Reply
post_modify_link variables
Hi guys,

I have been trying to write a plug in that fires on the POST modify_link hook, but I just can't find a way to find out which link was modified. Can anyone shove me into the right direction?

Thanks.


Sacrifice is not about what you lose,
it is about what you gain in the process.
Quote Reply
Re: [EZFrag] post_modify_link variables In reply to
Hi,

This in the admin, or user side of things?

If user, just do:

$IN->param('LinkID')

Should work =)

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] post_modify_link variables In reply to
Actually, its on both ^_^ , but i'll try that one on the user side. Is there a difference for the user side and the admin side? Or can I just use the same method for the admin side without any worries?


Sacrifice is not about what you lose,
it is about what you gain in the process.
Quote Reply
Re: [EZFrag] post_modify_link variables In reply to
Hi,

Yeah, the admin side of things is quite different (as you can modify more than one link at a time)

Here is something I use (similar structure) from the validate link section:


Code:
for (my $i = 0; $i <= $in->{num_results}; $i++) {
my $link_id = $in->{"$i-ID"};
if (!$link_id) {
next;
}

my $action = $in->{$link_id."-action"};

if ($action eq "validate") {
validate_link($link_id);
} elsif ($action eq "delete") {
delete_link($link_id);
} else {
# dont do anything =)
}

print qq|got id, $link_id ($action)<br />|;
}

Not the exact code you'll need - but hopefully will get you on the right track :)

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] post_modify_link variables In reply to
Thanks Andy Smile


Sacrifice is not about what you lose,
it is about what you gain in the process.