A plugin that allows Joom!Fish to work with articles

  • Anonymous
  • Visitor
  • Visitor
15 years 4 months ago #10139 by Anonymous
Code:
<?php // Check to ensure this file is included in Joomla! defined( '_JEXEC' ) or die( 'Restricted access' ); $mainframe->registerEvent('onAfterRoute', 'botAutoSelectLang'); function botAutoSelectLang( $args=null ) { if (JRequest::getVar('option') == 'com_flexicontent') { if ($aid = JRequest::getInt('id', 0)) { global $mainframe; $lang = $mainframe->getUserState('application.lang'); $db =& JFactory::getDBO(); $query = 'SELECT j.id, ie.language' . ' FROM #__content AS i' . ' INNER JOIN #__content AS j ON i.alias = j.alias AND i.catid = j.catid AND i.state = 1' . ' LEFT JOIN #__flexicontent_items_ext AS ie ON ie.item_id = j.id' . ' WHERE i.id = ' .(int) $aid ; $db->setQuery($query); $items = $db->loadObjectList(); foreach($items as $item) { if(substr($item->language, 0, 2) == substr($lang, 0, 2)) { JRequest::setVar('id', $item->id); break; } } } } } ?>
Make sure no spaces between the "<?" at front and the end "?>"

This worked for me :D

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

More
15 years 4 months ago #10241 by micker
somebody can do installation package ?
regards

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
15 years 4 months ago #10525 by kath
can someone sum up for me in short what his plugin does that FC doesn't do by default?

(for me , FC and JF do seem to "work with articles"
or is it maybe in the package anyway by now?)

thanks for enlightening me!
kath

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

More
15 years 4 months ago #10634 by micker
hello
an ameliration is in plan for flexicontent and joomfish .. by i didn't have date i am not a dev ..
sorry

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
15 years 3 months ago #11040 by effrit
seems it works.
but in xml is wrong group - 'content' instead of 'system' :)
i have session trouble with this plugin so i delete empty symbols in php file and made installation zip.
after installing go to plugins manager and publish system 'Auto Language Selection' plugin.

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

More
15 years 3 months ago #11060 by micker
cool thanks

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
14 years 6 months ago #16916 by lewax
This solution works very well but i always have the message: "There are no translations available."

Even if the article is in the good language... (the main language of my site is french)

J! 1.5.23
FC 1.5.5

Thanks for your help...

Edit:
Just a precision... Joomfish translation works well to (without the message) but i'm not able to assign the same template as the original article, that's why i use this plugin... I have a template without any information on the top (created by, date, and so...)

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

More
14 years 6 months ago #16927 by ggppdk
Hello,
We are not using joomfish to translate the article, instead we are using the items manager of Flexicontent.

This means that Joomfish will not "find" the article translation.

You need to disable the plugin "Joomfish - Missing_translation" in the Plugin Manager.

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 review. Thanks!

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

More
14 years 6 months ago #16956 by micker
Thanks

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
14 years 6 months ago #17004 by lewax
Thanks a lot ggppdk.
As you seam to know very well this subject, I would like to ask you another question...

I have a category in FC and (for the moment ) just one article in this cat. I duplicated it, selected the language, don't changed the alias.
Now, when i create a menu to show this category, it display both article (the one in french and the second in english)... I'm sure i missed something but what???

Thanks for your help...

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

Moderators: vistamediajoomlacornerggppdk
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
Save