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

  • [Forum] 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.
    Ruchie.com
    Live Web Solutions - Domains, Hosting, Email, SSL Certificates, Marketing Tools, Website Builders & more.
    Live Store Creator - Build your own online stores instantly!

  • #2
    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.
    Vote for:

    - *Admin Settable Paid Subscription Reminder Timeframe*
    -
    *PM - Add ability to reply to originator only*
    - Add Admin ability to auto-subscribe users to specific channel(s)
    - Highlight the correct navigation tab when you are on a custom page
    - "Quick Route" Interface...
    - Allow to use custom icons for individual forums

    Comment


    • #3
      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.
      Ruchie.com
      Live Web Solutions - Domains, Hosting, Email, SSL Certificates, Marketing Tools, Website Builders & more.
      Live Store Creator - Build your own online stores instantly!

      Comment


      • #4
        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>
        Ruchie.com
        Live Web Solutions - Domains, Hosting, Email, SSL Certificates, Marketing Tools, Website Builders & more.
        Live Store Creator - Build your own online stores instantly!

        Comment


        • #5
          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"
          vBulletin hosting from $0.5 monthly

          Comment


          • #6
            This type of discussion is for vBulletin.org, not here.

            Comment

            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
            Working...
            X