I just read the below tutorial:-
And below is my requirement:-
I want to add new custom user field which will show threads posted by user in particular forum. This Custom User field will show up in message_user_info below user profile pic.
I know one way to achieve the same:-
1. I will add Custom User field using the tutorial and will define PHP Callback and method.
2. Within PHP callback method. I will write below query:-
select count(*) as total from xf_thread where node_id = 10 and user_id = 5
Can anyone please give me some optimized way to achieve this. I just need to show one custom user field below user profile pic and that custom user field will show threads posted in particular forum.
Please help me.