Scoop -- the swiss army chainsaw of content management
Front Page · Everything · News · Code · Help! · Wishlist · Project · Scoop Sites · Dev Notes · Latest CVS changes · Development Activities
cabal_box Boxes
By hurstdog , Section Code []
Posted on Mon Mar 19, 2001 at 12:00:00 PM PST
First, I must remind you. TINK5C, really. Except for this one, but thats beside the point. Anyway, here is the cabal_box, what it does is list every user with permissions above an Anonymous user and a regular User. The box is posted below.

## begin cabal_box
return '' unless ($S->have_perm('edit_user'));

my $select = qq{ select * from users where perm_group!='Anonymous' and perm_group != 'Users'};

my ($rv, $sth) = $S->db_select({
		FROM	=> 'users',
		WHAT => '*',
		WHERE => qq{perm_group!='Anonymous' and perm_group != 'Users'},
		});

return '' unless $rv;

my $retval = "";

while( my $user = $sth->fetchrow_hashref ) {
	$retval .= qq{ + ($user->{perm_group}) 
 <a href="|rootdir|?op=user;tool=info;nick=$user->{nickname}">$user->{nickname}</a><br> };

}


return $retval;
## end cabal_box


So thats it, its pretty simple. Shouldn't be too hard to get it to show whatever groups you want, too. Ok, that looks horrible unless your browser supports <code> So I'm going to set up scoop.k5 to allow <pre> too, then I'll fix the formatting (since it looks horrible in my browser)
< Relationship between boxes, templates and blocks? | auto login (w. cookie) : on/off >

Menu
· create account
· faq
· search
· report bugs
· Scoop Administrators Guide
· Scoop Box Exchange

Login
Make a new account
Username:
Password:

Related Links
· Scoop
· this one
· More on Boxes
· Also by hurstdog

Story Views
  28 Scoop users have viewed this story.

Display: Sort:
cabal_box | 3 comments (3 topical, 0 hidden)
Does't wanna work... (none / 0) (#1)
by Smirks on Tue Mar 20, 2001 at 12:47:37 PM PST

Everytime I try adding the box I get this: Error compiling box: Missing right curly or square bracket at (eval 65) line 23, at end of line syntax error at (eval 65) line 23, at EOF Everytime....

[ InTune ]


cabal_box | 3 comments (3 topical, 0 hidden)
Display: Sort:

Hosted by ScoopHost.com Powered by Scoop
All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest © 1999 The Management

create account | faq | search