Gossamer Forum
Quote Reply
PRE Hook not working?
This us abboyiung me quite a bit. I am trying to setup a hook, to run &do_checks in my .pm file. The code I have is;

Code:
# ==================================================================
# Plugins::Recip_Link - Auto Generated Program Module
#
# Plugins::Recip_Link
# Author : Andy Newby
# Version : 1
# Updated : Mon Aug 19 11:30:50 2002
#
# ==================================================================
#

package Plugins::Recip_Link;
# ==================================================================

use strict;
use GT::Base;
use GT::Plugins qw/STOP CONTINUE/;
use GT::Socket;
use Links::SiteHTML;
use GT::SQL;
use Links::Plugins;
use Links qw/$CFG $IN $DB/;

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

# Your code begins here! Good Luck!


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


sub do_checks {
# -------------------------------------------------------------------
# set the header...
print $IN->header();

# print this, just to see if it will work!
print "doing stuiff";


}

# ADMIN MENU OPTIONS
# ===================================================================

sub readme {
# -------------------------------------------------------------------
# This subroutine will get called whenever the user clicks
# on 'Readme' in the admin menu. Remember, you need to print
# your own content-type headers; you should use
#
# print $IN->header();
#

}

# Always end with a 1.
1;

I've just done a normal print there, in hope that it will print that out when the hook is called...

In Install.pm, I have this for setting up the hook;

Code:
$mgr->install_hooks ( 'Recip_Link', [ ['do_checks', 'PRE', 'Plugins::Recip_Link::do_checks', 'FIRST'] ]);

Anyone got any ideas why the PRE hook is not being called?

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!
Subject Author Views Date
Thread PRE Hook not working? Andy 5544 Aug 19, 2002, 3:54 AM
Thread Re: [Andy] PRE Hook not working?
yogi 5414 Aug 19, 2002, 4:30 AM
Thread Re: [yogi] PRE Hook not working?
Andy 5412 Aug 19, 2002, 5:00 AM
Post Re: [Andy] PRE Hook not working?
yogi 5389 Aug 19, 2002, 5:03 AM
Thread Re: [Andy] PRE Hook not working?
rgbworld 5205 Jun 19, 2006, 1:48 AM
Post Re: [rgbworld] PRE Hook not working?
Andy 5190 Jun 19, 2006, 2:21 AM
Thread Re: [rgbworld] PRE Hook not working?
pugdog 5174 Jun 19, 2006, 9:37 AM
Thread Re: [pugdog] PRE Hook not working?
rgbworld 5200 Jun 19, 2006, 12:14 PM
Thread Re: [rgbworld] PRE Hook not working?
brewt 5185 Jun 19, 2006, 12:47 PM
Post Re: [brewt] PRE Hook not working?
rgbworld 5143 Jun 19, 2006, 1:29 PM