The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
how to use vB_DataManager_Post_Multiple ?
I't trying delete multiply posts :
PHP Code:
Is this class really functioning ? |
#2
|
||||
|
||||
Quote:
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 |
#3
|
|||
|
|||
This is reduced version. there must be "..and not parentid = 0".
a worked example from admincp/forum.php : PHP Code:
if i make instance of class : $postdm=& datamanager_init('Post_Multiple', $vbulletin, ERRTYPE_ARRAY, 'threadpost'); i give Call to undefined function: delete() |
#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".
|
#5
|
||||
|
||||
Guess you will have to use the Post dm and iterate through it.
You didnt answer the question about just deleting the thread. |
#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' |
#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. |
#8
|
||||
|
||||
That's what I meant by iterate
|
#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
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|