Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Share some code :)
Hi,
congratulations for this amazing piece of software :) I've been looking at your code and it's a little bit too OO for me to comprehend. I was wondering if you could share the code that is resposible for creating SEF URL's. I was wondering how did you made the coversion from Äćžšđ to cczsd (like in this discussion -> http://lussumo.com/community/discussion/2552/cczsd-cczsd/ ), because there are more character that this 5 that need to be converted to make shure that your application isn't user brakeable...
Thank you for your time...
0
This discussion has been closed.
Comments
If somebody else needs it, here it is
function CleanupString($InString) { $Code = explode(',', '<,>,',&,",À,Ã,Â,Ã,Ä,Ä,Ã…,Ä€,Ä„,Ä‚,Æ,Ç,Ć,ÄŒ,Ĉ,ÄŠ,ÄŽ,Ä,Ã,È,É,Ê,Ë,Ä’,Ę,Äš,Ä”,Ä–,Äœ,Äž,Ä ,Ä¢,Ĥ,Ħ,ÃŒ,Ã,ÃŽ,Ã,Ī,Ĩ,Ĭ,Ä®,Ä°,IJ,Ä´,Ķ,Å,Ľ,Ĺ,Ä»,Ä¿,Ñ,Ń,Ň,Å…,ÅŠ,Ã’,Ó,Ô,Õ,Ö,Ö,Ø,ÅŒ,Å,ÅŽ,Å’,Å”,Ř,Å–,Åš,Å ,Åž,Åœ,Ș,Ť,Å¢,Ŧ,Èš,Ù,Ú,Û,Ãœ,Ū,Ü,Å®,Å°,Ŭ,Ũ,Ų,Å´,Ã,Ŷ,Ÿ,Ź,Ž,Å»,Þ,Þ,à ,á,â,ã,ä,ä,Ã¥,Ä,Ä…,ă,æ,ç,ć,Ä,ĉ,Ä‹,Ä,Ä‘,ð,è,é,ê,ë,Ä“,Ä™,Ä›,Ä•,Ä—,Æ’,Ä,ÄŸ,Ä¡,Ä£,Ä¥,ħ,ì,Ã,î,ï,Ä«,Ä©,Ä,į,ı,ij,ĵ,Ä·,ĸ,Å‚,ľ,ĺ,ļ,Å€,ñ,Å„,ň,ņ,ʼn,Å‹,ò,ó,ô,õ,ö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', '-', $sReturn); return strtolower(str_replace('--', '-', $sReturn)); }