delete_post help!

Discussion forum for MOD Writers regarding MOD Development.
Locked
benyboi
Registered User
Posts: 203
Joined: Thu Mar 01, 2007 6:50 pm

delete_post help!

Post by benyboi »

I couldn't find any documentation on the delete_post function within functions_posting.php and i was wondering if anyone could help me on figuring how to use it?

Presumably just wouldn't work...

My main problem is i dont know how much data i need to put into $data... I am wanting to run this from a script (in a phpBB page) so i would be able to load any data from the database if needbe.

Can anyone help? Thanks!
ameeck
Former Team Member
Posts: 6559
Joined: Mon Mar 21, 2005 6:57 pm

Re: delete_post help!

Post by ameeck »

$data should contain an array with the whole row of the post stored in phpbb_posts.

i.e. you should pass $row from this script to $data:

Code: Select all

$sql = 'SELECT * FROM ' . POSTS_TABLE . ' WHERE post_id = ' . $post_id;
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);

$next_post = delete_post($forum_id, $topic_id, $post_id, $row); 
Locked

Return to “[3.0.x] MOD Writers Discussion”