One post/thread
Imran Offline
Member
***
Posts: 204
Joined: Apr 2010
Post: #1
Question One post/thread
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 ?

[Image: logo.png]

[Image: twitter.png]
07-04-2010 09:50 PM
Visit this user's website Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #2
RE: One post/thread
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.....


[Image: leelink.gif]
MYBB1.6 & XThreads
07-04-2010 10:00 PM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #3
RE: One post/thread
(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
Find all posts by this user Quote this message in a reply
Imran Offline
Member
***
Posts: 204
Joined: Apr 2010
Post: #4
RE: One post/thread
(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'];


[Image: logo.png]

[Image: twitter.png]
(This post was last modified: 07-06-2010 01:09 AM by Imran.)
07-06-2010 01:03 AM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #5
RE: One post/thread
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');


07-06-2010 01:12 AM
Find all posts by this user Quote this message in a reply
mark-in-dallas Offline
Junior Member
**
Posts: 5
Joined: Jul 2010
Post: #6
RE: One post/thread
Labrocca has that plugin available on his site.
07-06-2010 11:13 AM
Find all posts by this user Quote this message in a reply
Imran Offline
Member
***
Posts: 204
Joined: Apr 2010
Post: #7
RE: One post/thread
(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

[Image: logo.png]

[Image: twitter.png]
07-08-2010 03:27 AM
Visit this user's website Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: