Permalink
Browse files

Misc. changes and doc updates for 1.0.9 (?); updates for 'code' postmode

  • Loading branch information...
1 parent c5af054 commit 669ebe7ef0e0285940d363f5407cdf585680f174 @pudge pudge committed Oct 2, 2000
Showing with 61 additions and 72 deletions.
  1. +8 −3 CHANGES
  2. +3 −2 Slash.pm
  3. +12 −12 docs/INSTALL
  4. +11 −11 docs/INSTALL.html
  5. +11 −10 docs/INSTALL.pod
  6. +14 −33 sql/adminuser_create.pl
  7. +1 −0 sql/slashdata_dump.sql
  8. +1 −1 sql/updates/1.0.9/db_update.sql
View
11 CHANGES
@@ -1,4 +1,4 @@
-slash-1.0.9, 2000.09.30
+slash-1.0.9, 2000.10.02
-----------------------
* Slash now counts the number of times a user is moderated
@@ -16,9 +16,14 @@ slash-1.0.9, 2000.09.30
* Change passwd text in users.pl from 20 max chars to 12
+* Add new postmode, "code", for posting code; essentially
+ the same as extrans, but wraps all input in <CODE> HTML
+ tag
+
* Removed default admin users from default db dump, which can be
- now created with a new script in sql/adminuser_create.pl (due
- to hack on slashdot)
+ created now with the new script sql/adminuser_create.pl, due
+ to security hole in knowing admin username/password
+
slash-1.0.8, 2000.08.18
-----------------------
View
5 Slash.pm
@@ -1206,7 +1206,7 @@ sub stripByMode {
# ASCII only ?
# $str =~ s/[^\011\040\033-176]/sprintf '&#%d;', ord $1/ge;
- if ($fmode eq 'literal' || $fmode eq 'exttrans' || $fmode eq 'attribute') {
+ if ($fmode eq 'literal' || $fmode eq 'exttrans' || $fmode eq 'attribute' || $fmode eq 'code') {
$str =~ s/(\S{90})/$1 /g unless $no_white_fix;
# Encode all HTML tags
$str =~ s/&/&amp;/g;
@@ -1215,13 +1215,14 @@ sub stripByMode {
}
# this "if" block part of patch from Ben Tilly
- if ($fmode eq 'plaintext' || $fmode eq 'exttrans') {
+ if ($fmode eq 'plaintext' || $fmode eq 'exttrans' || $fmode eq 'code') {
$str = stripBadHtml($str, $no_white_fix);
$str =~ s/\n/<BR>/gi; # pp breaks
$str =~ s/(?:<BR>\s*){2,}<BR>/<BR><BR>/gi;
# Preserve leading indents
$str =~ s/\t/ /g;
$str =~ s/<BR>\n?( +)/"<BR>\n" . ("&nbsp; " x length($1))/ieg;
+ $str = '<CODE>' . $str . '</CODE>' if $fmode eq 'code';
} elsif ($fmode eq 'nohtml') {
$str =~ s/<.*?>//g;
View
24 docs/INSTALL
@@ -645,17 +645,17 @@ INSTALLATION AND SETUP
Other Upgrades
- From To Run Scipts in Dir
- ------- ------- --------------------
- 0.9.5 -> 1.0.0 sql/updates/1.0.0/
- 1.0.0 -> 1.0.0.1 sql/updates/1.0.0.1/
- 1.0.0.1 -> 1.0.2 sql/updates/1.0.2/
- 1.0.2 -> 1.0.3 sql/updates/1.0.3/
- 1.0.3 -> 1.0.4 sql/updates/1.0.4/
- 1.0.4 -> 1.0.5 sql/updates/1.0.5/
- 1.0.5 -> 1.0.6 sql/updates/1.0.6/
+ From To Run Scipts in Dir
+ ------- ------- --------------------
+ 0.9.5 -> 1.0.0 sql/updates/1.0.0/
+ 1.0.0 -> 1.0.0.1 sql/updates/1.0.0.1/
+ 1.0.0.1 -> 1.0.2 sql/updates/1.0.2/
+ 1.0.2 -> 1.0.3 sql/updates/1.0.3/
+ 1.0.3 -> 1.0.4 sql/updates/1.0.4/
+ 1.0.4 -> 1.0.5 sql/updates/1.0.5/
+ 1.0.5 -> 1.0.6 sql/updates/1.0.6/
+ 1.0.{6-8} -> 1.0.9 sql/updates/1.0.9/
AUTHOR
- Patrick Galbraith and Chris Nandor. Last Modified August 18,
- 2000.
-
+ Patrick Galbraith and Chris Nandor. Last Modified Monday,
+ October 2, 2000.
View
22 docs/INSTALL.html
@@ -1,7 +1,6 @@
<HTML>
<HEAD>
<TITLE>INSTALL - Slash Installation</TITLE>
-<LINK REV="made" HREF="mailto:slash@cpu70.andover.net">
</HEAD>
<BODY>
@@ -814,21 +813,22 @@
<HR>
<H2><A NAME="Other_Upgrades">Other Upgrades</A></H2>
<P>
-<PRE> From To Run Scipts in Dir
- ------- ------- --------------------
- 0.9.5 -&gt; 1.0.0 sql/updates/1.0.0/
- 1.0.0 -&gt; 1.0.0.1 sql/updates/1.0.0.1/
- 1.0.0.1 -&gt; 1.0.2 sql/updates/1.0.2/
- 1.0.2 -&gt; 1.0.3 sql/updates/1.0.3/
- 1.0.3 -&gt; 1.0.4 sql/updates/1.0.4/
- 1.0.4 -&gt; 1.0.5 sql/updates/1.0.5/
- 1.0.5 -&gt; 1.0.6 sql/updates/1.0.6/
+<PRE> From To Run Scipts in Dir
+ ------- ------- --------------------
+ 0.9.5 -&gt; 1.0.0 sql/updates/1.0.0/
+ 1.0.0 -&gt; 1.0.0.1 sql/updates/1.0.0.1/
+ 1.0.0.1 -&gt; 1.0.2 sql/updates/1.0.2/
+ 1.0.2 -&gt; 1.0.3 sql/updates/1.0.3/
+ 1.0.3 -&gt; 1.0.4 sql/updates/1.0.4/
+ 1.0.4 -&gt; 1.0.5 sql/updates/1.0.5/
+ 1.0.5 -&gt; 1.0.6 sql/updates/1.0.6/
+ 1.0.{6-8} -&gt; 1.0.9 sql/updates/1.0.9/
</PRE>
<P>
<HR>
<H1><A NAME="AUTHOR">AUTHOR</A></H1>
<P>
-Patrick Galbraith and Chris Nandor. Last Modified August 18, 2000.
+Patrick Galbraith and Chris Nandor. Last Modified Monday, October 2, 2000.
</BODY>
</HTML>
View
21 docs/INSTALL.pod
@@ -751,16 +751,17 @@ want to run the script, or whatever.
=head2 Other Upgrades
- From To Run Scipts in Dir
- ------- ------- --------------------
- 0.9.5 -> 1.0.0 sql/updates/1.0.0/
- 1.0.0 -> 1.0.0.1 sql/updates/1.0.0.1/
- 1.0.0.1 -> 1.0.2 sql/updates/1.0.2/
- 1.0.2 -> 1.0.3 sql/updates/1.0.3/
- 1.0.3 -> 1.0.4 sql/updates/1.0.4/
- 1.0.4 -> 1.0.5 sql/updates/1.0.5/
- 1.0.5 -> 1.0.6 sql/updates/1.0.6/
+ From To Run Scipts in Dir
+ ------- ------- --------------------
+ 0.9.5 -> 1.0.0 sql/updates/1.0.0/
+ 1.0.0 -> 1.0.0.1 sql/updates/1.0.0.1/
+ 1.0.0.1 -> 1.0.2 sql/updates/1.0.2/
+ 1.0.2 -> 1.0.3 sql/updates/1.0.3/
+ 1.0.3 -> 1.0.4 sql/updates/1.0.4/
+ 1.0.4 -> 1.0.5 sql/updates/1.0.5/
+ 1.0.5 -> 1.0.6 sql/updates/1.0.6/
+ 1.0.{6-8} -> 1.0.9 sql/updates/1.0.9/
=head1 AUTHOR
-Patrick Galbraith and Chris Nandor. Last Modified August 18, 2000.
+Patrick Galbraith and Chris Nandor. Last Modified Monday, October 2, 2000.
View
47 sql/adminuser_create.pl
@@ -1,28 +1,9 @@
#!/usr/bin/perl -w
###############################################################################
-# admin.pl - this code runs the site's administrative tasks page
-#
-# Copyright (C) 1997 Rob "CmdrTaco" Malda
-# malda@slashdot.org
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-#
# $Id$
###############################################################################
+
use strict;
use lib '../';
use vars '%I';
@@ -31,17 +12,15 @@
sub main {
*I = getSlashConf();
- my($adminuser,$passwd);
+ my($adminuser, $passwd);
print "This script will create a default author for your slashcode site\n";
print "What is the name of the admin you'd like to use for your site? ";
- $adminuser = <STDIN>;
- chomp($adminuser);
- print "Enter the password for this user (try to use a good password for\nsecurity's sake!) ";
- $passwd = <STDIN>;
- chomp($passwd);
-
+ chomp($adminuser = <STDIN>);
+ print "Enter the password for this user (try to use a good password for\n" .
+ "security's sake!) ";
+ chomp($passwd = <STDIN>);
- authorCreate($adminuser,$passwd) or die "unable to create adminuser $adminuser\n";
+ authorCreate($adminuser, $passwd) or die "unable to create adminuser $adminuser\n";
print <<EOT;
----------------------------------------------------------------------------------
@@ -61,16 +40,18 @@ sub main {
##################################################################
# Author create
sub authorCreate {
- my ($adminuser,$passwd) = @_;
+ my($adminuser, $passwd) = @_;
(my $matchname = lc $adminuser) =~ s/[^a-zA-Z0-9]//g;
- $I{dbh}->do("INSERT INTO authors values ('$adminuser','$adminuser','http://www.example.com','$adminuser\@example.com','test quote', 'test copy', '$passwd',10000,'','',0,'$matchname')") or print "DBI::errstr $! couldn't insert admin user\n";
-
-
+ $I{dbh}->do("INSERT INTO authors values ('$adminuser','$adminuser'," .
+ "'http://www.example.com','$adminuser\@example.com','test quote'," .
+ "'test copy','$passwd',10000,'','',0,'$matchname')")
+ or print "DBI::errstr $! couldn't insert admin user\n";
}
-main;
+main();
$I{dbh}->disconnect if $I{dbh};
+
1;
View
1 sql/slashdata_dump.sql
@@ -353,6 +353,7 @@ INSERT INTO pollquestions VALUES ('happy','Are you happy?',7,'2000-01-19 16:23:0
INSERT INTO postmodes VALUES ('plaintext','Plain Old Text');
INSERT INTO postmodes VALUES ('html','HTML Formatted');
INSERT INTO postmodes VALUES ('exttrans','Extrans (html tags to text)');
+INSERT INTO postmodes VALUES ('code','Code');
#
# Dumping data for table 'sectionblocks'
View
2 sql/updates/1.0.9/db_update.sql
@@ -1,3 +1,3 @@
alter table users_info add downmods int DEFAULT 0;
alter table users_info add upmods int DEFAULT 0;
-
+INSERT INTO postmodes VALUES ('code','Code');

0 comments on commit 669ebe7

Please sign in to comment.