Umarım işinize yarar !

Kod: Tümünü seç
<?php
/**
*
* @package Ultimate SEO URL phpBB SEO
* @version $Id: setup_phpbb_seo.php 262 2010-04-20 11:06:58Z dcz $
* @copyright (c) 2006 - 2010 www.phpbb-seo.com
* @license http://www.opensource.org/licenses/rpl1.5.txt Reciprocal Public License 1.5
*
*/
/**
* @ignore
*/
if (!defined('IN_PHPBB')) {
exit;
}
/**
* setup_phpbb_seo Class
* www.phpBB-SEO.com
* @package Ultimate SEO URL phpBB SEO
*/
class setup_phpbb_seo {
/**
* Do the init
*/
function init_phpbb_seo() {
global $phpEx, $config, $phpbb_root_path;
// Let's load config and forum urls, mods adding options in the cache file must do it before
if ($this->check_cache()) {
foreach($this->cache_config['dynamic_options'] as $optionname => $optionvalue ) {
if (@is_array($this->cache_config['settings'][$optionname])) {
$this->seo_opt[$optionname] = array_merge($this->seo_opt[$optionname], $this->cache_config['settings'][$optionname]);
} elseif ( @isset($this->cache_config['settings'][$optionvalue]) ) {
$this->seo_opt[$optionvalue] = $this->cache_config['settings'][$optionvalue];
}
}
$this->modrtype = @isset($this->seo_opt['modrtype']) ? $this->seo_opt['modrtype'] : $this->modrtype;
if ( $this->modrtype > 1 ) { // Load cached URLs
$this->seo_url['forum'] =& $this->cache_config['forum'];
}
}
// ====> here starts the add-on and custom set up <====
// ===> Custom url replacements <===
// Here you can set up custom replacements to be used in title injection.
// Example : array( 'find' => 'replace')
// $this->url_replace = array(
// // Purely cosmetic replace
// '$' => 'dollar', '€' => 'euro',
// '\'s' => 's', // it's => its / mary's => marys ...
// // Language specific replace (German example)
// 'ß' => 'ss',
// 'ş' => 's',
// 'ğ' => 'g',
// 'İ' => 'i',
// 'ß' => 'ss',
// 'Ä' => 'Ae', 'ä' => 'ae',
// 'Ö' => 'Oe', 'ö' => 'oe',
// 'Ü' => 'Ue', 'ü' => 'ue',
// 'Ü' => 'Ue', 'ü' => 'ue',
// 'Ä' => 'A', 'ä' => 'a',
// 'Ö' => 'O', 'ö' => 'o',
// 'Ü' => 'U', 'ü' => 'u',
// 'Ş' => 'S', 'ş' => 's',
// 'Ç' => 'C', 'ç' => 'c',
// 'Ğ' => 'G', 'ğ' => 'g',
// 'I' => 'I', 'ı' => 'i',
// );
// ===> Custom values Delimiters, Static parts and Suffixes <===
// ==> Delimiters <==
// Can be overridden, requires .htaccess update <=
// Example :
// $this->seo_delim['forum'] = '-mydelim'; // instead of the default "-f"
// ==> Static parts <==
// Can be overridden, requires .htaccess update.
// Example :
// $this->seo_static['post'] = 'message'; // instead of the default "post"
// !! phpBB files must be treated a bit differently !!
// Example :
// $this->seo_static['file'][ATTACHMENT_CATEGORY_QUICKTIME] = 'quicktime'; // instead of the default "qt"
// $this->seo_static['file_index'] = 'my_files_virtual_dir'; // instead of the default "resources"
// ==> Suffixes <==
// Can be overridden, requires .htaccess update <=
// Example :
// $this->seo_ext['topic'] = '/'; // instead of the default ".html"
// ==> Special for lazy French, others may delete this part
if ( strpos($config['default_lang'], 'fr') !== false ) {
$this->seo_static['user'] = 'membre';
$this->seo_static['group'] = 'groupe';
$this->seo_static['global_announce'] = 'annonces';
$this->seo_static['leaders'] = 'equipe';
$this->seo_static['atopic'] = 'sujets-actifs';
$this->seo_static['utopic'] = 'sans-reponses';
$this->seo_static['npost'] = 'nouveaux-messages';
$this->seo_static['urpost'] = 'non-lu';
$this->seo_static['file_index'] = 'ressources';
}
// <== Special for lazy French, others may delete this part
// Let's make sure that settings are consistent
$this->check_config();
// Custom characters replacement for Cyrillic char-set
$this->url_replace = array(
'Ğ' => 'G', 'ğ' => 'g',
'Ü' => 'U', 'ü' => 'u',
'Ş' => 'S', 'ş' => 's',
'İ' => 'I', 'ı' => 'i',
'Ö' => 'O', 'ö' => 'o',
'Ç' => 'C', 'ç' => 'c',
'Ä' => 'A', 'ä' => 'a',
'Ö' => 'O', 'ö' => 'o',
'Ü' => 'U', 'ü' => 'u',
'Ş' => 'S', 'ş' => 's',
'Ç' => 'C', 'ç' => 'c',
'Ğ' => 'G', 'ğ' => 'g',
'I' => 'I', 'ı' => 'i',
);
}
// Here start the add-on methods
}
?>
Not: Bu yöntemi düzgün şekilde ingilizce yükledikten sonra değiştirmeyi yapınız aksi taktirde hata alacaksınız.
yaptıktan sonra önbelleği boşaltın ve acp_forum_url gönder dedikten sonra olmadığı taktirde iletilerinizi düzenleyip tekrar gönder yapın kesin olacaktır.