Hi, i hate entering delete passwords, and don't want anyone to delete my stuff, so I made myself a little hack to wakaba for this reason. Here are the changes i made: (file(linenum))
config.pl(87):
use constant ALLOW_USER_DELETE => 0; # Allow non-admins to delete their posts (1: yes, 0: no)
strings_en.pl(126):
use constant S_NOUSERDEL => 'Error: Users not allowed to delete.'; # Returns error for unallowed deletion attempt
wakaba.pl(1122): make_error(S_NOUSERDEL) unless(ALLOW_USER_DELETE || $admin); # refuse if disallowed in config
futaba_style.pl(137): (modified, no extra lines)
<label><if ALLOW_USER_DELETE><input type="checkbox" name="delete" value="<var $num>" /></if>
futaba_style.pl(207-211) wrapped by:
<if ALLOW_USER_DELETE>
{lines 207-211}
</if>
> i hate entering delete passwords, and don't want anyone to delete my stuff
If you don't enter a password, the script picks one for you. It doesn't use a blank password.
And you'd be surprised how often people screw up when posting. Let them fix it, it's less work for the moderator(s).
> If you don't enter a password, the script picks one for you.
Hey neat, this is true.
Well, if someone ever needs to do this for some unknown reason, now they can. For my purposes this works pretty well. It's pretty much just me posting to the board anyways.
Also, if you do enter a blank password, nobody can delete the post.
How does this work in kareha? There is no password prompt.
Passwords are still generated and saved behind the scenes. Won't work if you've disabled cookies or javascript, though.
crap. What if you tend to use different computers at different times of the day?
you'll either have to wait until you get back to the computer that has the correct cookie, or write a bookmarklet to get and set the password for you... actually, these should do the trick:
javascript:(function(){alert(get_cookie('password'))})()
javascript:(function(){set_cookie('password',prompt('password?'),9000)})()
> javascript:(function(){set_cookie('password',prompt('password?'),9000)})()
should be:
javascript:(function(){set_cookie('password',prompt('password?'),9000);var forms=document.getElementsByTagName('form');for each(i in forms)if(typeof i=='object')set_new_inputs(forms[i].id)})()
or:
javascript:(function(){set_cookie('password',prompt('password?'),9000);location.reload()})()
>>6
Rather than using JavaScript (or maybe both), the script should check the IP of the user trying to delete a post, and if it's the same as the posted IP it should allow you to delete it.
>>10
Bad idea, that breaks the board for people who have IPs that change spontaneously, and for anyone posting from a public terminal who types in their own password. Also, it will severely break the board if it's behind some sort of proxy on the server side, as anyone would then be able to delete any post. (a well known example would be on a Tor-hosted board, but there are lots of other reasons why this might be the case)
However, a good idea might be optionally allowing the same IP to delete a post without validating the posting password, within a certain timeframe of submitting the post. That way people who have disabled JS or cookies or switched browsers (or even computers behind the same router, for that matter) can delete their posts if they want.