Hello guys,
we have modified the Easyblog router a little bit, to add support for "FALANG" (a famous translation extension for Joomla 3 - find here: http://extensions.joomla.org/extensions/languages/multi-lingual-content/18210).
It brings the possibility to translate the Easyblog URLs by Falang.
Here the simple modification:
Also I attached you our FALANG content-elements. You can put it in your download-area. To use it, the users only have to upload it by FTP to:
we have modified the Easyblog router a little bit, to add support for "FALANG" (a famous translation extension for Joomla 3 - find here: http://extensions.joomla.org/extensions/languages/multi-lingual-content/18210).
It brings the possibility to translate the Easyblog URLs by Falang.
Here the simple modification:
/components/com_easyblog/router.php on line 293
if( $config->get( 'main_sef_unicode' ) )
{
// some code...
}
else
{
// insert hack from below here...
$table = EasyBlogHelper::getTable( 'Blog' , 'Table' );
}
// HACK by yagendoo.com (Get original slug if translated)
if(JPluginHelper::isEnabled('system', 'falangdriver') === true)
{
$JLang = JFactory::getLanguage();
$currentLanguage = $JLang->getDefault();
$defaultLanguage = $JLang->getTag();
if($currentLanguage != $defaultLanguage)
{
$langSlug = $segments[ ( $count - 1 ) ];
$langSlugClear = str_replace(':', '-', $langSlug);
$Dbo = JFactory::getDbo();
$Dbo->setQuery("SELECT original_text
FROM #__falang_content
WHERE reference_field = 'permalink'
AND reference_table = 'easyblog_post'
AND value = " . $Dbo->q($langSlugClear));
$Dbo->execute();
$originalSlug = $Dbo->loadResult();
if(!empty($originalSlug))
{
$segments[ ( $count - 1 ) ] = $originalSlug;
}
}
}
// END of hack
Also I attached you our FALANG content-elements. You can put it in your download-area. To use it, the users only have to upload it by FTP to:
/administrator/components/com_falang/contentelements