You may change other basic setting and HTML or a part of HTML (see the advice for a little learnt).
Or you may poke into email (see the advice for a good HTML user).
Handling inputs
Now you may try some real "Perl" scripting.
| ###############
# main script # ############### : : $value =~ s/%0D%0A/<br>/g; $value =~ s/%0A/<br>/g; $value =~ s/%0D/<br>/g; $value =~ s/%09/ /g; $value =~ s/%3C/</g; $value =~ s/%3E/>/g; |
The middle one, $value =~ s/%09/ /g; changes a tab to five spaces. Firstly, HTML cannot understand an ordinary tab. And secondly, I assigned a tab a special meaning within the perl scripting. So, this conversion is technically necessary. But if you do not like it, you may have a space instead of 5 or $value =~ s/%09/ /g;.
arch Board does not accept HTML tags sent by guests. If you want HTML tags able, delete the last two lines
$value =~ s/%3C/</g;
and
$value =~ s/%3E/>/g;
But you do so only after you learn the message board security and understand the risk you are going to take.
Time of an article
The time a guest posted an article is Greenwich mean time by default.
| ######################
# new message to bbs # ###################### : : $posted = gmtime($time); |
Guest's email address
And the way an email address is written
| ######################
# new message to bbs # ###################### : : if ($data{'email'}) { $gname = "<a href=\"mailto:$data{'email'}\">$data{'name'}</a>"; } else { $gname = $data{'name'}; } |
| ######################
# new message to bbs # ###################### : : $data{'email'} = "<a href=\"mailto:$data{'email'}\">$data{'email'}</a>"; |
Ban access
You can limit the access by checking the IP address, $ENV{'REMOTE_ADDR'} or checking the browser, $ENV{'HTTP_USER_AGENT'}. To ban an IP address, go to
| ################
# main script # ################ if ($ENV{'REQUEST_METHOD'} ne 'POST') { |
| and insert |
| ################
# main script # ################ if ($ENV{'REMOTE_ADDR'} eq '123.456.78.90') {die "You cannot be here";} if ($ENV{'REQUEST_METHOD'} ne 'POST') { |