xoops_sef functionThis is the xoops_sef function you will need to include this in your include/functions.php file to work with any of the examples. It is for converting part of unicode for domain names and any language text, you can replaces the score with an underscore for SQL LIKE Queries for one character wide cards.
RewriteRule ^content/(.*?)$ modules/content/index.php?title=$1
These parts of the regular expression for unicode character for example in the following url :
http://www.yoursite.com/content/Your-Open-text-here/ you would use (.*?) in the rewrite htaccess script above with conjunction with a redirect - where the open database text is processed from the story title, hypothetically from user subscriptions.
if (!function_exists('xoops_sef')) {
function xoops_sef($datab, $char ='-')
{
$replacement_chars = array( ' ', '|', '=', '\', '+', '-', '_', '{', '}', ']', '[', ''', '"', ';',
':', '?', '>', '<', '.', ',', ')', '(', '*', '&', '^', '%', '$', '#', '@',
'!', '`', '~', ' ', '', '¡', '¦', '§', '¨', '©', 'ª', '«', '¬', '®', '',
'¯', '°', '±', '²', '³', '´', 'µ', '¶', '·', '¸', '¹', 'º', '»', '¼', '½',
'¾', '¿');
$return_data = (str_replace($replacement_chars,$char,$datab));
#print $return_data."<BR><BR>";
return($return_data);
}
}
The XOOPS sef function for
Search Engine Friendly URL which are URL that display in Unicode in Google and bing.. soon the address bar will display it as well.. some already do.
This was updated in the
.htaccess tutorial on the wiki