Some different questions on userfields

14 years 9 months ago #102120 by Camee
Sorry for this, but there are some questions and notices which recently stacked up and I didn't wanted to open a new topic for each issue.

1. I have a strange behaviour on fields that are required in registration and which won't be shown in the user searchresults if they aren't published for the relevant userlist. I chosed "All searchable fields" in userlist configuration, but I don't want them to be shown in userlists.

2. How can I setup a field which should be searchable according to ranges? For example I'd like to have a field called "Height". The member should be able to put in his exact height (e.g. 175 cm). Other users should be able to search this field in ranges, e.g. from 170 to 185 cm. 170 and 185 can be both, textarea or dropdownlist. It should be similar to age search. Is this possible with available resources?

3. I've setup the profile title as follows:
[username] is [cb_gender] looking for [cb_wanted]. If the necessary fields are not filled, it looks like: "_ is _ looking for _." Not very nice as profile title :( I put the tab with the fields in the "not on profile" position, the users should only edit them, but they shouldn't show up in the profile (the information is already in the profile title, which is in another tab). The fields should also be searchable, for that I cannot make them required (see ad 1.). Is there a possibility to hide the profile title, if the specific fields are empty?

4. I have problems with substitutions. First, the correct format [cb:userfield field="username" /] doesn't work for me. I have to write only [username] or [cb_gender](in both, delimiter fields and field titles), otherwise there is an empty space on profile. Second, the substitutions doesn't work with date fields, like [cb_birthday]. I'd like to show the user's age in years, but unfortunately nothing happens.

My aim on this, is to create a short member description consisting of custom text and substitutions from CB fields. All fields should be required, but I cannot do that, otherwise they won't be searchable. And some of the fields should only be editable and searchable, but nothing else. I'm a little bit confused about testing for days now, how to make this possible. Maybe someone can help me with this?

Please, don't point me to the documentation. My subscription expired only a couple of days ago, I red already all 180 sites ;)

Regards,
Camee

PS: If you have questions, please ask me. I'm not sure, if I could explain everything clearly :blush:

Edit: Joomla 1.5.11, CB 1.2.1, no SEF, PHP 5.2.9, MySQL 5.0.67, Template Praisebuilder

Post edited by: Camee, at: 2009/06/17 19:56

Please Log in to join the conversation.

14 years 9 months ago #102234 by krileon
Replied by krileon on topic Re:Some different questions on userfields
  1. Select all searchable. Set the field searchable. Set the field to be visible on profile (can be on a hidden tab, but tab must be published).
  2. You would need to create a new field type for this.
  3. This is how it functions. You will need to learn how to use the new substitutions method and use IF statement capability or make those fields required.
  4. Have you read and tried the various methods for using new substitutions?

The user [username] lives in [cb_citystate] and his name is: [name].

Again with CB:USERDATA:
The user [cb:userdata field="username" /] lives in [cb:userdata field="cb_citystate" /] and his name is: [cb:userdata field="name" /].

Again with CB:USERFIELD:
The user [cb:userfield field="username" /] lives in [cb:userfield field="cb_citystate" /] and his name is: [cb:userfield field="name" /].

Again with CB:USERDATA OF #ME:
The user [cb:userdata field="username" user="#me" /] lives in [cb:userdata field="cb_citystate" user="62" /] and his name is: [cb:userdata field="name" user="#me" /].

NOW CHECK IFS:
A:TDSP:[cb:if username="demo"]This is Demo being displayed[/cb:if]
B:NDSP:[cb:if user="#displayed" username="test"]This is Test being displayed[/cb:if]
C:TWC:[cb:if user="#me" username="demo"]This is Demo watching[/cb:if]
D:AWC:[cb:if user="#me" username="admin"]This is Admin watching[/cb:if]

[cb:field name="username"/]


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.
The following user(s) said Thank You: rajaa

Please Log in to join the conversation.

14 years 7 months ago #107578 by KoFShinobi
Replied by KoFShinobi on topic Re:Some different questions on userfields
2.-> Isn't the integer field searchable in ranges? You could have the integer field for the number and if you want there to be multiple measurement types (centimeter, inch etc.) a drop down single select box. You could use a delimiter field to display it with the code "[integer field name] [measurement type field]."

delimiters FTW!

Please Log in to join the conversation.

14 years 7 months ago #108458 by sh0em0nkey
Replied by sh0em0nkey on topic Re:Some different questions on userfields
2. -> I used an integer field type for weight, and a drop down for height.

The drop down for height has options for 4'0" - 7'0", and metric counterparts in parenthesis next to it.

e.g.: 4'2" (127 cm)

In CB search, weight is automatically search-able in a range.

If you turn on advanced search for the user list, this would make height search-able by multiple heights. When you enter search mode, you'll have the option of selecting "is" "is one of" "is not" "is not one of" - and then selecting different heights to search for.

This works nicely for me. I guess the only improvement would be able to add a prefix or suffix to integer field types, so you can could define "lbs" or whatever the metric counterpart is.

Please Log in to join the conversation.

14 years 2 months ago #121787 by RealIdea
Replied by RealIdea on topic Re:Some different questions on userfields
what if i need 3 fields that Depends on the first choice ?
like if country was chosen the state will load and after state the location will load ?

Please Log in to join the conversation.

14 years 2 months ago #121788 by nant
RealIdea wrote:

what if i need 3 fields that Depends on the first choice ?
like if country was chosen the state will load and after state the location will load ?


then you need to develop such a field plugin.

currently there is none.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.271 seconds

Facebook Twitter LinkedIn