Get XOOPS XOOPSXOOPS FAQFAQ ForumsForums NewsNews ThemesThemes ModulesModules
New Posts New Topics All Posts All Forums Index General Modules Themes Development International XOOPS.org

Search

Donat-O-Meter

Make donations with PayPal!
Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $65.00
Net Balance: $61.80
Left to go: $38.20

Donations
studioC  ($25)May-17
Anonymous ($15)May-16
Anonymous ($25)May-4

Learn XOOPS Core

Local Support

Advertisement

XOOPS Code hosted on SourceForge

Cumulus Tag Cloud

2 2.5 2.6 3.0 2013 Abuse AntiHarvesting AntiMalUser AntiSpam API Australia Ban Banning Beats billige black Blocks blue Captcha cell Christmas chronolabs Cloud content Conversion demo docek download Dresses editor evden eve facebook familia Federated floor free Gateway Google herre Honeypot Human inStyler IP IPLog jQuery JSON kantor lamps List log logger Logging mobile module modules Monster MyAlbum-p newbb news online Outlet PageRank Permissions pink Plugin Plus portal Prevention profile project Protector publisher release Rights rmcommon Room sale security SERIAL Server site Size Smarty Spam stem Studio svn tag tags tdmcreate Theme themes userlog website Whitepaper xoops Xortify xthemes ZendFramework

New Users

Registering user

# 136021

dressshop

Welcome to XOOPS!




Bottom   Previous Topic   Next Topic  Register To Post



#1 Posted on: 2010/2/14 8:05 International Domain Names (IDN) & SEF
xoops_sef function

This 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

Top

wishcraft
Module Developer
Module Developer
Joined:
2007/5/18 15:56
From Dulwich Hill, Sydney, Australia
Group:
Registered Users
Posts: 2044
(Show More) (Show Less)







You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.

[Advanced Search]