public static function generatePermalink($string) { $config = EasyBlogHelper::getConfig(); $permalink = ''; if ($config->get('main_sef_unicode')) { //unicode support. $permalink = EasyBlogRouter::permalinkUnicodeSlug($string); } else { // Replace accents to get accurate string $string = EasyBlogRouter::replaceAccents($string); // no unicode supported. $permalink = JFilterOutput::stringURLSafe($string); // check if anything return or not. If not, then we give a date as the alias. if (trim(str_replace('-', '', $permalink)) == '') { $datenow = EasyBlogHelper::getDate(); $permalink = $datenow->toFormat("%Y-%m-%d-%H-%M-%S"); } } return $permalink; }