Announcement

Collapse
No announcement yet.

Delete post and DB query in VB5.

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Delete post and DB query in VB5.

    Hello!
    Help me please. I need to make my request to the database when deleting the post. Because removing the post works through ajax to the address action="ajax/api/node/deleteNodes", then I could not get the POST data to make my request.
    Tell me, what should I do? I want that when I click on the DELETE button in this form in the screenshot, I could get my hidden fields through POST and make any query in the database.
    Screenshot: https://i.imgur.com/SqjHjDA.jpg
    Do I need to create an API product? And somehow through the post removal function get your POST-data? Thank you!

    #2
    Try extending deleteNodes API method the way you did on fetchByPageId for Page API.
    Helpful? Donate. Thanks!
    Buy me a coffeePayPal QR Code
    Fast VPS Host for vBulletin:
    A2 Hosting & IONOS

    Comment


      #3
      Hello! Thanks for the answer. But, unfortunately, it has not turned out yet
      I do not receive POST data when i delete post(message) in thread.
      Maybe I need to pass some specific parameters to the function deleteNodes ()?
      And am I doing the right thing, that I'm doing this in my plugin in the API file page.php?
      I will be very grateful if you will help me!

      Comment


        #4
        Not in page.php but in node.php. Remember deleteNodes() is in node API not page API.
        Helpful? Donate. Thanks!
        Buy me a coffeePayPal QR Code
        Fast VPS Host for vBulletin:
        A2 Hosting & IONOS

        Comment


          #5
          Good afternoon! It turned out to run my function when deleting the message !!! Excellent, there is already a result!
          But for some reason the POST parameters of my hidden fields are still not accepted.
          When I comment isset ($ _ POST [ 'my_custom_field']) my test query runs (blue). But in this case I need to get the id of the user whose message I delete and the id of the thread.
          Which system variable contains this data? I think there is an array there, because I can select several messages that I delete. Thank you very much in advance!

          Comment


            #6
            Will you help me?

            Comment


              #7
              This will require trial and error to figure out the solution. In the deleteNodes() function, try adding the parameters and echo them to see their values. You might see the value you are looking for. I believe the parameters are the same as the original function except that the return value of the original function is I think (not sure) the first parameter of the extended function.
              Helpful? Donate. Thanks!
              Buy me a coffeePayPal QR Code
              Fast VPS Host for vBulletin:
              A2 Hosting & IONOS

              Comment

              Users Viewing This Page

              Collapse

              There is 1 user viewing this forum topic.

              • Guest Guest

              Latest Posts

              Collapse

              Working...
              X
              Searching...Please wait.
              An unexpected error was returned: 'Your submission could not be processed because you have logged in since the previous page was loaded.

              Please push the back button and reload the previous window.'
              An unexpected error was returned: 'Your submission could not be processed because the token has expired.

              Please push the back button and reload the previous window.'
              An internal error has occurred and the module cannot be displayed.
              There are no results that meet this criteria.
              Search Result for "|||"