No user delete. (11)

1 Name: Anonymous : 2005-11-06 21:27 ID:iqm/D4s2 [Del]

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))
use constant ALLOW_USER_DELETE => 0; # Allow non-admins to delete their posts (1: yes, 0: no)
use constant S_NOUSERDEL => 'Error: Users not allowed to delete.'; # Returns error for unallowed deletion attempt make_error(S_NOUSERDEL) unless(ALLOW_USER_DELETE || $admin); # refuse if disallowed in config (modified, no extra lines)
<label><if ALLOW_USER_DELETE><input type="checkbox" name="delete" value="<var $num>" /></if> wrapped by:
{lines 207-211}

2 Name: Anonymous : 2005-11-06 22:45 ID:Heaven [Del]

> 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).

3 Name: Anonymous : 2005-11-06 23:11 ID:iqm/D4s2 [Del]

> 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.

4 Name: !WAHa.06x36 : 2005-11-07 05:52 ID:Heaven [Del]

Also, if you do enter a blank password, nobody can delete the post.

5 Name: Anonymous : 2008-11-30 14:30 ID:BkvJgSqY [Del]

How does this work in kareha? There is no password prompt.

6 Name: !WAHa.06x36 : 2008-11-30 15:59 ID:Heaven [Del]


Passwords are still generated and saved behind the scenes. Won't work if you've disabled cookies or javascript, though.

7 Name: Anonymous : 2008-12-02 16:33 ID:BkvJgSqY [Del]


crap. What if you tend to use different computers at different times of the day?

8 Name: Anonymous : 2008-12-02 19:44 ID:Heaven [Del]

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:


9 Name: Anonymous : 2008-12-02 20:04 ID:Heaven [Del]

> 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)})()



10 Name: Anonymous : 2008-12-10 16:35 ID:Heaven [Del]

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.

11 Name: Anonymous : 2008-12-10 20:21 ID:Heaven [Del]

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.

Name: Link:
Leave these fields empty (spam trap):
More options...