Plaatjes gefixt en /nieuws/bericht/:id toegevoegd

This commit is contained in:
mischa.spelt committed 2017-06-07 08:27:50 +02:00
1 parent d6a90d8144
commit 3fa2b09eef
5 files changed
+574 -10

No files matched your search

+4
View File
@@ -37,6 +37,10 @@ class Model {
public function url_slug($text) {
$text = strtolower($text);
// $text = iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $text);
$search = explode(",","ç,æ,œ,á,é,í,ó,ú,à,è,ì,ò,ù,ä,ë,ï,ö,ü,ÿ,â,ê,î,ô,û,å,e,i,ø,u");
$replace = explode(",","c,ae,oe,a,e,i,o,u,a,e,i,o,u,a,e,i,o,u,y,a,e,i,o,u,a,e,i,o,u");
$text = str_replace($search, $replace, $text);
$text = preg_replace('/\b([a-z]{1,3})\b/u', '', $text);
$text = preg_replace('/[^\w_\+\s]/', '', $text);
$text = preg_replace('/\s+/', '-', $text);