Hello all,
I know you can edit the User Profile options in admincp to disable the "Visitor Tracking" option which will hide the recent activity of the user from the "Statistics" tab of the user profile. However, it's a global option and it would be nice if it were possible to have this as a per user option.
There is probably a hack out there already for this, but I thought I'd reinvent the wheel and try and do it myself, but I'm a little stuck
Here's what I've done so far:
I've found which template I need to edit (memberinfo_block_statistics) and I've found the area within there that I'd want to hide.
I've added a new User Profile Field, which is set to single-selection radio buttons. The options are simply On and Off. I can view my usercp and it does show the new option there.
I obviously need to edit the template to get it to check against that user profile field (field6 as its listed) and if it's off then don't show the block of code for the recent activity.
It's the "if" statement that I'm a little unsure of. Currently I have the following:
My problem is that I'm not sure how to check against the profile field to find out if it's set to on or off. Obviously what I have above isn't working, it seems to always be hiding the information, regardless of the setting of the option in the usercp.
Any help gratefully appreciated.
I know you can edit the User Profile options in admincp to disable the "Visitor Tracking" option which will hide the recent activity of the user from the "Statistics" tab of the user profile. However, it's a global option and it would be nice if it were possible to have this as a per user option.
There is probably a hack out there already for this, but I thought I'd reinvent the wheel and try and do it myself, but I'm a little stuck
Here's what I've done so far:
I've found which template I need to edit (memberinfo_block_statistics) and I've found the area within there that I'd want to hide.
I've added a new User Profile Field, which is set to single-selection radio buttons. The options are simply On and Off. I can view my usercp and it does show the new option there.
I obviously need to edit the template to get it to check against that user profile field (field6 as its listed) and if it's off then don't show the block of code for the recent activity.
It's the "if" statement that I'm a little unsure of. Currently I have the following:
Code:
<!-- Per User Visitor Tracking - Statisics Disable - Start-->
<if condition="$post['field6'] == 'On'">
blah, blah, blah
</if>
<!-- Per User Visitor Tracking - Statisics Disable - End-->
My problem is that I'm not sure how to check against the profile field to find out if it's set to on or off. Obviously what I have above isn't working, it seems to always be hiding the information, regardless of the setting of the option in the usercp.
Any help gratefully appreciated.