summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2000-11-02 09:23:07 +0000
committerDries Buytaert <dries@buytaert.net>2000-11-02 09:23:07 +0000
commit8a866e6d51ba27eecc186e7001bfcc4af42e6dfe (patch)
tree736ae0a9b4169bd96fe7f1c94d11588a989549ea
parent70520c7b0548bd70b30b1c553bda087c7321e1dc (diff)
downloadbrdo-8a866e6d51ba27eecc186e7001bfcc4af42e6dfe.tar.gz
brdo-8a866e6d51ba27eecc186e7001bfcc4af42e6dfe.tar.bz2
- Fixed quote bug in the comment tracker.
(suggestion UnConeD) - Added anchors to comment links to easy comment navigation. (suggestion UnConeD) - Fixed duplicate `you voted' after moderating a story. (suggestion UnConeD) - Fixed quote bug in administration center. - Expanded user administration with timezone information. - Improved the theme system by eliminating the "preview" function. Let's not make the system more complex then it ought to be. - Refined watchdog administration. - ...
-rw-r--r--account.php10
-rw-r--r--admin.php69
-rw-r--r--discussion.php6
-rw-r--r--includes/admin.inc2
-rw-r--r--includes/calendar.inc2
-rw-r--r--includes/config.inc16
-rw-r--r--includes/story.inc14
-rw-r--r--includes/template.inc4
-rw-r--r--submit.php4
-rw-r--r--themes/marvin/marvin.theme37
10 files changed, 71 insertions, 93 deletions
diff --git a/account.php b/account.php
index 9c5a4e63d..79267fa9a 100644
--- a/account.php
+++ b/account.php
@@ -204,9 +204,9 @@ function account_user($uname) {
$result = db_query("SELECT c.cid, c.pid, c.sid, c.subject, c.timestamp, s.subject AS story FROM comments c LEFT JOIN users u ON u.id = c.author LEFT JOIN stories s ON s.id = c.sid WHERE u.userid = '$uname' AND c.timestamp > ". (time() - 1209600) ." ORDER BY cid DESC LIMIT 10");
while ($comment = db_fetch_object($result)) {
$box2 .= "<TABLE BORDER=\"0\" CELLPADDING=\"1\" CELLSPACING=\"1\">\n";
- $box2 .= " <TR><TD ALIGN=\"right\"><B>Comment:</B></TD><TD><A HREF=\"discussion.php?id=$comment->sid&cid=$comment->cid&pid=$comment->pid\">$comment->subject</A></TD></TR>\n";
+ $box2 .= " <TR><TD ALIGN=\"right\"><B>Comment:</B></TD><TD><A HREF=\"discussion.php?id=$comment->sid&cid=$comment->cid&pid=$comment->pid#$comment->cid\">". check_output($comment->subject) ."</A></TD></TR>\n";
$box2 .= " <TR><TD ALIGN=\"right\"><B>Date:</B></TD><TD>". format_date($comment->timestamp) ."</TD></TR>\n";
- $box2 .= " <TR><TD ALIGN=\"right\"><B>Story:</B></TD><TD><A HREF=\"discussion.php?id=$comment->sid\">$comment->story</A></TD></TR>\n";
+ $box2 .= " <TR><TD ALIGN=\"right\"><B>Story:</B></TD><TD><A HREF=\"discussion.php?id=$comment->sid\">". check_output($comment->story) ."</A></TD></TR>\n";
$box2 .= "</TABLE>\n";
$box2 .= "<BR><BR>\n";
$comments++;
@@ -348,17 +348,17 @@ function account_password($min_length=6) {
function account_comments() {
global $theme, $user;
- $info = "<P>This page might be helpful in case you want to keep track of your most recent comments in any of the discussions. You are given an overview of your comments in each of the stories you participates in along with the number of replies each comment got.\n<P>\n";
+ $info = "<P>This page might be helpful in case you want to keep track of your recent comments in any of the current discussions. You are presented an overview of your comments in each of the stories you participated in along with the number of replies each comment got.\n<P>\n";
$sresult = db_query("SELECT s.id, s.subject, COUNT(s.id) as count FROM comments c LEFT JOIN stories s ON c.sid = s.id WHERE c.author = $user->id GROUP BY s.id DESC LIMIT 5");
while ($story = db_fetch_object($sresult)) {
- $output .= "<LI>". format_plural($story->count, comment, comments) ." in story `<A HREF=\"discussion.php?id=$story->id\">$story->subject</A>`:</LI>\n";
+ $output .= "<LI>". format_plural($story->count, comment, comments) ." in story `<A HREF=\"discussion.php?id=$story->id\">". check_output($story->subject) ."</A>`:</LI>\n";
$output .= " <UL>\n";
$cresult = db_query("SELECT * FROM comments WHERE author = $user->id AND sid = $story->id");
while ($comment = db_fetch_object($cresult)) {
- $output .= " <LI><A HREF=\"discussion.php?id=$story->id&cid=$comment->cid&pid=$comment->pid\">$comment->subject</A> (<B>". format_plural(discussion_num_replies($comment->cid), "reply", "replies") ."</B>)</LI>\n";
+ $output .= " <LI><A HREF=\"discussion.php?id=$story->id&cid=$comment->cid&pid=$comment->pid#$comment->cid\">". check_output($comment->subject) ."</A> (<B>". format_plural(discussion_num_replies($comment->cid), "reply", "replies") ."</B>)</LI>\n";
}
$output .= " </UL>\n";
}
diff --git a/admin.php b/admin.php
index 18c397471..105d9645a 100644
--- a/admin.php
+++ b/admin.php
@@ -1,28 +1,13 @@
<?
-// TEMPORARY SECURITY PATCH:
-// if ($user->userid != "Dries") exit();
- if(!$PHP_AUTH_USER) {
- Header("WWW-Authenticate: Basic realm=\"Admin Area\"");
- Header("HTTP/1.0 401 Unauthorized");
- echo "The cow says: Moo! You can't come in!\n";
- exit;
- } else {
- if ($PHP_AUTH_PW != "mOo!")
- {
- Header("WWW-Authenticate: Basic realm=\"Admin Area\"");
- Header("HTTP/1.0 401 Unauthorized");
- echo "The cow says: Moo! You can't come in!\n";
- exit;
- }
- }
+ // TEMPORARY SOLUTION:
+ if ($user->id > 4) exit;
/*
* Account administration:
*/
-
function account_display($order = "username") {
- $sort = array("ID" => "id", "fake e-mail address" => "fake_email", "homepage" => "url", "hostname" => "last_host", "last access date" => "last_access", "real e-mail address" => "real_email", "real name" => "name", "status" => "status", "theme" => "theme", "username" => "userid");
+ $sort = array("ID" => "id", "fake e-mail address" => "fake_email", "homepage" => "url", "hostname" => "last_host", "last access date" => "last_access", "real e-mail address" => "real_email", "real name" => "name", "status" => "status", "theme" => "theme", "timezone" => "timezone", "username" => "userid");
$show = array("ID" => "id", "username" => "userid", "$order" => "$sort[$order]", "status" => "status");
$stat = array(0 => "blocked", 1 => "not confirmed", 2 => "open");
@@ -63,6 +48,9 @@ function account_display($order = "username") {
case "status":
$output .= " <TD ALIGN=\"center\">". $stat[$account[$value]] ."</TD>\n";
break;
+ case "timezone":
+ $output .= " <TD ALIGN=\"center\">". format_data($account[$value] / 3600) ."</TD>\n";
+ break;
case "url":
$output .= " <TD>". format_url($account[$value]) ."</TD>\n";
break;
@@ -84,7 +72,7 @@ function account_display($order = "username") {
function account_stories($id) {
$result = db_query("SELECT * FROM stories WHERE author = $id ORDER BY timestamp DESC");
while ($story = db_fetch_object($result)) {
- $output .= "<LI><A HREF=\"discussion.php?id=$story->id\">$story->subject</A></LI>\n";
+ $output .= "<LI><A HREF=\"discussion.php?id=$story->id\">". check_output($story->subject) ."</A></LI>\n";
}
return $output;
}
@@ -92,7 +80,7 @@ function account_stories($id) {
function account_comments($id) {
$result = db_query("SELECT * FROM comments WHERE author = $id ORDER BY timestamp DESC");
while ($comment = db_fetch_object($result)) {
- $output .= "<LI><A HREF=\"discussion.php?id=$comment->sid&cid=$comment->cid&pid=$comment->pid\">$comment->subject</A></LI>\n";
+ $output .= "<LI><A HREF=\"discussion.php?id=$comment->sid&cid=$comment->cid&pid=$comment->pid#$comment->cid\">". check_output($comment->subject) ."</A></LI>\n";
}
return $output;
}
@@ -115,6 +103,7 @@ function account_view($name) {
$output .= " <TR><TD ALIGN=\"right\"><B>Bio information:</B></TD><TD>". format_data($account->bio) ."</TD></TR>\n";
$output .= " <TR><TD ALIGN=\"right\"><B>Signature:</B></TD><TD>". format_data($account->signature) ."</TD></TR>\n";
$output .= " <TR><TD ALIGN=\"right\"><B>Theme:</B></TD><TD>". format_data($account->theme) ."</TD></TR>\n";
+ $output .= " <TR><TD ALIGN=\"right\"><B>Timezone:</B></TD><TD>". format_data($account->timezone / 3600) ."</TD></TR>\n";
$output .= " <TR><TD ALIGN=\"right\" VALIGN=\"top\"><B>Submitted stories:</B></TD><TD>". format_data(account_stories($account->id)) ."</TD></TR>\n";
$output .= " <TR><TD ALIGN=\"right\" VALIGN=\"top\"><B>Submitted comments:</B></TD><TD>". format_data(account_comments($account->id)) ."</TD></TR>\n";
$output .= "</TABLE>\n";
@@ -123,9 +112,9 @@ function account_view($name) {
}
/*
- * Log administration:
+ * Watchdog administration:
*/
-function log_display($order = "date") {
+function watchdog_display($order = "date") {
$colors = array("#FFFFFF", "#FFFFFF", "#90EE90", "#CD5C5C");
$fields = array("date" => "id DESC", "username" => "user", "location" => "location", "message" => "message DESC", "level" => "level DESC");
@@ -136,7 +125,7 @@ function log_display($order = "date") {
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"3\" CELLSPACING=\"0\">\n";
$output .= " <TR>\n";
$output .= " <TH ALIGN=\"right\" COLSPAN=\"4\">\n";
- $output .= " <FORM ACTION=\"admin.php?section=logs\" METHOD=\"post\">\n";
+ $output .= " <FORM ACTION=\"admin.php?section=watchdog\" METHOD=\"post\">\n";
$output .= " <SELECT NAME=\"order\">\n";
foreach ($fields as $key=>$value) {
$output .= " <OPTION VALUE=\"$key\"". ($key == $order ? " SELECTED" : "") .">Sort by $key</OPTION>\n";
@@ -148,13 +137,13 @@ function log_display($order = "date") {
$output .= " </TR>\n";
$output .= " <TR>\n";
$output .= " <TH>date</TH>\n";
- $output .= " <TH>user</TH>\n";
$output .= " <TH>message</TH>\n";
+ $output .= " <TH>user</TH>\n";
$output .= " <TH>operations</TH>\n";
$output .= " </TR>\n";
- while ($log = db_fetch_object($result)) {
- $output .= " <TR BGCOLOR=\"". $colors[$log->level] ."\"><TD>". format_date($log->timestamp) ."</TD><TD ALIGN=\"center\">". format_username($log->userid, 1) ."</A></TD><TD>". substr($log->message, 0, 44) ."</TD><TD ALIGN=\"center\"><A HREF=\"admin.php?section=logs&op=view&id=$log->id\">more</A></TD></TR>\n";
+ while ($watchdog = db_fetch_object($result)) {
+ $output .= " <TR BGCOLOR=\"". $colors[$watchdog->level] ."\"><TD>". format_date($watchdog->timestamp) ."</TD><TD>". substr(check_output($watchdog->message), 0, 44) ."</TD><TD ALIGN=\"center\">". format_username($watchdog->userid, 1) ."</A></TD><TD ALIGN=\"center\"><A HREF=\"admin.php?section=watchdog&op=view&id=$watchdog->id\">more</A></TD></TR>\n";
}
$output .= "</TABLE>\n";
@@ -162,17 +151,17 @@ function log_display($order = "date") {
print $output;
}
-function log_view($id) {
+function watchdog_view($id) {
$result = db_query("SELECT l.*, u.userid FROM watchdog l LEFT JOIN users u ON l.user = u.id WHERE l.id = $id");
- if ($log = db_fetch_object($result)) {
+ if ($watchdog = db_fetch_object($result)) {
$output .= "<TABLE BORDER=\"1\" CELLPADDING=\"3\" CELLSPACING=\"0\">\n";
- $output .= " <TR><TD ALIGN=\"right\"><B>Level:</B></TD><TD>$log->level</TD></TR>\n";
- $output .= " <TR><TD ALIGN=\"right\"><B>Date:</B></TD><TD>". format_date($log->timestamp, "extra large") ."</TD></TR>\n";
- $output .= " <TR><TD ALIGN=\"right\"><B>User:</B></TD><TD>". format_username($log->userid, 1) ."</TD></TR>\n";
- $output .= " <TR><TD ALIGN=\"right\"><B>Location:</B></TD><TD>$log->location</TD></TR>\n";
- $output .= " <TR><TD ALIGN=\"right\"><B>Message:</B></TD><TD>$log->message</TD></TR>\n";
- $output .= " <TR><TD ALIGN=\"right\"><B>Hostname:</B></TD><TD>$log->hostname</TD></TR>\n";
+ $output .= " <TR><TD ALIGN=\"right\"><B>Level:</B></TD><TD>$watchdog->level</TD></TR>\n";
+ $output .= " <TR><TD ALIGN=\"right\"><B>Date:</B></TD><TD>". format_date($watchdog->timestamp, "extra large") ."</TD></TR>\n";
+ $output .= " <TR><TD ALIGN=\"right\"><B>User:</B></TD><TD>". format_username($watchdog->userid, 1) ."</TD></TR>\n";
+ $output .= " <TR><TD ALIGN=\"right\"><B>Location:</B></TD><TD>$watchdog->location</TD></TR>\n";
+ $output .= " <TR><TD ALIGN=\"right\"><B>Message:</B></TD><TD>$watchdog->message</TD></TR>\n";
+ $output .= " <TR><TD ALIGN=\"right\"><B>Hostname:</B></TD><TD>$watchdog->hostname</TD></TR>\n";
$output .= "</TABLE>\n";
print $output;
}
@@ -331,7 +320,7 @@ function comment_display($order = "date") {
$output .= " </TR>\n";
while ($comment = db_fetch_object($result)) {
- $output .= " <TR><TD><A HREF=\"discussion.php?id=$comment->sid&cid=$comment->cid&pid=$comment->pid\">$comment->subject</A></TD><TD>". format_username($comment->userid, 1) ."</TD><TD ALIGN=\"center\"><A HREF=\"admin.php?section=comments&op=edit&id=$comment->cid\">edit</A></TD></TR>\n";
+ $output .= " <TR><TD><A HREF=\"discussion.php?id=$comment->sid&cid=$comment->cid&pid=$comment->pid#$comment->cid\">". check_output($comment->subject) ."</A></TD><TD>". format_username($comment->userid, 1) ."</TD><TD ALIGN=\"center\"><A HREF=\"admin.php?section=comments&op=edit&id=$comment->cid\">edit</A></TD></TR>\n";
}
$output .= "</TABLE>\n";
@@ -562,7 +551,7 @@ function story_display($order = "date") {
$output .= " </TR>\n";
while ($story = db_fetch_object($result)) {
- $output .= " <TR><TD><A HREF=\"discussion.php?id=$story->id\">$story->subject</A></TD><TD>". format_username($story->userid, 1) ."</TD><TD>$story->category</TD><TD ALIGN=\"center\">". $status[$story->status] ."</TD><TD ALIGN=\"center\"><A HREF=\"admin.php?section=stories&op=edit&id=$story->id\">edit</A></TD></TR>\n";
+ $output .= " <TR><TD><A HREF=\"discussion.php?id=$story->id\">". check_output($story->subject) ."</A></TD><TD>". format_username($story->userid, 1) ."</TD><TD>$story->category</TD><TD ALIGN=\"center\">". $status[$story->status] ."</TD><TD ALIGN=\"center\"><A HREF=\"admin.php?section=stories&op=edit&id=$story->id\">edit</A></TD></TR>\n";
}
$output .= "</TABLE>\n";
@@ -675,16 +664,16 @@ switch ($section) {
ban_display($category);
}
break;
- case "logs":
+ case "watchdog":
switch ($op) {
case "view":
- log_view($id);
+ watchdog_view($id);
break;
case "Update":
- log_display($order);
+ watchdog_display($order);
break;
default:
- log_display();
+ watchdog_display();
}
break;
case "stats":
diff --git a/discussion.php b/discussion.php
index b5f8805f5..24c6d6ab0 100644
--- a/discussion.php
+++ b/discussion.php
@@ -152,7 +152,7 @@ function discussion_display($sid, $pid, $cid, $level = 0) {
}
function discussion_reply($pid, $sid) {
- global $user, $theme;
+ global $user, $theme, $allowed_html;
### Extract parent-information/data:
if ($pid) {
@@ -183,6 +183,7 @@ function discussion_reply($pid, $sid) {
$output .= "<P>\n";
$output .= " <B>Comment:</B><BR>\n";
$output .= " <TEXTAREA WRAP=\"virtual\" COLS=\"50\" ROWS=\"10\" NAME=\"comment\">". check_output(check_field($user->signature)) ."</TEXTAREA><BR>\n";
+ $output .= " <SMALL><I>Allowed HTML tags: ". htmlspecialchars($allowed_html) .".</I></SMALL>\n";
$output .= "</P>\n";
### Hidden fields:
@@ -197,7 +198,7 @@ function discussion_reply($pid, $sid) {
}
function comment_preview($pid, $sid, $subject, $comment) {
- global $user, $theme;
+ global $user, $theme, $allowed_html;
### Preview comment:
$theme->comment($user->userid, check_output($subject), check_output($comment), time(), check_output($user->url), check_output($user->fake_email), "", "", "", "reply to this comment");
@@ -221,6 +222,7 @@ function comment_preview($pid, $sid, $subject, $comment) {
$output .= "<P>\n";
$output .= " <B>Comment:</B><BR>\n";
$output .= " <TEXTAREA WRAP=\"virtual\" COLS=\"50\" ROWS=\"10\" NAME=\"comment\">". check_output(check_field($comment)) ."</TEXTAREA><BR>\n";
+ $output .= " <SMALL><I>Allowed HTML tags: ". htmlspecialchars($allowed_html) .".</I></SMALL>\n";
$output .= "</P>\n";
### Hidden fields:
diff --git a/includes/admin.inc b/includes/admin.inc
index 5f7d889ae..08c8642c4 100644
--- a/includes/admin.inc
+++ b/includes/admin.inc
@@ -34,7 +34,7 @@ function admin_header() {
admin_icon("accounts");
admin_icon("misc");
admin_icon("bans");
- admin_icon("logs");
+ admin_icon("watchdog");
admin_icon("stats");
admin_icon("info");
admin_icon("home");
diff --git a/includes/calendar.inc b/includes/calendar.inc
index 561363c33..3748c3699 100644
--- a/includes/calendar.inc
+++ b/includes/calendar.inc
@@ -1,6 +1,6 @@
<?
-class calendar {
+class Calendar {
var $date;
function calendar($date) {
diff --git a/includes/config.inc b/includes/config.inc
index c5fdffd8f..8a4b9b2d6 100644
--- a/includes/config.inc
+++ b/includes/config.inc
@@ -11,17 +11,17 @@
#$dbname = "droporg";
### http://beta.drop.org/:
-$dbhost = "zind.net";
-$dbuname = "dries";
-$dbpass = "Abc123";
-$dbname = "dries";
-
-### http://dione/:
-#$dbhost = "";
+#$dbhost = "zind.net";
#$dbuname = "dries";
-#$dbpass = "oakley";
+#$dbpass = "Abc123";
#$dbname = "dries";
+### http://dione/:
+$dbhost = "";
+$dbuname = "dries";
+$dbpass = "oakley";
+$dbname = "dries";
+
#
# Name of the site
#
diff --git a/includes/story.inc b/includes/story.inc
new file mode 100644
index 000000000..31deede65
--- /dev/null
+++ b/includes/story.inc
@@ -0,0 +1,14 @@
+<?
+
+class Story {
+ function story($userid, $subject, $abstract, $article, $category, $timestamp) {
+ $this->userid = $userid;
+ $this->subject = $subject;
+ $this->abstract = $abstract;
+ $this->article = $article;
+ $this->category = $category;
+ $this->timestamp = $timestamp;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/includes/template.inc b/includes/template.inc
index 0190d4293..61d1d97db 100644
--- a/includes/template.inc
+++ b/includes/template.inc
@@ -12,7 +12,7 @@ function display_moderation_results($theme, $story) {
$output .= "<P>\n";
$output .= "<B>Other people voted:</B><BR>\n";
- $result = db_query("SELECT * FROM users WHERE history LIKE '%s$story->id%'");
+ $result = db_query("SELECT * FROM users WHERE id != $user->id AND history LIKE '%s$story->id%'");
while ($account = db_fetch_object($result)) {
$output .= "". format_username($account->userid) ." voted `". user_getHistory($account->history, "s$story->id") ."'.<BR>";
}
@@ -98,7 +98,7 @@ function display_new_headlines($theme, $num = 10) {
function display_calendar($theme, $date) {
include "includes/calendar.inc";
- $calendar = new calendar($date);
+ $calendar = new Calendar($date);
$theme->box("Browse archives", $calendar->display());
}
diff --git a/submit.php b/submit.php
index f255fde5b..18eeb2a42 100644
--- a/submit.php
+++ b/submit.php
@@ -58,6 +58,8 @@ function submit_enter() {
function submit_preview($subject, $abstract, $article, $category) {
global $categories, $allowed_html, $theme, $user;
+ include "includes/story.inc";
+
$output .= "<FORM ACTION=\"submit.php\" METHOD=\"post\">\n";
$output .= "<P>\n";
@@ -118,7 +120,7 @@ function submit_preview($subject, $abstract, $article, $category) {
$output .= "</FORM>\n";
$theme->header();
- $theme->preview($user->userid, check_output($subject), check_output($abstract), "", check_output($article), format_date(time(), "extra large"), check_output($category), "we-hate-typoes");
+ $theme->article(new Story($user->userid, check_output($subject), check_output($abstract), check_output($article), check_output($category), time()));
$theme->box("Submit a story", $output);
$theme->footer();
}
diff --git a/themes/marvin/marvin.theme b/themes/marvin/marvin.theme
index 3bd0d154c..5512ebe1b 100644
--- a/themes/marvin/marvin.theme
+++ b/themes/marvin/marvin.theme
@@ -38,7 +38,7 @@
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" ALINK="#CCCCCC" LINK="#665555" VLINK="#665555">
<TABLE BORDER="0" CELLPADDING="8" CELLSPACING="0">
<TR>
- <TD ROWSPAN="3" WIDTH="30">&nbsp;</TD>
+ <TD WIDTH="30" ROWSPAN="3">&nbsp;</TD>
<TD WIDTH="470"><A HREF=""><IMG SRC="themes/marvin/images/logo.gif" ALT="drop.org" BORDER="0"></A></TD>
<TD WIDTH="180">
<LI>Create an <A HREF="account.php?op=register">account</A> and <A HREF="submit.php">submit</A> new stories.</LI>
@@ -64,7 +64,7 @@
print " <TR VALIGN=\"bottom\"><TD COLSPAN=\"2\" BGCOLOR=\"#000000\" WIDTH=\"100%\"><IMG SRC=\"themes/marvin/images/pixel.gif\" WIDTH=\"1\" HEIGHT=\"0\" ALT=\"\"></TD></TR>\n";
print " <TR>\n";
print " <TD>\n";
- print " <FONT COLOR=\"#7C7C7C\"><SMALL>Posted by ". format_username($story->userid) ." on ". format_date($story->timestamp, "extra large"). ""; ?><? if ($story->department) print "<BR>from the $story->department dept."; ?><? print "</SMALL></FONT></TD><TD ALIGN=\"right\" VALIGN=\"top\" NOWRAP><SMALL><A HREF=\"search.php?category=". urlencode($story->category) ."\"><FONT COLOR=\"#83997A\">$story->category</FONT></A></SMALL>\n";
+ print " <FONT COLOR=\"#7C7C7C\"><SMALL>Submitted by ". format_username($story->userid) ." on ". format_date($story->timestamp, "extra large"). ""; ?><? if ($story->department) print "<BR>from the $story->department dept."; ?><? print "</SMALL></FONT></TD><TD ALIGN=\"right\" VALIGN=\"top\" NOWRAP><SMALL><A HREF=\"search.php?category=". urlencode($story->category) ."\"><FONT COLOR=\"#83997A\">$story->category</FONT></A></SMALL>\n";
print " </TD>\n";
print " </TR>\n";
print " <TR><TD COLSPAN=\"2\">&nbsp;</TD></TR>\n";
@@ -86,13 +86,13 @@
# comments). It's what you get when you followed for
# instance one of read-more links on the main page.
function article($story, $reply) {
- print "\n<!-- story: \"$story->subject\" -->\n";
+ print "\n<!-- story: \"$story->subject\" -->\n";
print "<TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"2\" WIDTH=\"100%\">\n";
print " <TR><TD COLSPAN=\"2\"><IMG SRC=\"themes/marvin/images/drop.gif\" ALT=\"\"> &nbsp; <B>$story->subject</B></TD></TR>\n";
print " <TR VALIGN=\"bottom\"><TD COLSPAN=\"2\" BGCOLOR=\"#000000\" WIDTH=\"100%\"><IMG SRC=\"themes/marvin/images/pixel.gif\" WIDTH=\"1\" HEIGHT=\"0\" ALT=\"\"></TD></TR>\n";
print " <TR>\n";
print " <TD>\n";
- print " <FONT COLOR=\"#7C7C7C\"><SMALL>Posted by ". format_username($story->userid) ." on ". format_date($story->timestamp, "extra large") .""; ?><? if ($story->department) print "<BR>from the $story->department dept."; ?><? print "</SMALL></FONT></TD><TD ALIGN=\"right\" VALIGN=\"top\" NOWRAP><SMALL><A HREF=\"search.php?category=". urlencode($story->category) ."\"><FONT COLOR=\"#83997A\">$story->category</FONT></A></SMALL>\n";
+ print " <FONT COLOR=\"#7C7C7C\"><SMALL>Submitted by ". format_username($story->userid) ." on ". format_date($story->timestamp, "extra large") .""; ?><? if ($story->department) print "<BR>from the $story->department dept."; ?><? print "</SMALL></FONT></TD><TD ALIGN=\"right\" VALIGN=\"top\" NOWRAP><SMALL><A HREF=\"search.php?category=". urlencode($story->category) ."\"><FONT COLOR=\"#83997A\">$story->category</FONT></A></SMALL>\n";
print " </TD>\n";
print " </TR>\n";
print " <TR><TD COLSPAN=\"2\">&nbsp;</TD></TR>\n";
@@ -231,35 +231,6 @@
}
######
- # Syntax.......: preview(...);
- # Description..: this function is used to preview a story and is used at
- # different parts of the homepage: when a visitors sumbits
- # news, when an editor wants to post news, when people
- # check the entries in the sumbission queue, etc.
- function preview($author, $subject, $abstract, $updates, $article, $timestamp, $category, $department) {
- print "<TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"2\" WIDTH=\"100%\">";
- print " <TR><TD COLSPAN=\"2\"><B>$subject</B></TD></TR>";
- print " <TR VALIGN=\"bottom\"><TD COLSPAN=\"2\" BGCOLOR=\"#000000\" WIDTH=\"100%\"><IMG SRC=\"themes/marvin/images/pixel.gif\" WIDTH=\"1\" HEIGHT=\"0\" ALT=\"\"></TD></TR>";
- print " <TR>";
- print " <TD>";
- print " <FONT COLOR=\"#7C7C7C\"><SMALL>Posted by ". format_username($author) ." on $timestamp"; ?><? if ($department) print "<BR>from the $department dept."; ?><? print "</SMALL></FONT></TD><TD ALIGN=\"right\" VALIGN=\"top\" NOWRAP><SMALL><A HREF=\"search.php?category=". urlencode($category) ."\"><FONT COLOR=\"#83997A\">$category</FONT></A></SMALL>\n";
- print " </TD>";
- print " </TR>";
- print " <TR><TD COLSPAN=\"2\">&nbsp;</TD></TR>";
- print " <TR>";
- print " <TD COLSPAN=\"2\">";
- if ($abstract) print "<P>". check_output($abstract, 1) ."</P>";
- if ($comments) print "<P><FONT COLOR=\"$this->bgcolor2\">Editor's note:</FONT> ". check_output($comments, 1) ."</P>";
- if ($article) print "<P>". check_output($article, 1) ."</P>";
- print " </TD>";
- print " </TR>";
- print " <TR><TD COLSPAN=\"2\">&nbsp;</TD></TR>";
- print " <TR><TD COLSPAN=\"2\">$link</TD></TR>";
- print "</TABLE>";
- print "<BR><BR>";
- }
-
- ######
# Syntax.......: box($subject, $body);
# Description..: a function to draw a box/block.
function box($subject, $content) {