Skip to Content Skip to Menu

Language override question

  • liaskas
  • liaskas
  • ONLINE
  • Posts: 480
  • Thanks: 40
  • Karma: 3
  • Add-ons
20 hours 9 minutes ago #342562 by liaskas
Language override question was created by liaskas
Hello we need to use substitutions in the following language string...

VIEW_POST_36d0c2 -> View Post

There we want to use substitution like this... [cb:if usergroup includes "9"]Login to view the post[cb:elseif usergroup !includes "9"]View Post[/cb:elseif][/cb:if]

but the output is "[cb:if usergroup includes "9"]Login to view the post[cb:elseif usergroup !includes "9"]View Post[/cb:elseif][/cb:if]". Are we missing something? Thank you.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 49819
  • Thanks: 8514
  • Karma: 1465
11 hours 45 minutes ago #342566 by krileon
Replied by krileon on topic Language override question
That string is not passed through substitutions so it's not possible to do that. Ideally whatever URL it's linking to should send them to login instead.


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.

  • liaskas
  • liaskas
  • ONLINE
  • Posts: 480
  • Thanks: 40
  • Karma: 3
  • Add-ons
10 hours 38 minutes ago #342568 by liaskas
Replied by liaskas on topic Language override question
We have used substitutions in lang strings again in the past (Older post of ours: www.joomlapolis.com/forum/professional-members-support/245189-field-label-question?start=18#331817 )

Is it that this particular string can not be substituted, or language string substitutions are not working anymore in latest CB versions?

Ideally whatever URL it's linking to should send them to login instead

This string is shown instead of the cb activity post when flair is enabled for that post.
 

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 49819
  • Thanks: 8514
  • Karma: 1465
10 hours 30 minutes ago #342569 by krileon
Replied by krileon on topic Language override question
Substitutions are not applied to every language string. That language string, like the majority, is not passed through substitutions. If you want to condition its display you'd need to make a custom template and override the template file. Users aren't required to login to toggle post visibility though so I'm not sure what you're trying to apply is really applicable to the situation.


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.

  • liaskas
  • liaskas
  • ONLINE
  • Posts: 480
  • Thanks: 40
  • Karma: 3
  • Add-ons
10 hours 6 minutes ago #342570 by liaskas
Replied by liaskas on topic Language override question
What we are trying to do...

User uploads an image in his profile gallery tab. That image privacy is registered users only.

The CB Gallery - Create auto action is creating an activity post (that has been assigned a flair. We do not know if the flair assignment works there, we will test).

Case 1
When a user is logged in, the cb activity shows the stream post with a "View Post" button, because of the flair. When "View Post" is clicked the images appear. Perfect!

Case 2
When a guest user is viewing the cb activity, he sees "View Post" on the same stream post, but when the "View Post" is clicked, icon-image.webp appears so the user thinks that something is not working well there! This is why we need to change the language file string there to "Login to view the post" or whatever for the guest users.

You will say "if the uploaded image is for registered users, they should not appear to guests". I agree 100%. We do not want to show the image to guests... we are trying to tease the guest user, so that he registers to our site.

Can we achieve this somehow?

Thank you.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 49819
  • Thanks: 8514
  • Karma: 1465
9 hours 38 minutes ago #342571 by krileon
Replied by krileon on topic Language override question
Ok, your Case 2 is basically a bug. They shouldn't see the post at all. The asset check should be checking for permission to see the asset and if that fails it should remove it from the display entirely. Will investigate this further.


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