![]() |
|
Thread Tools |
#1
|
||||
|
||||
how to use vB_DataManager_Post_Multiple ?
I't trying delete multiply posts :
but nothing happens. Is this class really functioning ? No members have liked this post.
Last edited by netwind; 17 Aug 2007 at 11:59. |
#2
|
||||
|
||||
Originally Posted by netwind
A few things, firstly, why not just delete the thread? I am not really sure what will happen if you delete all posts from a thread but leave the thread lying around![]()
secondly, assuming you do want an empty thread, you should be using "Post_Multiple", not "Post" the Post dm is pretty much expecting a single postid Thirdly, pass true into delete No members have liked this post.
|
#3
|
||||
|
||||
This is reduced version. there must be "..and not parentid = 0".
a worked example from admincp/forum.php :
this really works and i wrote my code similar if i make instance of class : $postdm=& datamanager_init('Post_Multiple', $vbulletin, ERRTYPE_ARRAY, 'threadpost'); i give Call to undefined function: delete() No members have liked this post.
Last edited by netwind; 17 Aug 2007 at 08:24. Reason: Automerged Doublepost |
#4
|
|||
|
|||
vB_DataManager_Post_Multiple does not extend vB_DataManager instead it extends the vB_DataMangaer_Multiple class. Within which there is not a delete() function. Hence why you get the error "Call to undefined function".
No members have liked this post.
|
#5
|
||||
|
||||
Guess you will have to use the Post dm and iterate through it.
You didnt answer the question about just deleting the thread. No members have liked this post.
|
#6
|
|||
|
|||
I'm not deleting thread! In first time there was reduced condition for debug purpose.
ok let's condition be $postdm->set_condition("threadid=200 and not parentid = 0 "); full condition is more complex. But this still don't delete any post. How to iterate? Is it more effective than selecting postid and creating Post_Datamanager in loop ? I can't undestand how code in admincp/forum.php works without creation of class 'Forum_Multiple' No members have liked this post.
Last edited by netwind; 17 Aug 2007 at 11:45. Reason: Automerged Doublepost |
#7
|
|||
|
|||
I think there is a delete_post() function somewhere.
Check the Code Documentation for its exact whereabouts and then check the actual PHP to see it can help you. No members have liked this post.
|
#8
|
||||
|
||||
Originally Posted by netwind
That's what I meant by iterate ![]()
![]() No members have liked this post.
|
#9
|
||||
|
||||
I found it easier to loop through repeating calls toa dm than to use the multiple dm calls. Check out the announcement datamanager, there's simple example which helped me get thru it
__________________
Please feel free to PM me about custom work, installations, and upgrades! Eclipse Records - Streetcult Street Team No members have liked this post.
|
![]() |
«
Previous Thread
|
Next Thread
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 00:48.