Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 17 Aug 2007, 05:55
netwind netwind is offline
 
Join Date: Feb 2005
how to use vB_DataManager_Post_Multiple ?

I't trying delete multiply posts :

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

but nothing happens.
Is this class really functioning ?

Last edited by netwind; 17 Aug 2007 at 11:59.
Reply With Quote
  #2  
Old 17 Aug 2007, 07:12
Eikinskjaldi's Avatar
Eikinskjaldi Eikinskjaldi is offline
 
Join Date: Feb 2006
Location: Hell, never looked better
Originally Posted by netwind View Post
I't trying delete multiply posts :

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

but nothing happens.
Is this class really functioning ?
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
Reply With Quote
  #3  
Old 17 Aug 2007, 07:40
netwind netwind is offline
 
Join Date: Feb 2005
This is reduced version. there must be "..and not parentid = 0".

a worked example from admincp/forum.php :

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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()

Last edited by netwind; 17 Aug 2007 at 08:24. Reason: Automerged Doublepost
Reply With Quote
  #4  
Old 17 Aug 2007, 11:16
Opserty Opserty is offline
 
Join Date: Apr 2007
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".
Reply With Quote
  #5  
Old 17 Aug 2007, 11:27
Eikinskjaldi's Avatar
Eikinskjaldi Eikinskjaldi is offline
 
Join Date: Feb 2006
Location: Hell, never looked better
Guess you will have to use the Post dm and iterate through it.

You didnt answer the question about just deleting the thread.
Reply With Quote
  #6  
Old 17 Aug 2007, 11:36
netwind netwind is offline
 
Join Date: Feb 2005
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'

Last edited by netwind; 17 Aug 2007 at 11:45. Reason: Automerged Doublepost
Reply With Quote
  #7  
Old 17 Aug 2007, 14:20
Opserty Opserty is offline
 
Join Date: Apr 2007
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.
Reply With Quote
  #8  
Old 17 Aug 2007, 15:06
Eikinskjaldi's Avatar
Eikinskjaldi Eikinskjaldi is offline
 
Join Date: Feb 2006
Location: Hell, never looked better
Originally Posted by netwind View Post
How to iterate? Is it more effective than selecting postid and creating Post_Datamanager in loop ?
That's what I meant by iterate
Reply With Quote
  #9  
Old 18 Aug 2007, 04:29
Antivirus's Avatar
Antivirus Antivirus is offline
 
Join Date: Sep 2004
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
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 07:30.

Layout Options | Width: Wide Color: