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
Scoop Box Exchange - Show Box: user_box 1.00

Author: Scoop Developers

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 };
Display: Sort:
I'm getting (none / 0) (#1)
by chuckles on Sat Mar 04, 2006 at 08:17:46 PM PST

this at the bottom of my user_box on my site when I cut and paste this.
+ Logout scoop
%%; scoop
Just for some info, at Our Spectrum I deleted my submit diary link. So, I have cut and pasted this, but I'm getting the weirdness. Also, can anyone tell me what else do I need in this new box to make it work I want my scoop intro box, which has links to sections to have a New Diary button and maybe a new story button. perl challenged.
$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>|;





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

Scoop Site Scroller: Get one yourself!
Satanosphere
/* You are not expected to understand this. */

Login
Make a new account
Username:
Password:

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