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 8912 Jun 17, 2006, 2:15 AM
Thread Re: [theguy] unknown tag
theguy 8766 Jun 18, 2006, 11:29 PM
Thread Re: [theguy] unknown tag
Andy 8733 Jun 19, 2006, 7:07 AM
Thread Re: [Andy] unknown tag
theguy 8748 Jun 19, 2006, 12:31 PM
Thread Re: [theguy] unknown tag
Andy 8754 Jun 19, 2006, 12:57 PM
Thread Re: [Andy] unknown tag
theguy 8785 Jun 19, 2006, 1:47 PM
Thread Re: [theguy] unknown tag
Andy 8811 Jun 19, 2006, 2:20 PM
Thread Re: [Andy] unknown tag
theguy 8731 Jun 20, 2006, 4:23 AM
Thread Re: [theguy] unknown tag
Andy 8730 Jun 20, 2006, 4:37 AM
Thread Re: [Andy] unknown tag
theguy 8716 Jun 20, 2006, 12:34 PM
Thread Re: [theguy] unknown tag
Andy 8706 Jun 20, 2006, 12:49 PM
Thread Re: [Andy] unknown tag
theguy 8696 Jun 21, 2006, 12:02 AM
Thread Re: [theguy] unknown tag
Andy 8768 Jun 21, 2006, 6:36 AM
Thread Re: [Andy] unknown tag
theguy 8696 Jul 28, 2006, 4:03 PM
Thread Re: [theguy] unknown tag
brewt 8633 Jul 31, 2006, 1:12 PM
Post Re: [brewt] unknown tag
theguy 8641 Jul 31, 2006, 1:29 PM
Thread Re: [brewt] unknown tag
theguy 8624 Aug 1, 2006, 3:04 AM
Thread Re: [theguy] unknown tag
fuzzy logic 8636 Aug 1, 2006, 9:02 AM
Thread Re: [fuzzy logic] unknown tag
theguy 8624 Aug 1, 2006, 2:09 PM
Thread Re: [theguy] unknown tag
fuzzy logic 8643 Aug 1, 2006, 2:31 PM
Thread Re: [fuzzy logic] unknown tag
theguy 8599 Aug 1, 2006, 3:22 PM
Thread Re: [theguy] unknown tag
theguy 8616 Aug 7, 2006, 12:10 PM
Post Re: [theguy] unknown tag
jdgamble 8553 Aug 7, 2006, 2:08 PM