Hi,
I just read the below tutorial:-
http://xenforo.com/community/threads/custom-user-fields-in-xenforo-1-1.20673/
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:-
But I guess this will hamper the performance because let's say I have 30 posts to show on one page and 30 different users posted in that thread then 30 extra queries will be executed to show this thing...
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.
I just read the below tutorial:-
http://xenforo.com/community/threads/custom-user-fields-in-xenforo-1-1.20673/
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:-
Code:
select count(*) as total from xf_thread where node_id = 10 and user_id = 5
But I guess this will hamper the performance because let's say I have 30 posts to show on one page and 30 different users posted in that thread then 30 extra queries will be executed to show this thing...
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.