UPDATES EasyBlog 6.0.14 Released! Joomla 5.x and PHP 8.x compatible 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 online
Our support specialists is available now. We will attend to you as soon as we can.
  Support is online

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