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
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] Accessing review variables in admin emails In reply to
Thanks Andy - that worked perfectly Wink.