| |
|
| :: |
| Author |
Message |
mhmdkhamis PR4

Joined: 26 Nov 2006 Posts: 436 Location: egypt
|
Posted: Wed Mar 28, 2007 11:23 pm Post subject: can i convert from simple mod to mixed without any problems |
|
|
hello dcz
can i convert from simple mod to mixed without any problems
what about it |
_________________ برامج |برامج مجانية|العاب |
|
| Back to top |
|
 |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
Posted: Wed Mar 28, 2007 11:50 pm Post subject: Re: can i convert from simple mod to mixed without any problems |
|
|
code wise it is simple, you' just have to update your .htaccess and add the new forum and category rewriterules and keep the old one at the end of it.
At this stage, both types of url should work.
Then, update the phpBB code. It's rather simple, do as if you'd install the mixed mod rewrite, you'll just find some parts already done, in sessions.php.
You need as well to update the zero dupe, just uninstall its code changes in index.php and viewforum.php and install the new ones.
Overwrite the phpbb_seo/phpbb_seo_class.php file with the new one and voilà.
One more thing, since you're using windows-1256 char-set is to modify the way title are build prior to injection.
So far, I cam up with something that will only inject Latin chars without accents if any.
On your index :
| Quote: | | برامج وموضوعات الفيستا WINDOWS VISTA |
would end up as "window-vista" in url,
with "forum"
The trick is to replace :
| Code: | function format_url( $url, $type = 'topic' ) {
$url = preg_replace("(\[.*\])U","",$url);
$find = array('"','&','<','>','\r\n','\n',);
$url = str_replace ($find, '-', $url);
$url = str_replace ('ß', 'ss', $url);
$url = str_replace (array('ö','Ö'), 'oe', $url);
$url = str_replace (array('ä','Ä'), 'ae', $url);
$url = str_replace (array('ü','Ü'), 'ue', $url);
$find = "ÀÁÂÃÅàáâãåÒÓÔÕØòóôõøÈÉÊËèéêëÇçÌÍÎÏìíîïÙÚÛùúûÿÑñ";
$replace = "aaaaaaaaaaooooooooooeeeeeeeecciiiiiiiiuuuuuuynn";
$url = strtr($url,$find,$replace);
$url = strtolower($url);
$url = ereg_replace("[^a-zA-Z0-9]", "-", $url);
$url = preg_replace("`([\-])+`", "\\1", $url);
$url = trim($url, '-');
$url = ( $url == "" ) ? $type : $url;
return $url;
} |
With :
| Code: | function format_url( $url, $type = 'topic' ) { // The UTF-8 0.2.x candidate :-)
//Short url
$url = preg_replace("(\[.*\])U","",$url);
$find = array('"','&','<','>','\r\n','\n',);
$url = str_replace ($find, '-', $url);
$url = rawurlencode($url);
$url = preg_replace("`%[a-zA-Z0-9]{2}`", "-", $url);
$url = preg_replace("`[^a-zA-Z0-9-]`", "-", $url);
$url = preg_replace("`[-]+`", "-", $url);
$url = trim($url, '-');
$url = ( $url == "" ) ? $type : strtolower($url);
return $url;
}
|
It should work with any char-set.
I'll work on some optimisation on this one, but it is already used with no problem, here for example.
++ |
_________________ Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________
Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche |
|
| Back to top |
|
 |
mhmdkhamis PR4

Joined: 26 Nov 2006 Posts: 436 Location: egypt
|
Posted: Thu Mar 29, 2007 12:25 am Post subject: Re: can i convert from simple mod to mixed without any problems |
|
|
thank you dcz
do u think if i update to mixed will effect to my site in google
(i use arabic languge)
or it effect much in english board
does result of my site will be best in google with arabic languge when i use mixed
i want your idea
i have now good position in google with simple mod
but sure i want the best
what do u advice me to do |
_________________ برامج |برامج مجانية|العاب |
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
Posted: Thu Mar 29, 2007 8:20 am Post subject: Re: can i convert from simple mod to mixed without any problems |
|
|
Going for the mixed mod rewrite would only change your forum URL.
And it would only add the Latin characters from the forum titles.
Take a look at the example I posted, you'll understand better.
For the windows vista forum, it would for sure be a great thing, for other it will be the same.
Injecting Latin char-set words only makes sens if you're using some in titles despite the fact it's not the main char-set used. So it mostly concerns technical terms.
Would as well be a bit more work for the server, barely nothing, but still a little bit.
I don't think going for advanced would be useful, as you do not have many Latin char-set words in topic titles, but for forum, and especially if you take this occasion to rename some in order to take the most advantage of the title injection, can help out
++ |
_________________ Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________
Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche |
|
| Back to top |
|
 |
mhmdkhamis PR4

Joined: 26 Nov 2006 Posts: 436 Location: egypt
|
Posted: Thu Mar 29, 2007 10:09 am Post subject: Re: can i convert from simple mod to mixed without any problems |
|
|
| dcz wrote: | Going for the mixed mod rewrite would only change your forum URL.
And it would only add the Latin characters from the forum titles.
Take a look at the example I posted, you'll understand better.
For the windows vista forum, it would for sure be a great thing, for other it will be the same.
Injecting Latin char-set words only makes sens if you're using some in titles despite the fact it's not the main char-set used. So it mostly concerns technical terms.
Would as well be a bit more work for the server, barely nothing, but still a little bit.
I don't think going for advanced would be useful, as you do not have many Latin char-set words in topic titles, but for forum, and especially if you take this occasion to rename some in order to take the most advantage of the title injection, can help out
++ |
thanks dcz for you advice
but the really problem with the sandbox with google
google now trust in my links i dont know what will happen if i change
that which i am afraid of  |
_________________ برامج |برامج مجانية|العاب |
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
|
| Back to top |
|
 |
|
|
| Navigation |
Similar Topics |
|
|
|
|
|
|
|