|
MyBB SEO 1.0 Beta!
|
Posts: 214
Group: Administrators
Joined: May 2006
Status:
Offline
Reputation: 0
|
RE: MyBB SEO 1.0 Beta!
Find in seo.php:
$title = str_replace(array('_', " ", "&"), array("-", "-", "and"), $title);
Add below:
$title = str_replace (array('ä', 'ö', 'ü'), array('ae', 'oe', 'ue'), $title);
10-05-2006 08:43 AM
|
|
|
 |
Posts: 2
Group: Registered
Joined: Oct 2006
Status:
Offline
Reputation: 0
|
RE: MyBB SEO 1.0 Beta!
Thanks pacifier!
I tried that but it didn't work at first, probably due to a charset issue I don't understand.
What I finally came up with is this, and it's probably ugly, but it works on my test install:
function seo_clean_title($title) { // do the replacements and return encoded url $title = str_replace("&", "&", $title); $title = preg_replace("/&([a-z]+);/", "", $title); // remove html entities such as & " etc.. $title = str_replace( array(":", "?", ".", "!", "$", "^", "*", ",", ";", "'", '"', "%", "~", "@", "#", "[", "]", "<", ">", "\\", "/", "=", "+"), "", $title); $title = str_replace(array('_', " ", "&"), array("-", "-", "und"), $title);
// create HTML entities so that str_replace works $title = htmlentities(strtolower($title)); $title = str_replace ( array ('ä', 'ö', 'ü', 'ß'), array ( 'ae', 'oe', 'ue', 'ss'), $title);
// just to be on the safe side, remove potential other html entities again $title = preg_replace("/&([a-z]+);/", "", $title);
return rawurlencode($title); }
Kind regards,
Zorro
10-05-2006 12:15 PM
This post was last modified: 10-05-2006 02:10 PM by ZorroCat.
|
|
|
 |
Posts: 214
Group: Administrators
Joined: May 2006
Status:
Offline
Reputation: 0
|
RE: MyBB SEO 1.0 Beta!
Good to know it worked out that way. Thanks for posting it, I will consider adding it to future versions.
10-05-2006 01:52 PM
|
|
|
 |
Posts: 2
Group: Registered
Joined: Nov 2006
Status:
Offline
Reputation: 0
|
RE: MyBB SEO 1.0 Beta!
11-26-2006 11:00 PM
|
|
|
 |
Posts: 214
Group: Administrators
Joined: May 2006
Status:
Offline
Reputation: 0
|
RE: MyBB SEO 1.0 Beta!
Please make sure the .htaccess file exists in the forum directory.
11-27-2006 09:58 AM
|
|
|
 |
Posts: 2
Group: Registered
Joined: Nov 2006
Status:
Offline
Reputation: 0
|
RE: MyBB SEO 1.0 Beta!
.htaccess edit - footer spicefuse.com Edit - Plugin Open
NOOOOO
404 Error HELP ME PLZ
No SPeak english I'm Turkish !
11-27-2006 12:49 PM
|
|
|
 |
Posts: 1
Group: Registered
Joined: Nov 2006
Status:
Offline
Reputation: 0
|
|
|
|
 |
Posts: 1
Group: Registered
Joined: Dec 2006
Status:
Offline
Reputation: 0
|
RE: MyBB SEO 1.0 Beta!
I loaded it 2 my site and actived the plugin.Then i entered to threads i saw a | icon on top of my page.I couldn't understand why it happened.And i need turkish language support like ü,ö,ğ,ş
12-13-2006 07:38 PM
This post was last modified: 12-13-2006 07:40 PM by KURTAY.
|
|
|
 |
Posts: 214
Group: Administrators
Joined: May 2006
Status:
Offline
Reputation: 0
|
RE: MyBB SEO 1.0 Beta!
Kurtay, if you are using a language such as turkish, I don't recommend usage of this SEO plugin, as it's better suited towards latin based language character sets.
12-14-2006 08:48 AM
|
|
|
 |
Posts: 1
Group: Registered
Joined: Dec 2006
Status:
Offline
Reputation: 0
|
RE: MyBB SEO 1.0 Beta!
hi there 
I'm french so I use some particular characters in my title... I'd to modify the seo_clean_title function, I give you my corrections:
function seo_clean_title($title) { // do the replacements and return encoded url $title = utf8_decode($title); // My DB is utf8 encoded, I want to work with iso-8859-15 $title = str_replace("&", "&", $title); $title = preg_replace("/&([a-z]+);/", "", $title); // remove html entities such as & " etc.. $title = str_replace( array(":", "?", ".", "!", "$", "^", "*", ",", ";", "'", '"', "%", "~", "@", "#", "[", "]", "<", ">", "\\", "/", "=", "+"), "", $title); $title = str_replace( Array("�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�"), Array("e", "e", "e", "e", "c", "a", "a", "i", "i", "u", "o", "o"), $title); // Here, I transform accentued characters $title = str_replace(array('_', " ", "&"), array("-", "-", "and"), $title); return rawurlencode($title); }
I hope it'll help french users. You can see it in use at http://www.sujets-d-actu.eu
And a little thing to do: the direct access to the last post isn't SEO compliant....
12-22-2006 09:38 AM
This post was last modified: 12-22-2006 09:39 AM by CrazyCat.
|
|
|
 |
|
|