New home page for great success
$plink = $webroot;
$head = qq{<link rel="alternate" type="application/rss+xml" title="Channel List [RSS]" href="${webroot}rss">};
- if ($login_id) {
- if (param('Create or Join Channel')) {
- my $channel = param('channel');
- $channel =~ s/^#//;
- print redirect($webroot . 'channel/' . url_encode($channel));
- next REQUEST;
- }
+ if (param('Join Channel')) {
+ my $channel = param('channel');
+ $channel =~ s/^#//;
+ print redirect($webroot . 'channel/' . url_encode($channel));
+ next REQUEST;
}
}
print p, Vector::Notify::widget($login_id, $channel_id);
}
- print p, $navigator;
+ if (@heads) {
+ print p, $navigator;
- print '<ul class="posts">';
- foreach my $h (@heads) {
- $h->print(10);
- }
- print '</ul>';
+ print '<ul class="posts">';
+ foreach my $h (@heads) {
+ $h->print(10);
+ }
+ print '</ul>';
- print p, $navigator;
+ print p, $navigator;
+ } else {
+ print p, "Channel is empty.";
+ }
if ($login_id) {
print h2('Start Thread');
}
} else {
my %env;
- if ($login_id) {
- $env{GETSTARTED} = start_form .
- textfield('channel', '', 20) .
- submit('Create or Join Channel') .
- end_form;
- } else {
- $env{GETSTARTED} = "After you log in, you can create a channel";
+ unless ($login_id) {
+ $env{GETSTARTED} = "After you log in, you can create a channel by joining a nonexistent channel and then posting.";
}
+ $env{GETSTARTED} .= p . start_form .
+ textfield('channel', '', 20) .
+ submit('Join Channel') .
+ end_form;
Vector::Template::process('home', \%env);
}
+<table width="100%" style="margin-top: 1.5em">
+<tr><td width="60%" valign="top">
+
+<h2>Hello Internet Visitor!</h2>
+
+<p>Welcome to Vector, the Dominion of Awesome's all-purpose forum for serious
+and happy fun time. With fortuitous care, Vector will provide you with many
+trouble-less years of servitude. We aim to be #1 forum emperors, and you will
+agree based on many gleaming features!
+
+<ul>
+<li>You can create channels for rousing public discussion.</li>
+<li>Discussions are organized into threads for logical convenience and proper attitude.</li>
+<li>Files can be speedily attached to any post, with thumbnails for pre-view convenience.</li>
+<li>With unique "watching" feature you will be updated on subjects that you desire via batch digest email.</li>
+<li>New! ReplyTag technology allows replying to the forum from email, as well.</li>
+</ul>
+
+<p>Please communicate fervently about the state-approved topics of your choice!
+
+<p>Note that email features may experience delay as they are not run immediately.
+
+</td><td valign="top">
+
+<h2>Get Started</h2>
+
+$GETSTARTED
+
+</td></tr>
+</table>