<xf:hiddenval name="user[visible]" value="{$xf.visitor.visible}" />
<xf:hiddenval name="user[activity_visible]" value="{$xf.visitor.activity_visible}" />
Am I replacing "<xf:macro template="helper_account" name="activity_privacy_row" />" with the above? Because, that did not work. It still unchecks the check box when saving.Usually, if checkbox inputs aren't present in the form, they will be interpreted the same as being unchecked. You might want to replace it with a hidden input instead. For example:
HTML:<xf:hiddenval name="user[visible]" checked="{$xf.visitor.visible}" /> <xf:hiddenval name="user[activity_visible]" checked="{$xf.visitor.activity_visible}" />
Note that crafty users can still manipulate the input values in the inspector, so an add-on would be required to properly disable the processing of the inputs.
No. I haven't removed the option totally. I just removed duplicates. it's still available under Privacy.This mania of wanting to restrict individual freedoms everywhere...
Oops, made a typo. I've corrected the above post.Because, that did not work. It still unchecks the check box when saving.
Thanks got it!Oops, made a typo. I've corrected the above post.
<xf:hiddenval .../>
tag which replaces it.<xf:hiddenval name="option[receive_admin_email]" value="{$xf.visitor.Option.receive_admin_email}" />
<xf:hiddenval name="enable_activity_summary_email" value="{{ $xf.visitor.last_summary_email_date !== null }}" />
Now that does the reverse. When saving in privacy, in preferences it unchecks them.You'd need to wrap the variables in curly braces, and any more complicated expressions in double curly braces:
HTML:<xf:hiddenval name="option[receive_admin_email]" value="{$xf.visitor.Option.receive_admin_email}" /> <xf:hiddenval name="enable_activity_summary_email" value="{{ $xf.visitor.last_summary_email_date !== null }}" />
(If in doubt, double curlys should work for variables too.)
Let that be a lesson to never work on your live installI've reverted all the templates back to default state. It was just too confusing and wasn't doing what I wanted it to. Just a little concerned now, that those who have edited their account details during that time, now have the wrong options selected/deselected. Oh well.
Even if I hadn’t, I wouldn’t have known.Let that be a lesson to never work on your live install
I'm just jesting with you, we have all done it once or twice.Even if I hadn’t, I wouldn’t have known.
Speak for yourself, I do it all the timeI'm just jesting with you, we have all done it once or twice.
We use essential cookies to make this site work, and optional cookies to enhance your experience.