The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Code to delete a post
In an old thread I found a link to the vb 3.0.x mod:
https://vborg.vbsupport.ru/showthread.php?t=60704 which has the following code to 'quick soft delete' a thread with a 'remove' button: Code:
<form action="editpost.php" method="post"> <input type="hidden" name="s" value="$session[sessionhash]" /> <input type="hidden" name="p" value="$post[postid]" /> <input type="hidden" name="do" value="deletepost" /> <input type="submit" name="deletepost" value="<if condition="$deletebutton">delete<else />remove</if>" id="rb_del_soft" tabindex="1" class="button" /> </form> "Your submission could not be processed because a security token was missing." I'm guessing the code to delete a message has changed- but I've searched through every thread with 'delete post' in the title and haven't found any means to do this for 3.8.x but it's obviously doable. Any ideas? Thanks. --------------- Added [DATE]1274643978[/DATE] at [TIME]1274643978[/TIME] --------------- Nevermind, I found it... it was missing: <input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" /> --------------- Added [DATE]1274646564[/DATE] at [TIME]1274646564[/TIME] --------------- OK, I still need help... apparently the code above is for a real/permanent delete, I need to change it to a 'soft' delete. I searched again but no luck. --------------- Added [DATE]1274648406[/DATE] at [TIME]1274648406[/TIME] --------------- OK.. so I guess this is a bigger issue then I thought it would be, maybe impossible... I see if a non-admin/super-mod uses the code above it does default to a soft delete which is fine... but I thought if displayed this code for any user, in this case for the thread starter only, I could allow any thread starter to delete any posts within their own thread... on an old forum I used to visit this was called 'troll control' - there currently is no mod or template edit to allow this for vb 3.7 or 3.8... the last vb version to have a working mod for this seems to be 3.0 but I *know* I've used this on a newer board... maybe 3.5? Anyway the point is even though i can get this code to display only for the thread owner pressing the button yields an error- I do not have permission to access this page because I don't have permission to delete a tread... I thought by giving them this code I was giving permission but apparently not. Does anyone know if there's a way around this? I want a thread owner to be able to delete (soft delete) any post in their own thread. Thanks. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|