Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
custom-topic
Paid Job: Need Plugin to require moderation on First Post in Topic
Avatar
Rich Hamilton
Phoenix, AZ USA
Member
Free Members
sp_UserOfflineSmall Offline
Feb 28, 2012 - 9:59 am
sp_QuotePost Quote

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.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 28, 2012 - 10:29 am
sp_QuotePost Quote

Ooooh! How much is it worth laugh

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.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Conrad_Farlow
Sheffield, UK
Member
Free Members
sp_UserOfflineSmall Offline
Feb 28, 2012 - 10:34 am
sp_QuotePost Quote

Bill him he says he's Rich kiss

Avatar
Rich Hamilton
Phoenix, AZ USA
Member
Free Members
sp_UserOfflineSmall Offline
Feb 28, 2012 - 11:22 am
sp_QuotePost Quote

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. eek

And, Conrad, my mother named me Rich. Forgot to tell the bank!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 28, 2012 - 3:22 pm
sp_QuotePost Quote

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.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Rich Hamilton
Phoenix, AZ USA
Member
Free Members
sp_UserOfflineSmall Offline
Feb 28, 2012 - 4:04 pm
sp_QuotePost Quote

Thanks! I'll do my very best to be patient for this. cool

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 28, 2012 - 7:36 pm
sp_QuotePost Quote

core change will be in 5.0.1...

Avatar
Brandon
U.S.
SP Wrangler
Free Members
sp_UserOfflineSmall Offline
Mar 5, 2012 - 5:46 pm
sp_QuotePost Quote

I liked this idea for one of my forums so gave it a try and it does work as advertised. smile

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?

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 5, 2012 - 8:52 pm
sp_QuotePost Quote

yes... looks right...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 649
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 618
Members: 17357
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10123
Posts: 79616