[SOLVED] Disable language in Falang tab

More
8 years 11 months ago - 8 years 11 months ago #53961 by pipedream
If I configure a language to be disabled in Configuration -> Item Form, this language is removed from the list of languages in the Language section, but not from the list of the language tabs in the fields title, alias, metadesc, metakey and maintext, when Falang is activated.

So, I propose this change in components/com_flexicontent/views/item/tmpl/form.php:

1. Insert this in the beginning:
Code:
$disable_langs = $this->params->get('disable_languages_fe', array());

2. In each of the 5 lines that reads:
Code:
<?php if ($this->itemlang->shortcode!=$t->shortcode && $t->shortcode!='*') : ?>

Change it to:
Code:
<?php if ($this->itemlang->shortcode!=$t->shortcode && $t->shortcode!='*' && !in_array($t->code, $disable_langs)) : ?>

This is useful to me because I don't want to confuse the client with an unnecessary language (the default language) since the language ALL is the one that should be used to complete the data of the default language.

Hope this helps and can be integrated in future versions.
Thanks.
Last edit: 8 years 11 months ago by pipedream.

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

More
8 years 11 months ago #53963 by micker
think you can do a pull request in git => it more simpler for team

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

More
8 years 11 months ago #53974 by ggppdk
Hello

it makes sense, and since you tested, will include this in next GitHub commit

thanks, for feedback

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
8 years 11 months ago #53980 by pipedream
Thank you.

Sorry that I didn't had time yet to sunmit a PR.
I will gladly submit one if you wish.

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

More
8 years 11 months ago #53981 by ggppdk
Hello

not needed in this case, made / tested change locally already

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.290 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline