Support Forum
I'm working with a small association who needs one forum to require moderation of the first post in a topic.
If you're acquainted with the Warrior Forum you may understand the idea. It's like their WSO forum. Members pay $20 to start a thread. The first post is an ad with a special offer. Following comments are questions and responses about the offer.
They need to moderate the first post so they can be sure all offer requirements have been met before it's published. My client is a very small association so it won't be anything near as big as Warrior Forum, but they still want to try this idea.
Ooooh! How much is it worth
With the addition of a new filter - which frankly is a good idea anyway and I will get in place for 5.0.1 - I can do this in about.... 5 lines of code!
Or.... I guess I could tell you how to do it.
YELLOW
SWORDFISH
|
Yellow Swordfish, I'd love to know how to do it. I'm a good php programmer but new to SP. This association is very low budget so I'm donating my time.
And, Conrad, my mother named me Rich. Forgot to tell the bank!
Well as I said I will need to add a filter to the core code. This is done as it was a good notion to have it anyway and a very small task - and that will appear in 5.0.1 which will not be long in coming.
Basically - when the filter exists in the code - then you can put something like the following in the spFunctions.php file of the theme you are using:
add_filter('sph_new_post_pre_data_saved', 'force_moderation'); function force_moderation($newpost) { if($newpost['postindex']==1) $newpost['poststatus']=1; return $newpost; }
This will force the post post of any topic into moderation. if you just want it on a single forum then you can test using:
if($newpost['forumid'] == XX) ...
But - as I say - you will need the filter code in the core first.
YELLOW
SWORDFISH
|
core change will be in 5.0.1...
Visit Cruise Talk Central and Mr Papa's World
I liked this idea for one of my forums so gave it a try and it does work as advertised.
I used the forum id
if($newpost['forumid']==19) $newpost['poststatus']=1
Which makes every post or reply in the forum moderated.
I wanted to have only the first post moderated and only in this particular forum so used..
if (($newpost['forumid']==19) && ($newpost['postindex']==1)) $newpost['poststatus']=1;
Seems to work fine, sound right to you?