Fork me on GitHub
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

Nominate XOOPS!

Learn XOOPS Core

Donat-O-Meter

Make donations with PayPal!
Stats
Goal: $100.00
Due Date: Jul 31
Gross Amount: $15.00
Net Balance: $14.11
Left to go: $85.89

Donations
Anonymous ($15)Jul-20

Local Support

Advertisement

XOOPS Code hosted on SourceForge

Cumulus Tag Cloud

- 2 2.5 2.6 3.0 4 6 2013 Abuse adslight Android AntiHarvesting AntiMalUser AntiSpam API Apple Battlefield billige Bootstrap Captcha cell cent chronolabs CHUNG content CĂN demo docek download Dresses evden eve facebook Fat Food for free Gateway Google Guide herre Honeypot HP html5 Human HỘ IP iPhone jQuery List log Loss mobile module modules Monster new newbb news NHÀ online PARK phone PHP Prevention profile project Protector publisher Rapid RESIDENCE responsive review Rights rmcommon Room security Sentry site Smartphone Smarty Solution Spam Studio tag tags tdmcreate template The Theme themes User userlog web weight Wishcraft xoops Xortify

New Users

Registering user

# 137627

Roscislaw12

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: 2119
(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]