PDA

View Full Version : Creating a Single button Move Post


alocado
05-29-2013, 10:30 AM
Hi, I've developed a single button that when clicked, it move the post to a specific Trash forum. the problem is it is only working with my user, all other moderators are giving them error on permission and the most strange is that when I try with my user on incognito tab on chrome it also does not work.. do i have to set any cookie or something like that to move the psot? the code is:

<form id="formdelete_{vb:raw post.postid}" action="inlinemod.php?do=domoveposts&amp;t={vb:raw post.threadid}&amp;postids={vb:raw post.postid}" method="post" style="display: inline;">
<input type="submit" class="buttondelete" tabindex="1" value="" id="{vb:raw editorid}_delete" />
</form>
<script>
$("#formdelete_{vb:raw post.postid}").submit(function( event ) {
event.preventDefault();
if (confirm("Are you sure you want do delete this post?")) {
$.post("{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}inlinemod.php?do=domoveposts&amp;t={vb:raw post.threadid}&amp;postids={vb:raw post.postid}", {type : "0", destforumid : "32",title : "{vb:raw thread.title}", s : "{vb:raw session.sessionhash}", securitytoken : "{vb:raw bbuserinfo.securitytoken}", postids : "{vb:raw post.postid}", t : "{vb:raw post.threadid}", do : "domoveposts"}, function(){
alert("Post Deleted");

});

}
});
</script>


when i get the post response i get this text:

admin_test, you do not have permission to access this page. This could be due to one of several reasons:
- Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
- If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation


Thank you,