Jump to the post that solved this thread.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 2 Years, 9 Months ago How to count posts/threads of selected forum
#1
Solved: 2 Years, 9 Months ago
I need to assign some group promotions and want users to post xthreads/posts in selected forum to get it. 
I read this already that how to not count posts in selected forums
But i need to count post on selected forums for promotions
u get a usergroup promotion for posting x posts/threads in y forum.

No matter you have 1000 posts overall but if you do not have x posts in y forum you cannot be promoted.
Hope i get it solve from experts.
Thanks
Reply
#2
Solved: 2 Years, 9 Months ago
$count = $db->write_query( "SELECT COUNT(*) AS totalthreads FROM ".TABLE_PREFIX."threads WHERE fid='FID HERE' || fid='ANOTHER FID HERE' ");
$totalthreads = my_number_format($db->fetch_field($count, "totalthreads"));
Reply
#3
Solved: 2 Years, 9 Months ago
Where to put tht code
In any template? 
Can u pls explain

Experts /Staff
Anyone?
Do some one know how to achieve this?
Reply
#4
Solved: 2 Years, 9 Months ago
This user has been denied support. This user has been denied support.
(09-17-2015, 10:01 PM)basha Wrote: Where to put tht code
In any template? 
Can u pls explain

Experts /Staff
Anyone?
Do some one know how to achieve this?

in index ? if yeah then put that code in index.php below -> $lang->load('index');

and then goto your templates>any template you wanna show count in > add {$totalthreads} <-- that variables where you wanna display the counts.
Reply
#5
Solved: 2 Years, 9 Months ago
(09-17-2015, 07:43 PM)basha Wrote: I need to assign some group promotions and want users to post xthreads/posts in selected forum to get it. 
I read this already that how to not count posts in selected forums
But i need to count post on selected forums for promotions
u get a usergroup promotion for posting x posts/threads in y forum.

No matter you have 1000 posts overall but if you do not have x posts in y forum you cannot be promoted.
Hope i get it solve from experts.
Thanks

You need a plugin for getting a promotion conditions like that.
XThreads App For MyBB: Link Directory, YouTube Gallery & etc - Full List
My Demo Site
Reply
#6
Solved: 2 Years, 9 Months ago
(09-18-2015, 10:55 AM)linkzy Wrote: in index ? if yeah then put that code in index.php below -> $lang->load('index');
But no i dont wanna mess up my index template for that even if it doesnt work than what all forum will collapse.

(09-18-2015, 03:44 PM)RateU Wrote: You need a plugin for getting a promotion conditions like that.

And where do i get that because there is no plugin yet . I've searched alot and then i post.
Reply
#7
Solved: 2 Years, 9 Months ago
(09-18-2015, 03:59 PM)basha Wrote: And where do i get that because there is no plugin yet .

You can try this plugin. It was made for 1.6, so maybe you need to change the compatibility of the plugin:
http://mybbhacks.zingaburga.com/showthread.php?tid=1296
XThreads App For MyBB: Link Directory, YouTube Gallery & etc - Full List
My Demo Site
Reply
#8
Solved: 2 Years, 9 Months ago
(09-18-2015, 04:04 PM)RateU Wrote: You can try this plugin. It was made for 1.6, so maybe you need to change the compatibility of the plugin:
http://mybbhacks.zingaburga.com/showthread.php?tid=1296

Thanks mate i downloaded it and see if it works on 1.8 btw this is exactly the thing which i wanted, I hope it'll work
Reply
#9
Solved: 2 Years, 9 Months ago
This user has been denied support. This user has been denied support.
(09-18-2015, 03:59 PM)basha Wrote:
(09-18-2015, 10:55 AM)linkzy Wrote: in index ? if yeah then put that code in index.php below -> $lang->load('index');
But no i dont wanna mess up my index template for that even if it doesnt work than what all forum will collapse.

(09-18-2015, 03:44 PM)RateU Wrote: You need a plugin for getting a promotion conditions like that.

And where do i get that because there is no plugin yet . I've searched alot and then i post.

just keep a backup. and it wont mess up as i have tried these stuffs already. or else just make new plugin with that code and run it by using that variable.
Reply
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)