Log in

View Full Version : Moderation blues


VBCoder
08-03-2005, 04:13 AM
I took the plunge, and rewrote my plugins to use the DM to create posts, instead of build_new_post(), but now:

All the posts are being marked as Moderated (closed)!!!! I'm really stumped why, I do:

$dataman->set('open', 1); // Mark thread open, not moderated

but it doesn't seem to work.
Also, the post / reply counters are not being set properly - the user's post count doesn't change, and 0 replies still being listed.

I need some help...

amykhar
08-03-2005, 12:35 PM
Did you set visible to 1 as well?

VBCoder
08-04-2005, 01:54 PM
Thanks, Amy, you're the best.

I had code to set visible to 1, but there was a bug in the conditional - fixed it and all problems gone.

Now, if you could just solve global warming too...

amykhar
08-04-2005, 01:55 PM
glad to help :)

VBCoder
08-04-2005, 04:37 PM
FYI, the bug was due to tristate logic.

I had if ($threadinfo['visible']) { // set to visible...
when I should have had if (!$threadinfo['visible] == 0) { // set to visible...

since $threadinfo is null for new threads

Thanks for the help