Skip to Content Skip to Menu

🌟Discover the Joomla AI Plugin that wrote its own story! - CB Editor Assistant 1.1now for Joomla 3, 4 & 5!
✍️ 5-Day Free Trial, then 🎯 save up to 30% with our 🛍️ Intro Offer (First 50 users, ends Dec. 25th)

Age in code field

  • Huutsch
  • Huutsch
  • OFFLINE
  • Posts: 8
  • Thanks: 0
  • Karma: 0
5 years 7 months ago #312405 by Huutsch
Age in code field was created by Huutsch
Hi,

I've added a field to the user profile where a code field displays the age in years.

For this field I can release the privicy properties, but they are not displayed during registration or editing the profile.
I guess because a code field is read-only.
So a user can only leave his date of birth open, but then no one can see his age.

Even worse, however, I find that I can not share the search for this field.

I suspect that I am not the only one with the desire to show the age over the privacy settings to certain users and others not.
Likewise with the desire to be able to search for the user lists also for an age range.
Is there any other way I can make a user's age useful for privacy settings and searching?

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • OFFLINE
  • Posts: 48609
  • Thanks: 8300
  • Karma: 1446
5 years 7 months ago #312408 by krileon
Replied by krileon on topic Age in code field
Why are you displaying age in a code field? The date field themselves have a display option for displaying as age. Code fields can not be searched. They're generated content that isn't stored. Date fields can be searched. As for privacy controls simply use CB Privacy and enable privacy controls for your date field.

Is there any other way I can make a user's age useful for privacy settings and searching?

Yes, use a Date field.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • Huutsch
  • Huutsch
  • OFFLINE
  • Posts: 8
  • Thanks: 0
  • Karma: 0
5 years 7 months ago #312412 by Huutsch
Replied by Huutsch on topic Age in code field
Thanks,

Why I displaying age in a code field?
Because I found only this method in your documentation ( www.joomlapolis.com/documentation/18534-calculating-years-months-days-from-birthday-field-using-cb-code-field )
And if I could have searched for it in the user lists, that would have been enough for me.
For the privacy setting, I could use the birth date setting.

In this context, I feel the behavior of the user lists as faulty.
If I limit the age in the user list, no profile should be displayed in the result, where for me the age may not be displayed.
The privacy settings can be bypassed with clever restrictions in the user lists, only by the fact that a profile appears in the result or not.

Another question:
Do you have a similarly simple solution for calculating and searching for distances between users?

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • OFFLINE
  • Posts: 48609
  • Thanks: 8300
  • Karma: 1446
5 years 7 months ago #312415 by krileon
Replied by krileon on topic Age in code field
CB Privacy can not be bypassed. If you search a users field whom you don't have permission to see they will be removed from the search results. CB Moderators and the users own self are of course exempt from privacy controls.

That tutorial is just a usecase example for CB Code Field. For Date fields simply edit it and under Parameters > Display set "Profile View Display" and "Userlist Search Display" to "Age". You will not be able to search a Code field as it has no storage.

Do you have a similarly simple solution for calculating and searching for distances between users?

No, we don't have radius searching at this time.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • Huutsch
  • Huutsch
  • OFFLINE
  • Posts: 8
  • Thanks: 0
  • Karma: 0
5 years 6 months ago #312607 by Huutsch
Replied by Huutsch on topic Age in code field

CB Privacy can not be bypassed. If you search a users field whom you don't have permission to see they will be removed from the search results. CB Moderators and the users own self are of course exempt from privacy controls.


I've done some tests and it's true, except for looking for age.
I have set the date of birth to private and searched for it with another user.
My test user was shown in the result list.

The search for age is also not intuitive at the point.
If I have a user who displays in his profile as age 30 and I look for it with the filter: age is from 30 to 30, then I get an empty result.
Except the user has exactly today his 30th birthday.
Mathematically, this behavior is correct, but I do not believe that many people think so in the context of age.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • OFFLINE
  • Posts: 48609
  • Thanks: 8300
  • Karma: 1446
5 years 6 months ago #312611 by krileon
Replied by krileon on topic Age in code field

I've done some tests and it's true, except for looking for age.
I have set the date of birth to private and searched for it with another user.
My test user was shown in the result list.

Will take a look to see if a bug could be prevent this from working correctly.

forge.joomlapolis.com/issues/7570

The search for age is also not intuitive at the point.
If I have a user who displays in his profile as age 30 and I look for it with the filter: age is from 30 to 30, then I get an empty result.
Except the user has exactly today his 30th birthday.
Mathematically, this behavior is correct, but I do not believe that many people think so in the context of age.

Selecting min and max of 30 should work fine. Have added a bug ticket to take a look. The query may not be using >= and <= as it should.

forge.joomlapolis.com/issues/7569


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum