Skip to main content
Recent Posts
1
Support / Re: How to disable "Currently" section in user profiles?
Last post by Steeley -

And presto, the thing turns up as a setting which is honoured by the profile page. I'd add a screenshot but apparently a 9KB PNG file has a problem :(


This topic {board?} punts any image attachments for some reason..  that might be the first thing for spuds {or someone} to chase down  :-\

(Karvan hasn't been back since we started discussing his issue, but at least we got a couple of 'fixes' identified as a result..)
2
Support / Re: How to disable "Currently" section in user profiles?
Last post by Arantor -
You're right, the setting's not there - which is doubly weird because the code to _use_ the setting absolutely exists in the snippet I mentioned.

Sure enough if I add the config, that works as you'd expect.

Code: (sources/subs/ManageFeatures.subs.php) [Select]
		$standard_fields = array('website', 'posts', 'warning_status', 'date_registered');
$fields_no_registration = array('posts', 'warning_status', 'date_registered');

Code: (replace with) [Select]
		$standard_fields = array('website', 'posts', 'warning_status', 'date_registered', 'action');
$fields_no_registration = array('posts', 'warning_status', 'date_registered', 'action');

and

Code: (sources/admin/ManageFeatures.controller.php) [Select]
		// What about standard fields they can tweak?
$standard_fields = array('website', 'posts', 'warning_status', 'date_registered');

// What fields can't you put on the registration page?
$context['fields_no_registration'] = array('posts', 'warning_status', 'date_registered');

Code: (replace with) [Select]
		// What about standard fields they can tweak?
$standard_fields = array('website', 'posts', 'warning_status', 'date_registered', 'action');

// What fields can't you put on the registration page?
$context['fields_no_registration'] = array('posts', 'warning_status', 'date_registered', 'action');

Plus a language string, say in ManageSettings.english.php:
Code: [Select]
$txt['action'] = 'Profile Action';

And presto, the thing turns up as a setting which is honoured by the profile page. I'd add a screenshot but apparently a 9KB PNG file has a problem :(

@Spuds can put the above into a PR for you if you like? Seems like a legit bug fix to me to have a thing respect configuration but not provide the configuration...
3
Support / Re: How to disable "Currently" section in user profiles?
Last post by Steeley -
No, we're not, no. That is how to change the *main* who's online page, which is not what the OP or I was talking about.

As I mentioned, I suspect (without looking) that if you have Advanced Profile Fields / Custom Fields enabled in Core Features, the page on which you can configure the fields will let you disable certain fields, like post count... and the action shown in the profile. This is what the code snippet I mentioned does, it looks up against the list of enabled/disabled fields *in the profile* and hides them there.

I do have that enabled, and do have a number of custom profile fields I've added, all the instagram/messenger/ICQ/ etc. stuff is unchecked (inactive)  but no, alas, I don't see anything related to current user activity in the custom profile fields.  (EA v.1.1.6)  :'(

When you do get a chance to look, tell me if you see something I don't.  Otherwise it looks like commenting out lines 660-663 in ProfileInfo.template.php may be the only solution (assuming that works).
4
Support / Re: How to disable "Currently" section in user profiles?
Last post by Arantor -
No, we're not, no. That is how to change the *main* who's online page, which is not what the OP or I was talking about.

As I mentioned, I suspect (without looking) that if you have Advanced Profile Fields / Custom Fields enabled in Core Features, the page on which you can configure the fields will let you disable certain fields, like post count... and the action shown in the profile. This is what the code snippet I mentioned does, it looks up against the list of enabled/disabled fields *in the profile* and hides them there.
5
Support / Re: How to disable "Currently" section in user profiles?
Last post by Steeley -
There's no option for Who's Online (but you can lock out access by way of permissions) but the profile area is separate and as mentioned the code clearly has the facility to hook into the profile fields configuration.

I dunno, I don't have a test install handy, just going off what I see in the code.

Maybe we're not talking about the same thing?

"Enable Who's online list" under Admin / Configuration / General.. ?
6
Support / Re: How to disable "Currently" section in user profiles?
Last post by Arantor -
There's no option for Who's Online (but you can lock out access by way of permissions) but the profile area is separate and as mentioned the code clearly has the facility to hook into the profile fields configuration.

I dunno, I don't have a test install handy, just going off what I see in the code.
7
Support / Re: How to disable "Currently" section in user profiles?
Last post by Steeley -
You can disable "Who's online", but it looks like there isn't an option for enabling it and disabling the action part of it (I see no "action" field to disable in the Custom Profile Fields list - and I do have who's on-line enabled - and I don't think I altered any existing default fields, merely disabled the defaults I didn't want to use).

But Aye - I think commenting out lines 660-663 of ProfileInfo.template.php under themes/default should do the trick..

Thanks for finding that..  Now I can go out and wash the Electraglide for my run to Sturgis next week instead of digging around in my server testing the edges of my php knowledge envelope.
8
Support / Re: How to disable "Currently" section in user profiles?
Last post by Arantor -
If you're looking in the files, ProfileInfo.template.php is the one to look at, on line 659 according to GitHub:

Code: [Select]
	// What are they up to?
if (!isset($context['disabled_fields']['action']) && !empty($context['member']['action']))
echo '
<dt>', $txt['profile_action'], ':</dt>
<dd>', $context['member']['action'], '</dd>';

I assumed since the disabled fields stuff was there, and it follows the same setup as the other disabled fields in SMF (which was previously behind the Core Features > Advanced Profile Fields feature), that this is how it could be disabled without a code edit.
9
Support / Re: How to disable "Currently" section in user profiles?
Last post by Steeley -
Actually, I don't see such a field (that I recognize as such any way), in the profile section (custom or otherwise). Arantor. That's what sent me looking through the php files.

When I found $member['action'] I said "Ah HA!" and stopped searching. If that's the wrong file, I'll start looking again when I get a chance..  it's got to be in one of 'em somewhere.. :-)
10
Support / Re: How to disable "Currently" section in user profiles?
Last post by Arantor -
If you're talking about the profile one only, it looks like you should be able to turn this off in admin. I forget exactly where the field configuration is (maybe you need to turn the custom profile fields on in Core Features first? I recently got a new laptop, have not installed Elkarte on it yet), but if you go into there, you should be able to disable the 'Action' profile field which should do what you're wanting.

What Steeley is referring to is the main who's online page in full rather than the profile page, and presumably is already restricted if you don't want people seeing this.