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

I would, except the format isn't up to me (Unless I do some pretty major C hacking, or more code begging :p)

Replies are listed 'Best First'.
Re: Message Board Mangling
by achiles (Novice) on Jul 12, 2001 at 16:01 UTC
    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"?
      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