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.3-00
parent
75129c1fdd
commit
e214bd06c6
|
@ -159,7 +159,7 @@ switch ($op) {
|
|||
}
|
||||
}
|
||||
break;
|
||||
case "edituser":
|
||||
case "user":
|
||||
if ($user && $user->valid()) {
|
||||
### Generate output/content:
|
||||
$output .= "<FORM ACTION=\"account.php\" METHOD=post>\n";
|
||||
|
@ -180,7 +180,7 @@ switch ($op) {
|
|||
$output .= "<I>Optional. This biographical information is publicly displayed on your user page.</I><P>\n";
|
||||
$output .= "<B>User block:</B> (255 char limit)<BR>\n";
|
||||
$output .= "<TEXTAREA NAME=\"edit[ublock]\" COLS=35 ROWS=5 WRAP=virtual>$user->ublock</TEXTAREA><BR>\n";
|
||||
$output .= "<INPUT NAME=\"edit[ublockon]\" TYPE=checkbox". ($user->ublockon == 1 ? " CHECKED" : "") .">Enable user block<BR>\n";
|
||||
$output .= "<INPUT NAME=\"edit[ublockon]\" TYPE=checkbox". ($user->ublockon == 1 ? " CHECKED" : "") ."> Enable user block<BR>\n";
|
||||
$output .= "<I>Enable the checkbox and whatever you enter below will appear on your costum main page.</I><P>\n";
|
||||
$output .= "<B>Password:</B><BR>\n";
|
||||
$output .= "<INPUT TYPE=password NAME=\"edit[pass1]\" SIZE=10 MAXLENGTH=20> <INPUT TYPE=password NAME=edit[pass2] SIZE=10 MAXLENGTH=20><BR>\n";
|
||||
|
@ -201,7 +201,7 @@ switch ($op) {
|
|||
$theme->footer();
|
||||
}
|
||||
break;
|
||||
case "editpage":
|
||||
case "page":
|
||||
if ($user && $user->valid()) {
|
||||
### Generate output/content:
|
||||
$output .= "<FORM ACTION=\"account.php\" METHOD=post>\n";
|
||||
|
|
|
@ -61,8 +61,8 @@ class calendar {
|
|||
$nday++;
|
||||
}
|
||||
|
||||
### Finish the calendar:
|
||||
if ($sday != 0) {
|
||||
### Complete the calendar:
|
||||
if ($sday) {
|
||||
$end = 7 - $sday;
|
||||
$output .= " <TD COLSPAN=\"$end\"> </TD>\n </TR>\n";
|
||||
}
|
||||
|
|
|
@ -230,8 +230,8 @@ function displayAccountSettings($theme) {
|
|||
if ($user && $user->userid) {
|
||||
### Display account settings:
|
||||
$content = "<LI><A HREF=\"account.php\">User info</A></LI>";
|
||||
$content .= "<LI><A HREF=\"account.php?op=edituser\">Edit user info</A></LI>";
|
||||
$content .= "<LI><A HREF=\"account.php?op=editpage\">Customize page</A></LI>";
|
||||
$content .= "<LI><A HREF=\"account.php?op=user\">Edit user info</A></LI>";
|
||||
$content .= "<LI><A HREF=\"account.php?op=page\">Customize page</A></LI>";
|
||||
$content .= "<LI><A HREF=\"account.php?op=logout\">Logout</A></LI>";
|
||||
|
||||
$theme->box("$user->userid's account", "$content");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?PHP
|
||||
|
||||
function submit_enter() {
|
||||
global $user, $theme;
|
||||
global $user, $theme, $categories;
|
||||
|
||||
### Guidlines:
|
||||
$output .= "<P>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.</P>\n";
|
||||
|
@ -56,7 +56,7 @@ function submit_enter() {
|
|||
}
|
||||
|
||||
function submit_preview($subject, $abstract, $story, $category) {
|
||||
global $user, $theme;
|
||||
global $user, $theme, $categories;
|
||||
|
||||
$output .= "<FORM ACTION=\"submit.php\" METHOD=\"post\">\n";
|
||||
|
||||
|
|
|
@ -50,9 +50,6 @@
|
|||
|
||||
### Display admin blocks:
|
||||
displayAdminblock($this);
|
||||
|
||||
### Display referring sites:
|
||||
displayReferrals($this);
|
||||
?>
|
||||
</TD>
|
||||
<TD WIDTH="430" VALIGN="top" ALIGN="left">
|
||||
|
@ -308,7 +305,7 @@
|
|||
</TD>
|
||||
</TR>
|
||||
<?
|
||||
$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)) {
|
||||
?>
|
||||
<TR>
|
||||
|
@ -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 "<A NAME=\"$tid\">";
|
||||
echo "<A NAME=\"$cid\">";
|
||||
|
||||
### Create comment header:
|
||||
echo "<TABLE BORDER=\"0\" CELLPADDING=\"4\" CELLSPACING=\"2\" WIDTH=\"100%\">";
|
||||
|
@ -350,7 +347,7 @@
|
|||
|
||||
### Moderation:
|
||||
echo " <TD ALIGN=\"right\" ROWSPAN=\"3\" VALIGN=\"middle\" WIDTH=\"15%\">";
|
||||
echo " <SELECT NAME=\"meta:$tid\">";
|
||||
echo " <SELECT NAME=\"meta:$cid\">";
|
||||
echo " <OPTION VALUE=\"-1\">Moderate</OPTION>\n";
|
||||
for ($i = 0; $i < sizeof($comments_meta_reasons); $i++) {
|
||||
echo " <OPTION VALUE=\"$i\">$comments_meta_reasons[$i]</OPTION>\n";
|
||||
|
@ -503,43 +500,69 @@
|
|||
<?
|
||||
global $PHP_SELF;
|
||||
|
||||
$this->box("Drop where?", "<TD ALIGN=\"left\" VALIGN=\"top\"><A HREF=\"index.php\">home</A><BR><A HREF=\"faq.php\">faq</A><BR><A HREF=\"search.php\">search</A></TD><TD ALIGN=\"right\" VALIGN=\"top\"><A HREF=\"submit.php\">submit news</A><BR><A HREF=\"account.php\">your account</A><BR><A HREF=\"webboard.php\">webboard</A></TD>");
|
||||
|
||||
if (strstr($PHP_SELF, "index.php")) {
|
||||
global $user, $date;
|
||||
$this->box("Drop where?", "<TD ALIGN=\"left\" VALIGN=\"top\"><A HREF=\"index.php\">home</A><BR><A HREF=\"faq.php\">faq</A><BR><A HREF=\"search.php\">search</A></TD><TD ALIGN=\"right\" VALIGN=\"top\"><A HREF=\"submit.php\">submit news</A><BR><A HREF=\"account.php\">your account</A></TD>");
|
||||
|
||||
### 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);
|
||||
}
|
||||
|
||||
?>
|
||||
</TD>
|
||||
</TR>
|
||||
|
@ -548,7 +571,7 @@
|
|||
<IMG SRC="themes/Jeroen/images/footerleft.gif" WIDTH="20" HEIGHT="20" ALT="">
|
||||
</TD>
|
||||
<TD WIDTH="100%" BACKGROUND="themes/Jeroen/images/footer.gif" ALIGN="center" VALIGN="center" HEIGHT="20">
|
||||
<FONT COLOR="<? echo $this->hlcolor2; ?>" SIZE="2">[ <A HREF="">home</A> | <A HREF="/faq.php">faq</A> | <A HREF="/search.php">search</A> | <A HREF="/submit.php">submit news</A> | <A HREF="/account.php">your account</A> | <A HREF="/webboard.php">webboard</A> ] </FONT>
|
||||
<FONT COLOR="<? echo $this->hlcolor2; ?>" SIZE="2">[ <A HREF="">home</A> | <A HREF="faq.php">faq</A> | <A HREF="search.php">search</A> | <A HREF="submit.php">submit news</A> | <A HREF="account.php">your account</A> ] </FONT>
|
||||
</TD>
|
||||
<TD WIDTH="160" ALIGN="left" VALIGN="bottom" HEIGHT="20">
|
||||
<IMG SRC="themes/Jeroen/images/footerright.gif" WIDTH="20" HEIGHT="20" ALT="">
|
||||
|
|
Loading…
Reference in New Issue