Fork me on GitHub

Search

Donat-O-Meter

Make donations with PayPal!
Stats
Goal: $100.00
Due Date: Oct 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00

Learn XOOPS Core

Local Support

Advertisement

XOOPS Code hosted on SourceForge

Cumulus Tag Cloud

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

New Users

Registering user

# 137840

ThomasC23

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
Joined:
2007/5/18 15:56
From Marrickville South, Sydney, Australia
Group:
Registered Users
Posts: 2122
(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.
You cannot create pdf.
You cannot get print page.

[Advanced Search]