in reply to Re: Re: Message Board Mangling
in thread Message Board Mangling

What if the "OK Posters" is just anyone who puts "savepost" in their nick somewhere? Will
my @ok_posters = qw ( \savepost\ );
my $ok_regex = join "|", @ok_posters;
my $ok_regex = qr/(?:$ok_regex)/;
grab a nick of "John Luser savepost"?

Replies are listed 'Best First'.
Re: Re: Message Board Mangling
by Thathom (Acolyte) on Jul 13, 2001 at 01:00 UTC
    I think it would have save you alot of time if you'd set the store method up alot better.
    Maybe this way could have helped??

    SAVE THE POST
    --------------------------------------------------------
    Bring in data from FORM as usual
    Set usertype from form to be either "admin" or "guest" maybe as a type=hidden depending on whatever login rights you store.

    $message = join('|', $usertype, $username, $date, $comments); $message .= "\n"; open ("post", "/absolute/path/to/file") or print error; print post $message; close (post);
    READ THE POST(s)
    -------------------------------------------------------
    Choose to read admin only on this instance...
    $readtype = 'admin';

    open ("post", "/absolute/path/to/file") or print error; @post = <post>; close (post); foreach (@post) { ($usertype, $username, $date, $comments) = split ('[|]',$_); if ($readtype eq $usertype) { print qq| From $username ($date):<p> $comments<p> ______________________________________<br> |; } }
    This way you can pick the name off better in any future admin than having to search for it on a line.

    Maybe no help at all, but there you go.
    If its not, im sorry.
    It was good practice for my typing skills anyway :)

    ThAtH0M