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;
# 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;
Anyone got any ideas why the PRE hook is not being called?
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
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
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

