Description:
This is the box that users will get to login with if they haven't logged in, or that will show them links to their diary, comments, stories, etc if they have logged in. Comes with scoop.
Box Code:
my $content;
if ($S->{UID} > 0) {
if ($S->have_perm('moderate')) {
my ($nstories, $tstories) = $S->_count_new_sub();
my $color = '';
my $c_end = '';
if ($nstories) {
$color = '<FONT COLOR="#FF0000"><B>';
$c_end = '</b></font>';
}
$content = qq|
%%dot%% <A CLASS="light" HREF="%%rootdir%%/modsub">Moderate Submissions</a> ($tstories/$color$nstories$c_end new)<BR>|;
}
if ($S->{TRUSTLEV} == 2 || $S->have_perm('super_mojo')) {
$content .= qq{
%%dot%% <A CLASS="light" HREF="%%rootdir%%/search?type=comment;hidden_comments=show">Review Hidden Comments</a><BR>};
}
my $urlnick = $S->urlify($S->{NICK});
my $diary_link = ( $S->{UI}->{VARS}->{use_diaries} ?
qq{ %%dot%% <A CLASS="light" HREF="%%rootdir%%/user/$urlnick/diary">Your Diary</a><BR>} :
qq{} );
$content .= qq|
%%dot%% <A CLASS="light" HREF="%%rootdir%%/user/$urlnick">User Info</a><BR>
%%dot%% <A CLASS="light" HREF="%%rootdir%%/user/$urlnick/comments">Your Comments</a><BR>
%%dot%% <A CLASS="light" HREF="%%rootdir%%/user/$urlnick/stories">Your Stories</a><BR>
$diary_link
%%dot%% <A CLASS="light" HREF="%%rootdir%%/submitstory/Diary">New Diary Entry</a><BR>
%%dot%% <A CLASS="light" HREF="%%rootdir%%/user/$urlnick/prefs">User Preferences</a><BR>
%%dot%% <A CLASS="light" HREF="%%rootdir%%/interface/prefs">Display Preferences</a><BR>
%%dot%% <A CLASS="light" HREF="%%rootdir%%/interface/comments">Comment Preferences</a><BR>
%%dot%% <A CLASS="light" HREF="%%rootdir%%/logout">Logout $S->{NICK}</a><BR>|;
$title = "$S->{NICK}";
} else {
$content = $S->{UI}->{BLOCKS}->{login_box};
$content =~ s/%%LOGIN_ERROR%%/$S->{LOGIN_ERROR}/;
}
return {content => $content, title => $title };
|