Announcement

Collapse
No announcement yet.

Need help with One Click Delete Post

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Joe D.
    replied
    This type of discussion is for vBulletin.org, not here.

    Leave a comment:


  • postcd
    replied
    Thanks for sharing this usefull code. When added code to the postbit legacy template it shown the button. When button is clicked vbulletin says: "Invalid Action Specified"

    Leave a comment:


  • AlokSharma
    replied
    Code for One Click Delete Post for vBulletin v4.x

    Ok, I somehow managed to make the code work by doing a lot of R&D.

    However, there are small issues with it. This code does not works properly if trying to delete the top most post of page 2 & onwards. I really don't know why.

    Here is the final code:
    Code:
    <!-- One Click Delete Button -->
    <vb:if condition="$bbuserinfo['usergroupid'] == 6">
        <form action="editpost.php" method="post" style="display: inline;" onsubmit="return confirm('Are you sure you want to Delete this Post?')">
            <input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
            <input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
            <input type="hidden" name="do" value="deletepost" />
            <input type="hidden" name="dodelete" value="1" />
            <input type="hidden" name="deletepost" value="remove" />
            <input type="hidden" name="p" value="{vb:raw post.postid}" />
            <input type="submit" class="button" tabindex="1" value="{vb:rawphrase delete}" id="{vb:raw editorid}_delete" />
        </form>
    </vb:if>
    <span class="seperator">&nbsp;</span>

    Leave a comment:


  • AlokSharma
    replied
    As suggested, I posted this at vbulletin.org but no reply so far.

    Also, I have not made any major code modifications other than just adding the above piece of code above the Edit Post link.

    Whatsoever, I do believe that there is something that I am missing as everything in the code seems to be correct. So when I click on the Delete button, it should delete the post.

    Leave a comment:


  • Trevor Hannant
    replied
    We cannot officially support code modifications or forums running modified code, however you can try searching or asking for help with this over at www.vbulletin.org.

    Leave a comment:


  • AlokSharma
    started a topic [Forum] Need help with One Click Delete Post

    Need help with One Click Delete Post

    Hi,

    After doing a lot of search, I was able to collect the bits of code, modified and inserted it in the postbit_legacy template. The delete button does appears but when I click on it, I see a white page (a blank page).

    I am using the following code:
    Code:
    <form action="editpost.php" method="post">
    <input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
    <input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
    <input type="hidden" name="do" value="remove" />
    <input type="hidden" name="p" value="{vb:raw post.postid}" />
    <input type="submit" class="button" tabindex="1" value="{vb:rawphrase delete}" id="{vb:raw editorid}_delete" />
    </form>
    Any guesses that why this is not working? Any help will be highly appreciated.
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X