I was browsing throught the help file that comes with GForum, because I am trying to find out what I can do with the forum.
I am impressed with the Plugin system (though I have to figure it out first, i.e. I still have to write my first test plugin).
When I tried to do the example of how to include some code as a global variable, I noticed that the code provided should be (changes in red):
my $tags = shift;
my $post_db = $DB->table ('Post');
$post_db->select_options ('ORDER BY post_replies DESC', 'LIMIT 5');
my $sth = $post_db->select;
my @output;
while (my $post = $sth->fetchrow_hashref) {
push @output, $post;
}
return { post_loop => \@output };
}I am really looking forward to exploring the possibilities!
Ivan
-----
Iyengar Yoga Resources / GT Plugins
I am impressed with the Plugin system (though I have to figure it out first, i.e. I still have to write my first test plugin).
When I tried to do the example of how to include some code as a global variable, I noticed that the code provided should be (changes in red):
Code:
sub { my $tags = shift;
my $post_db = $DB->table ('Post');
$post_db->select_options ('ORDER BY post_replies DESC', 'LIMIT 5');
my $sth = $post_db->select;
my @output;
while (my $post = $sth->fetchrow_hashref) {
push @output, $post;
}
return { post_loop => \@output };
}
Ivan
-----
Iyengar Yoga Resources / GT Plugins