Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Accessing review variables in admin emails

Quote Reply
Accessing review variables in admin emails
I'm trying to modify the review_modified.eml and review_added.eml admin templates to construct a URL for our review editor to access via the emails.

From what I can tell the ReviewID value isn't passed in to this template - does anyone know why this is or if there is a workaround for it?
Quote Reply
Re: [aus_dave] Accessing review variables in admin emails In reply to
Hi,

Weird... not sure why its not included in there. Should be a simple fix. In /admin/Links/User/Review.pm, find:

Code:
Links::send_email('review_modified.eml', { %$USER, %tags, %$rec }, { admin_email => 1 }) or die "Unable to send mail: $GT::Mail::error";

..and add this above it:

Code:
$rec->{ReviewID} = $input->{ReviewID};

In that same file, find:

Code:
if ($CFG->{admin_email_review_add}) {
Links::send_email('review_added.eml', { %{$USER || {}}, %$input, %$rec }, { admin_email => 1 }) or die "Unable to send mail: $GT::Mail::error";
}
..and change to:

Code:
if ($CFG->{admin_email_review_add}) {
$rec->{ReviewID} = $input->{ReviewID};
Links::send_email('review_added.eml', { %{$USER || {}}, %$input, %$rec }, { admin_email => 1 }) or die "Unable to send mail: $GT::Mail::error";
}

That should do it Smile

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] Accessing review variables in admin emails In reply to
Thanks Andy - that worked perfectly Wink.