Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

[SOLVED] Query multicheckbox question

  • KatoKalin
  • KatoKalin
  • OFFLINE
  • Posts: 265
  • Thanks: 11
  • Karma: -5
  • Add-ons
11 years 4 days ago - 11 years 4 days ago #235945 by KatoKalin
Replied by KatoKalin on topic Query multicheckbox question
Actually I have checked again and the line you have mentioned never seems to get executed.
For me it looks more like the function starting in line 332 is the reason. However I cannot say why. When I var_dump $value it shows the language strings as values while I believe there it should already output the translated strings. It is in line 334 where it says
Code:
$value = $user->get( $field->get( 'name' ) );

Edit: It seems that I have solved it. At line 346 instead of
Code:
$labels[] = $option['text'];
it should read
Code:
$labels[] = getLangDefinition($option['text']);

This solves it for me. Can you please check if this amendment is correct and does not conflict with anything else?
Last edit: 11 years 4 days ago by KatoKalin.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48473
  • Thanks: 8281
  • Karma: 1443
11 years 4 days ago - 11 years 4 days ago #235980 by krileon
Replied by krileon on topic Query multicheckbox question
I see, you're using defines. It does not support the old language string method. The translations are done in getQuery using CBTxt. You need to define your language strings using the new translation method (we do not use defines anymore and they're there for backwards compatibility until we can remove them). Example as follows.

'Value 1' => 'This is my value'

You can also directly migration from defines using the below.

'_UE_MYDEFINE' => 'Value 1'

You'll want to make these additions to cbteamplugins language file.

You're welcome to keep your change in place though, but won't be added to release.


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.
Last edit: 11 years 4 days ago by krileon.

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

  • KatoKalin
  • KatoKalin
  • OFFLINE
  • Posts: 265
  • Thanks: 11
  • Karma: -5
  • Add-ons
11 years 4 days ago #235985 by KatoKalin
Replied by KatoKalin on topic Query multicheckbox question
Well this is weird. I installed the english language plugin as you have suggested and there are only defines in there.
I wonder where I have missed the switch from defines to => ?

So should I change all defines in the language plugin as well?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48473
  • Thanks: 8281
  • Karma: 1443
11 years 4 days ago - 11 years 4 days ago #235997 by krileon
Replied by krileon on topic Query multicheckbox question

I wonder where I have missed the switch from defines to => ?

Only new plugins use CBTxt usage. Existing defines are still valid and used.

So should I change all defines in the language plugin as well?

No, you only need to use CBTxt usages on newer plugins as they don't use defines. The defines currently there are still being used. Defines also still work for field titles, value labels, etc.. just not for newer plugins as they use CBTxt.


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.
Last edit: 11 years 4 days ago by krileon.

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

  • KatoKalin
  • KatoKalin
  • OFFLINE
  • Posts: 265
  • Thanks: 11
  • Karma: -5
  • Add-ons
11 years 4 days ago #236019 by KatoKalin
Replied by KatoKalin on topic Query multicheckbox question
I have added it as CBTxt now and it is finally working.

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

Moderators: beatnantkrileon
Powered by Kunena Forum