MyBB Hacks

Full Version: One post/thread
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I tried to make a script so that users can post only one post per thread.

But unfortunately not success-ed  yet.

Can you please help Zinga/ Yumi ?
I guess you could use X threads and the first post option  then remove the comments and quick reply from the templates. It wont remove the functionality, but if the user cant see an option to reply then they wont.....
(07-04-2010 09:50 PM)Imran Wrote: [ -> ]I tried to make a script so that users can post only one post per thread.

I think you should count posts in that thread where post uid = viewer uid.
(07-05-2010 08:07 AM)RateU Wrote: [ -> ]I think you should count posts in that thread where post uid = viewer uid.

Thank You for reply.
Can you please give me a hint of the query ?

I mean whether this query is right ?

PHP Code:
$query = $db->simple_select('threads','*','posts="'.$thread['tid'].'"');


and what do you mean by viewer id ? Do you mean

PHP Code:
$viewerid = $post['uid'];


OR

PHP Code:
$viewerid = $mybb->user['uid'];

Something like this:

PHP Code:
$post_limit = $db->fetch_field($db->simple_select('posts', 'COUNT(*) AS post_limit', 'uid="'.intval($mybb->user['uid']).'" AND tid ="'.$tid.'"'), 'post_limit');

Labrocca has that plugin available on his site.
(07-06-2010 11:13 AM)mark-in-dallas Wrote: [ -> ]Labrocca has that plugin available on his site.

Thanks for the suggestion but this is not the actual reply for my query ! I want to make my own rather to put 10 dollars just for this Ouch

BTW I have developed its coding and hopefully will release here at Yumi's forum Smile
Reference URL's