Kunena 6.2.5 & module Kunena Latest 6.0.7 released

The Kunena team has announce the arrival of Kunena 6.2.5 [K 6.2.5] which is now available for download as a native Joomla extension for J! 4.3.x/4.4.x/5.0.x. This version addresses most of the issues that were discovered in K 6.1 / K 6.2 and issues discovered during the last development stages of K 6.2

Question Multilingual LTR and RTL sites. Load different kunena.forum.css files for each language

More
13 years 10 months ago - 13 years 7 months ago #1 by hopewise
hello,

it will be great if the admin can determine a different css file per language,
for ex:

kunena.forum_en.css for englsih

kunena.forum_ar.css for arabic

instead of hard coding the css file name to always be kunena.forum.css

this will be a great feature for languages that are right to left, and will increase Kunena penetration into more communities.

how can i do that trick ?

thanks,
hopewise
Last edit: 13 years 7 months ago by sozzled. Reason: Changed subject to improve search relevance

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

More
13 years 10 months ago #2 by @quila
Replied by @quila on topic Re: kunena.forum.css ?
Hi,

how you think to load this diferent files?

With option in the configuration or..??

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

More
13 years 10 months ago #3 by hopewise
Replied by hopewise on topic Re: kunena.forum.css ?
i shall load the css depending on the selected language at JoomFish,
but, where to tell Kunena about the desired css file ??

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

More
13 years 7 months ago - 13 years 7 months ago #4 by OfekA
Replied by OfekA on topic Re: kunena.forum.css ?
Anything new with topic? I really need this feature.
If someone can try and guide me which files i need to edit I'd be so greatful!

I have a multilingual website with English and Hebrew, and I can't seem to find any solution for the css.

Thanks in advance..!
Last edit: 13 years 7 months ago by OfekA.

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

More
13 years 7 months ago - 13 years 7 months ago #5 by OfekA
Replied by OfekA on topic Re: kunena.forum.css ?
Maybe if I'll try something like this, will it work?

kunena.php lines 267-275 original:
Code:
if ($fbConfig->joomlastyle < 1) { if (file_exists(KUNENA_JTEMPLATEPATH.'/css/kunena.forum.css')) { $document->addStyleSheet(KUNENA_JTEMPLATEURL . '/css/kunena.forum.css'); } else { $document->addStyleSheet(KUNENA_TMPLTCSSURL); }

I changed it to this:
Code:
if ($fbConfig->joomlastyle < 1) { if ($this->language=he-IL) { $document->addStyleSheet(KUNENA_JTEMPLATEURL . '/css/he-il.css'); } else { $document->addStyleSheet(KUNENA_JTEMPLATEURL . '/css/en-gb.css'); }
Last edit: 13 years 7 months ago by OfekA.

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

More
13 years 7 months ago #6 by Matias
Replied by Matias on topic Re: kunena.forum.css ?
Kunena 1.6 supports this in the templates.

You just need to add above if's to the initialize.php in your template.

BTW: always quote strings in PHP: "he-IL" or 'he-IL'. Otherwise your error log will grow fast.
The following user(s) said Thank You: OfekA

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

More
13 years 7 months ago - 13 years 7 months ago #7 by OfekA
Replied by OfekA on topic Re: kunena.forum.css ?

Matias wrote: Kunena 1.6 supports this in the templates.

You just need to add above if's to the initialize.php in your template.

BTW: always quote strings in PHP: "he-IL" or 'he-IL'. Otherwise your error log will grow fast.

Thank you so much, the quote strings made the code work, and now it uses the "he-il.css" file, but for both languages.. it doesn't use the "en-gb.css" for english for some reason.

I tried looking for a initialize.php but there is no such file in my components\com_kunena folder.

Any suggestions?
Last edit: 13 years 7 months ago by OfekA.

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

More
13 years 7 months ago #8 by Matias
Replied by Matias on topic Re: kunena.forum.css ?
Try this:
Code:
if ($this->language=='he-IL')
The following user(s) said Thank You: OfekA

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

More
13 years 7 months ago - 13 years 7 months ago #9 by OfekA
Replied by OfekA on topic Re: kunena.forum.css ?

Matias wrote: Try this:

Code:
if ($this->language=='he-IL')

Now it uses for both English and Hebrew the "en-gb.css" file. Any idea what's wrong?

Edit: I also know that it's the "en-gb.css" because i made a special tweak for it so i'll notice, so just to clarify, it's not loading the "kunena.forum.css".
Last edit: 13 years 7 months ago by OfekA.

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

More
13 years 7 months ago - 13 years 7 months ago #10 by OfekA
Replied by OfekA on topic Re: kunena.forum.css ?
So basically, this is the current code on kunena.php line 267:
Code:
if ($fbConfig->joomlastyle < 1) { if ($this->language=='he-IL') { $document->addStyleSheet(KUNENA_DIRECTURL . '/template/default_ex/he-il.css'); } else { $document->addStyleSheet(KUNENA_DIRECTURL . '/template/default_ex/en-gb.css'); }

With this code (I double checked) the kunena system loads the file "en-gb.css" on both Hebrew and English.

As far as I understand, this can only mean, that this line is somewhat corrupted:
Code:
if ($this->language=='he-IL')
I presume that's it's incorrect, but i'm not sure to what i can change it..

Any suggestions?
Last edit: 13 years 7 months ago by OfekA.

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

Time to create page: 0.582 seconds