From e214bd06c69c150aa1575e258ff8a65ccd8a6575 Mon Sep 17 00:00:00 2001
From: Dries Buytaert
Date: Thu, 13 Jul 2000 07:21:57 +0000
Subject: [PATCH] Updates: --------
* URI/URL enhancements to make the URLs more comprehensive and shorter.
* Fixed a bug in submit.php that slipped in during the latest commit.
* Changed a few tidbits on the calendar.
* Fixed a bug in most themes:
$tid --> $cid
COUNT(tid) --> COUNT(cid)
Updated most themes except for UnConeD's.
* Fixed a handful of problems with Jeroen's theme. However, Jeroen's
theme is still not working yet - some features are completly missing,
making the theme not very useful ...
Any known bugs left? If not, I'll head on tonight and add some new
features. I'll probably add basic admin tools to edit articles and
such. Once done, we can start on the comment moderation.
---
account.php | 6 +--
calendar.class.php | 4 +-
functions.inc | 4 +-
submit.php | 4 +-
themes/jeroen/theme.class.php | 85 ++++++++++++++++++++++-------------
5 files changed, 63 insertions(+), 40 deletions(-)
diff --git a/account.php b/account.php
index e1e60cfdef1d..92015c3ae75b 100644
--- a/account.php
+++ b/account.php
@@ -159,7 +159,7 @@ switch ($op) {
}
}
break;
- case "edituser":
+ case "user":
if ($user && $user->valid()) {
### Generate output/content:
$output .= "\n";
diff --git a/calendar.class.php b/calendar.class.php
index f47846be5653..f550f73939c9 100644
--- a/calendar.class.php
+++ b/calendar.class.php
@@ -61,8 +61,8 @@ class calendar {
$nday++;
}
- ### Finish the calendar:
- if ($sday != 0) {
+ ### Complete the calendar:
+ if ($sday) {
$end = 7 - $sday;
$output .= " \n \n";
}
diff --git a/functions.inc b/functions.inc
index 2c748a9cc98e..83476c9a2731 100644
--- a/functions.inc
+++ b/functions.inc
@@ -230,8 +230,8 @@ function displayAccountSettings($theme) {
if ($user && $user->userid) {
### Display account settings:
$content = "User info ";
- $content .= "Edit user info ";
- $content .= "Customize page ";
+ $content .= "Edit user info ";
+ $content .= "Customize page ";
$content .= "Logout ";
$theme->box("$user->userid's account", "$content");
diff --git a/submit.php b/submit.php
index f94e17b6b454..1661f5b5212c 100644
--- a/submit.php
+++ b/submit.php
@@ -1,7 +1,7 @@
Got some news or some thoughts you would like to share? Fill out this form and they will automatically get whisked away to our submission queue where our moderators will frown at it, poke at it and hopefully post it. Every registered user is automatically a moderator and can vote whether or not your sumbission should be carried to the front page for discussion.
\n";
@@ -56,7 +56,7 @@ function submit_enter() {
}
function submit_preview($subject, $abstract, $story, $category) {
- global $user, $theme;
+ global $user, $theme, $categories;
$output .= "\n";
diff --git a/themes/jeroen/theme.class.php b/themes/jeroen/theme.class.php
index 33b6f767af49..866d7b623ac0 100644
--- a/themes/jeroen/theme.class.php
+++ b/themes/jeroen/theme.class.php
@@ -50,9 +50,6 @@
### Display admin blocks:
displayAdminblock($this);
-
- ### Display referring sites:
- displayReferrals($this);
?>
@@ -308,7 +305,7 @@
- $result = mysql_query("SELECT COUNT(tid) FROM comments WHERE sid = $sid AND score < $thold");
+ $result = mysql_query("SELECT COUNT(cid) FROM comments WHERE sid = $sid AND score < $thold");
if ($result && $number = mysql_result($result, 0)) {
?>
@@ -326,12 +323,12 @@
######
# Syntax.......: comment(...);
# Description..: this function is used to theme user comments.
- function comment($poster, $subject, $tid, $date, $url, $email, $score, $reason, $comment, $link, $thread = "") {
+ function comment($poster, $subject, $cid, $date, $url, $email, $score, $reason, $comment, $link, $thread = "") {
include "config.inc";
if (!eregi("[a-z0-9]",$poster)) $poster = $anonymous;
if (!eregi("[a-z0-9]",$subject)) $subject = "[no subject]";
- echo "";
+ echo " ";
### Create comment header:
echo " ";
@@ -350,7 +347,7 @@
### Moderation:
echo " ";
- echo " ";
+ echo " ";
echo " Moderate \n";
for ($i = 0; $i < sizeof($comments_meta_reasons); $i++) {
echo " $comments_meta_reasons[$i] \n";
@@ -503,43 +500,69 @@
global $PHP_SELF;
- $this->box("Drop where?", "home faq search submit news your account webboard ");
-
- if (strstr($PHP_SELF, "index.php")) {
- global $user, $date;
+ $this->box("Drop where?", "home faq search submit news your account ");
- ### Display account:
+ if (strstr($PHP_SELF, "index.php")) {
+ global $user, $date;
+
+ ### Display account:
displayAccount($this);
- ### Display calendar:
+ ### Display calendar:
displayCalendar($this, $date);
+ ### Display calendar:
+ displayOldHeadlines($this);
+
### Display voting poll:
displayPoll($this);
-
- ### Display old headlines:
- displayOldHeadlines($this);
- }
- elseif (strstr($PHP_SELF, "account.php")) {
+ }
+ elseif (strstr($PHP_SELF, "account.php")) {
### Display account settings:
displayAccountSettings($this);
- }
- elseif (strstr($PHP_SELF, "article.php")) {
- global $sid;
- ### Display account:
+ ### Display account:
+ displayAccount($this);
+ }
+ elseif (strstr($PHP_SELF, "submit.php")) {
+ ### Display account:
displayAccount($this);
-
- ### Display related links:
- displayRelatedLinks($this, $sid);
### Display new headlines:
displayNewHeadlines($this);
- }
- else {
- ### Display new headlines:
- displayNewHeadlines($this);
- }
+ }
+ elseif (strstr($PHP_SELF, "discussion.php")) {
+ global $id;
+
+ if ($id && $story = id2story($id)) {
+ if ($story->status == 2) {
+ ### Display account:
+ displayAccount($this);
+
+ ### Display related links:
+ displayRelatedLinks($this, $story);
+
+ ### Display new headlines:
+ displayNewHeadlines($this);
+ }
+ else {
+ ### Display results of moderation:
+ displayModerationResults($this, $story);
+ }
+ }
+ else {
+ ### Display account:
+ displayAccount($this);
+
+ ### Display new headlines:
+ displayNewHeadlines($this);
+ }
+ }
+ else {
+ ### Display new headlines:
+ displayNewHeadlines($this);
+ }
+
?>
@@ -548,7 +571,7 @@
- [ home | faq | search | submit news | your account | webboard ]
+ [ home | faq | search | submit news | your account ]