Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Re: [webmaster33] Install a global from a plugin?

Quote Reply
Re: [webmaster33] Install a global from a plugin? In reply to
Thanks Webmaster.

Code:


sub {

#Editor Monitor Plug-in

my $tags = shift;
my $cat_id = $tags->{'ID'};
my $cat_db = $DB->table('Category');
my $parents = $cat_db->parents($cat_id);
push @$parents, $cat_id;

my $ed_db = $DB->table('Editors', 'Users');
my $sth = $ed_db->select ( GT::SQL::Condition->new('CategoryID', 'IN', $parents) );
return {} unless ($sth->rows);

# Make any formatting changes you need here.
my $output = qq~<font color="#FF3300" size="3"><b>Editors: </b></font> ~;
my @editors;
my %seen;
while (my $user = $sth->fetchrow_hashref) {
next if ($seen{$user->{Username}}++);
$output .= qq~
<a href="$CFG->{build_root_url}/editors/profiles/$user->{Username}.html">$user->{Username}</a>
~;
push @editors, $user;
}
#return { editors => $output, editors_loop => \@editors };
return $output;
}


http://www.iuni.com/...tware/web/index.html
Links Plugins
Subject Author Views Date
Thread Install a global from a plugin? Ian 7356 May 20, 2002, 9:54 PM
Thread Re: [Ian] Install a global from a plugin?
yogi 7081 May 20, 2002, 10:31 PM
Thread Re: [yogi] Install a global from a plugin?
Ian 7107 May 20, 2002, 10:36 PM
Thread Re: [Ian] Install a global from a plugin?
pugdog 7135 May 27, 2002, 3:28 AM
Thread Re: [pugdog] Install a global from a plugin?
webmaster33 7106 May 27, 2002, 4:13 AM
Post Re: [webmaster33] Install a global from a plugin?
pugdog 7102 May 28, 2002, 9:28 AM
Post Re: [pugdog] Install a global from a plugin?
Ian 7063 May 28, 2002, 5:33 PM
Thread Re: [yogi] Install a global from a plugin?
Ian 7012 May 31, 2002, 11:52 AM
Thread Re: [Ian] Install a global from a plugin?
yogi 7078 May 31, 2002, 1:17 PM
Thread Re: [yogi] Install a global from a plugin?
Ian 7038 May 31, 2002, 1:35 PM
Thread Re: [Ian] Install a global from a plugin?
webmaster33 7058 May 31, 2002, 11:46 PM
Thread Re: [webmaster33] Install a global from a plugin?
Ian 7089 Jun 1, 2002, 8:18 AM
Thread Re: [Ian] Install a global from a plugin?
webmaster33 7098 Jun 2, 2002, 3:54 AM
Thread Re: [webmaster33] Install a global from a plugin?
Ian 7005 Jun 2, 2002, 8:50 AM
Thread Re: [Ian] Install a global from a plugin?
webmaster33 7167 Jun 2, 2002, 9:13 AM
Post Re: [webmaster33] Install a global from a plugin?
Ian 6988 Jun 2, 2002, 9:21 AM