UPDATES EasyBlog 6.0.11 Released! Update to the latest version now!

Helpdesk

Your Time
Our Time
Response Time
24 — 48 hours
We strive to provide the fastest ever response possible. However, we are not super beings.

Allow at least 24 — 48 hours
  Support is offline
It is currently off working hours and most of us aren't around

Rest assured that we will get back to you as soon as the day starts tomorrow!
  Support is offline

SEF-support for "FALANG"

Yannick · ·
5:11 PM Thursday, 25 July 2013
None
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:

/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
The replies under this section are restricted to logged in users or users with an active subscription with us