Add-on Amount of Posts/Threads in certain forum

Gobee129

Member
Hey,

I would like to see the amount of posts and/or threads, that a certain user has made on a certain forum only.

Let's say User ABC has made 100 posts total, 50 in forum X, 30 in forum Y and 20 in forum Z. So far,I can only see his total amount of posts. Is there a way to see this distribution for the individual forums??

I want to implement Achievements, e.g. a Gamer-Achievement, and for that I need to see how many posts a user has made on the forum "forum games", etc.

Thx
 
This query will give you how many post a user has made in a particular forum

Code:
SELECT count(*) total
FROM xf_post post
INNER JOIN xf_thread thread ON post.thread_id = thread.thread_id
WHERE
    post.user_id = <USER_ID> AND
    thread.node_id = <FORUM_ID>

This is not default functionality in the forum though, you could not add this as a trophy condition
 
And if you say "ok, that is great, but I want to know how many posts a user has in each of the forums", this query will give you a forum -> total for a user

Code:
SELECT node.node_id, node.title, count(*) total
FROM xf_post post
INNER JOIN xf_thread thread ON post.thread_id = thread.thread_id
INNER JOIN xf_node node ON thread.node_id = node.node_id
WHERE
    post.user_id = 1
GROUP BY
    node.node_id
ORDER BY
    node.title;
 
This query will give you how many post a user has made in a particular forum

Code:
SELECT count(*) total
FROM xf_post post
INNER JOIN xf_thread thread ON post.thread_id = thread.thread_id
WHERE
    post.user_id = <USER_ID> AND
    thread.node_id = <FORUM_ID>

This is not default functionality in the forum though, you could not add this as a trophy condition

okay, trophy conditon is not a problem ;)

but what is a query?^^ I'm very new to the admin business haha so what do I do with your code?
 
okay, trophy conditon is not a problem ;)

but what is a query?^^ I'm very new to the admin business haha so what do I do with your code?

I would say get a developer :) If you don't know what to do with it it's useless to you :) You need an add-on developer to create that logic for you, it can't be done with the software out of the box

If your server provides PHPMyAdmin, or you can install it, you can go there, go to the SQL query section, and just run the query I just gave you, it will give you the posts a user has on a given forum :)
 
I would say get a developer :) If you don't know what to do with it it's useless to you :) You need an add-on developer to create that logic for you, it can't be done with the software out of the box

If your server provides PHPMyAdmin, or you can install it, you can go there, go to the SQL query section, and just run the query I just gave you, it will give you the posts a user has on a given forum :)

I'm not the true Admin/Server host. Can I still make it work? Install PHPMyAdmin and access the server from my pc?
 
Top Bottom