Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [brewt] unknown tag

Quote Reply
Re: [brewt] unknown tag In reply to
it looks like Andy is too busy to see this:

can you take a look at SendEmailAfterAdd.pm

and tell me what changes needed to fix this:


# ==================================================================
# Plugins::SendEmailAfterAdd - Auto Generated Program Module
#
# Plugins::SendEmailAfterAdd
# Author : Andy Newby (Ultranerds)
# Version : 1
# Updated : Tue Feb 15 08:29:24 2005
#
# ==================================================================
#

package Plugins::SendEmailAfterAdd;
# ==================================================================

use strict;
use GT::Base;
use GT::Plugins qw/STOP CONTINUE/;
use Links qw/$CFG $IN $DB $USER/;
use GT::Template;

# Inherit from base class for debug and error methods
@Plugins::SendEmailAfterAdd::ISA = qw(GT::Base);

# Your code begins here! Good Luck!


# PLUGIN HOOKS
# ===================================================================


sub user_add_link {
# -----------------------------------------------------------------------------
# This subroutine will be called whenever the hook 'user_add_link' is run. You
# should call GT::Plugins->action(STOP) if you don't want the regular
# 'user_add_link' code to run, otherwise the code will continue as normal.
#
my (@args) = @_;

my $newIN;
%$newIN = map { $_ => $IN->param($_) } $IN->param;
$newIN->{ID} = $DB->table('CatLinks')->select( ['MAX(LinkID)'] )->fetchrow;
$newIN->{Category} = get_cat($IN->param('CatLinks.CategoryID'));
my $message = GT::Template->parse( 'add-email-pre.txt', { %$newIN, %$USER, %$CFG }, { compress => 0 } );

my $support_email = $CFG->{db_admin_email};
my $subject = "AICCSA 2007 Submission Received...";

require GT::Mail;
$GT::Mail::error ||= ''; # Silence -w
GT::Mail->send (
smtp => $CFG->{db_smtp_server},
sendmail => $CFG->{db_mail_path},
from => $support_email,
subject => $subject,
to => $IN->param('Contact_Email'),
msg => $message,
debug => $Links::DEBUG
) or Links::fatal ("Unable to send mail: $GT::Mail::error");

return @args;
}

sub get_cat {
my $catid = $_[0];
my $cat = $DB->table('Category')->get($catid);
return $cat->{Full_Name};
}

# Always end with a 1.
1;
Subject Author Views Date
Thread unknown tag theguy 11460 Jun 17, 2006, 2:15 AM
Thread Re: [theguy] unknown tag
theguy 11291 Jun 18, 2006, 11:29 PM
Thread Re: [theguy] unknown tag
Andy 11269 Jun 19, 2006, 7:07 AM
Thread Re: [Andy] unknown tag
theguy 11289 Jun 19, 2006, 12:31 PM
Thread Re: [theguy] unknown tag
Andy 11288 Jun 19, 2006, 12:57 PM
Thread Re: [Andy] unknown tag
theguy 11308 Jun 19, 2006, 1:47 PM
Thread Re: [theguy] unknown tag
Andy 11333 Jun 19, 2006, 2:20 PM
Thread Re: [Andy] unknown tag
theguy 11256 Jun 20, 2006, 4:23 AM
Thread Re: [theguy] unknown tag
Andy 11256 Jun 20, 2006, 4:37 AM
Thread Re: [Andy] unknown tag
theguy 11249 Jun 20, 2006, 12:34 PM
Thread Re: [theguy] unknown tag
Andy 11240 Jun 20, 2006, 12:49 PM
Thread Re: [Andy] unknown tag
theguy 11219 Jun 21, 2006, 12:02 AM
Thread Re: [theguy] unknown tag
Andy 11305 Jun 21, 2006, 6:36 AM
Thread Re: [Andy] unknown tag
theguy 11237 Jul 28, 2006, 4:03 PM
Thread Re: [theguy] unknown tag
brewt 11174 Jul 31, 2006, 1:12 PM
Post Re: [brewt] unknown tag
theguy 11169 Jul 31, 2006, 1:29 PM
Thread Re: [brewt] unknown tag
theguy 11158 Aug 1, 2006, 3:04 AM
Thread Re: [theguy] unknown tag
fuzzy logic 11165 Aug 1, 2006, 9:02 AM
Thread Re: [fuzzy logic] unknown tag
theguy 11148 Aug 1, 2006, 2:09 PM
Thread Re: [theguy] unknown tag
fuzzy logic 11167 Aug 1, 2006, 2:31 PM
Thread Re: [fuzzy logic] unknown tag
theguy 11132 Aug 1, 2006, 3:22 PM
Thread Re: [theguy] unknown tag
theguy 11143 Aug 7, 2006, 12:10 PM
Post Re: [theguy] unknown tag
jdgamble 11076 Aug 7, 2006, 2:08 PM