Implemented Display the number of user threads

Wave

Member
Threads
22
Messages
49
It would be great if you create an add-on to display the number of user threads in the front-end, node permissions depending on user credits count, and user criteria for account promotion. This add-on will require a new column in the xf_user table to store threads count for each user.

Add-on features
  • Display number of threads in;
    • Visitor menu
    • Profile
    • Postbit
    • Tooltip
  • Node permission
    • Minimum user threads to view node
    • Minimum user threads to view threads by others
    • Minimum user threads to post a reply
    • Minimum user threads to create a new thread
  • User criteria
    • User has created at least X threads
    • User has created no more than X threads
  • Search for users
    • Thread count between X and Y
  • Rebuild user threads
 
Last edited:

Lawrence

Developer
Staff member
Threads
35
Messages
255
    • Developer
    • Administrator
    • Moderator
  • #2
Hi, I take it that those permissions are for a few nodes? If not, it will make it pretty difficult for a member to achieve x number of created threads, without making it appear spammy in one or two specific nodes that may allow threads to be created.

I'll take a look at this when I finish the update to admin tools, :)
 

Wave

Member
Threads
22
Messages
49
I take it that those permissions are for a few nodes?
Sure, because the user won't be able to achieve X threads if node permissions used for all forums.

These permissions will encourage members to contribute, for example, the user must achieve X threads before getting access to premium forums.
 

Lawrence

Developer
Staff member
Threads
35
Messages
255
    • Developer
    • Administrator
    • Moderator
  • #4
I was thinking of adding this to Forum Stats add-on but changed my mind. I'll make it it's own add-on and then have the Forum Stats add-on look to see if it is installed as thread counts can add in some more good stats.
 

Lawrence

Developer
Staff member
Threads
35
Messages
255
    • Developer
    • Administrator
    • Moderator
  • #5
Add-on features
  • Display number of threads in;
    • Visitor menu
    • Profile
    • Postbit
    • Tooltip
  • Node permission
    • Minimum user threads to view node
    • Minimum user threads to view threads by others
    • Minimum user threads to post a reply
    • Minimum user threads to create a new thread
  • User criteria
    • User has created at least X threads
    • User has created no more than X threads
  • Search for users
    • Thread count between X and Y
  • Rebuild user threads

To keep track of what is done so far. I still need to do the permissions, and as well increase/decrease thread counts when a new thread is created or a thread is no longer visible.

The profile thread counts took a little longer than anticipated because when you click the number of threads the link had to go somewhere to display the threads so I had to add a user threads tab to the find threads page (the tab is not an anchor as no user info is sent to those macros). The user threads tab is only visible when the thread count is clicked from the tooltip or profile page.

thread_count_1.png
 

Wave

Member
Threads
22
Messages
49
The profile thread counts took a little longer than anticipated because when you click the number of threads the link had to go somewhere to display the threads so I had to add a user threads tab to the find threads page (the tab is not an anchor as no user info is sent to those macros). The user threads tab is only visible when the thread count is clicked from the tooltip or profile page.
I was using an add-on that works like when you click the number of user’s messages, full URL format like this https://eaeaddons.com/search/member?user_id=2&content=thread

I'll PM you the add-on download link.
 

Lawrence

Developer
Staff member
Threads
35
Messages
255
    • Developer
    • Administrator
    • Moderator
  • #7
I actually like how I implemented viewing members threads as it falls inline with the other tabs that have to do with threads. With that said I will be making the suggested change as guests can view a members messages but not their started threads, and that to me seems inconsistent.

All the permissions suggested are implemented. The Minimum user threads to view threads by others permission works the same way as if you removed the view others threads permission, until the user achieves the minimum number of threads.

All that is left is to update thread counts when posting a new thread or deleting a thread, :)
 

Lawrence

Developer
Staff member
Threads
35
Messages
255
    • Developer
    • Administrator
    • Moderator
  • #8
I have the add-on completed, and installed here for testing, :) I'vel set the style properties to display the thread count in the postbit. A new member stat has also been added.
 

Wave

Member
Threads
22
Messages
49
Nice, can you release it here for internal testing so I can purchase the add-on and provide feedback?
 

Wave

Member
Threads
22
Messages
49
I just tested the add-on and noticed that the Minimum number of threads to view node permission doesn't work as View node permission, the user who doesn't have permissions to access node will still be able to view threads.
 

Lawrence

Developer
Staff member
Threads
35
Messages
255
    • Developer
    • Administrator
    • Moderator
  • #12
I just tested the add-on and noticed that the Minimum number of threads to view node permission doesn't work as View node permission, the user who doesn't have permissions to access node will still be able to view threads.

I just set that permission here to 100 threads, and now I can not see the node that I created in the Playground on here. Logged out I can see it, to show that it is there.
 

Wave

Member
Threads
22
Messages
49
Yes, you won't be able to see the node but you'll still be able to access threads posted in that node by visiting thread URL directly.

It's the same when visiting the node from the URL.
 
Last edited:

Lawrence

Developer
Staff member
Threads
35
Messages
255
    • Developer
    • Administrator
    • Moderator
  • #15
Yes, you won't be able to see the node but you'll still be able to access threads posted in that node by visiting thread URL directly.

It's the same when visiting the node from the URL.

Fixed the permission for the node when visiting by the URL (it throws the standard no permission error). I'll fix the thread permission tomorrow as I need to head out in a few, :)

Fixed the permission for viewing a thread when the URL is pasted into the browser, yay.
 
Last edited:
Top