|
From: Blake C. <li...@li...> - 2003-12-23 14:05:03
|
Hi All,
I'm working on making a new op for the admin page to edit stuff for users
and I'm getting stuck early on.
Here's what I have. I'm not sure where I've gone wrong, I'm getting no
errors back, just a blank page. I'm not sure I'm calling getDescriptions
correctly.
I'm calling my op list_users, so "my $ops" I added:
list_users => {
function => \&listPeeps,
seclev => 500,
adminmenu => 'Users',
tab_selected => 'users',
},
This calls the sub listPeeps, which is also in admin.pl:
my($form, $slashdb, $user, $constants) = @_;
my $nickname;
my $peeps = $slashdb->getDescriptions('peeps', '', 1);
slashDisplay('listPeeps', {
nickname => $nickname
});
MySQL.pm is in MySQL.pm, to which I added peeps to %descriptions:
'peeps'
=> sub { $_[0]->sqlSelectMany('seclev, nickname, uid', 'users') },
And all of this needs a new template, listPeeps, which is simply:
<FORM ACTION="[% env.script_name %]" METHOD="POST">
<INPUT TYPE="HIDDEN" NAME="op" VALUE="vars">
<TABLE>
<TR>
<TD>Name</TD><TD>[% $nickname %]
</TR>
</TABLE>
</FORM>
The HTML does show up on the admin page, just not the list of nicknames.
Thanks!
-Blake
|