У меня форум стоит на адрессе kamkon41.zz.mu
Страница вордпресса - kamkon41.zz.mu/page
Установил распаковку для форума в
kamkon41.zz.mu/phpbb3Установил распаковку для плагина вордпресса в kamkon41.zz.mu/page/wp-content/wp-content/plugins
запустил для форума так kamkon41.zz.mu/phpbb3/install.xml
Появилось окно с инструкциями их было ооочень много. Но я их не выполнял . а следовал инструкциям
топик стартера.
Надо выполнять инструкции которые даны в установке для форума ? . (их там большой список )
Выполнил замены в
[spoiler]
includes/functions_user.php: - function validate_email($email, $allowed_email = false) на
+ function phpbb_validate_email($email, $allowed_email = false)
includes/message_parser.php: - 'email' => array('bbcode_id' => 10, 'regexp' => array('#\[email=?(.*?)?\](.*?)\[/email\]#uise' => "\$this->validate_email('\$1', '\$2')")), на
+
'email' => array('bbcode_id' => 10, 'regexp' => array('#\[email=?(.*?)?\](.*?)\[/email\]#uise' => "\$this->phpbb_validate_email('\$1', '\$2')")), - function validate_email($var1, $var2) на
+ function phpbb_validate_email($var1, $var2)ncludes/functions_user.php: -function validate_username($username, $allowed_username = false)
+
function phpbb_validate_username($username, $allowed_username = false)posting.php:
- if (($result = validate_username($post_data['username'], (!empty($post_data['post_username'])) ? $post_data['post_username'] : '')) !== false)
+ if (($result = phpbb_validate_username($post_data['username'], (!empty($post_data['post_username'])) ? $post_data['post_username'] : '')) !== false)[/spoiler]
Добавлено спустя 10 минут 22 секунды:Fatal error:
Cannot redeclare make_clickable() (previously declared in /home/u551632695/public_html/page/wp-includes/
formatting.php:1573) in /home/u551632695/public_html/includes/
functions_content.php on line 690
Привожу код с 1573 строчки с Вордпресса.
1573 formatting.php
function make_clickable( $text ) {
$r = '';
$textarr = preg_split( '/(<[^<>]+>)/', $text, -1, PREG_SPLIT_DELIM_CAPTURE ); // split out HTML tags
foreach ( $textarr as $piece ) {
if ( empty( $piece ) || ( $piece[0] == '<' && ! preg_match('|^<\s*[\w]{1,20}+://|', $piece) ) ) {
$r .= $piece;
continue;
}
// Long strings might contain expensive edge cases ...
if ( 10000 < strlen( $piece ) ) {
// ... break it up
foreach ( _split_str_by_whitespace( $piece, 2100 ) as $chunk ) { // 2100: Extra room for scheme and leading and trailing paretheses
if ( 2101 < strlen( $chunk ) ) {
$r .= $chunk; // Too big, no whitespace: bail.
} else {
$r .= make_clickable( $chunk );
}
}
} else {
$ret = " $piece "; // Pad with whitespace to simplify the regexes
$url_clickable = '~
([\\s(<.,;:!?]) # 1: Leading whitespace, or punctuation
( # 2: URL
[\\w]{1,20}+:// # Scheme and hier-part prefix
(?=\S{1,2000}\s) # Limit to URLs less than about 2000 characters long
[\\w\\x80-\\xff#%\\~/@\\[\\]*(+=&$-]*+ # Non-punctuation URL character
(?: # Unroll the Loop: Only allow puctuation URL character if followed by a non-punctuation URL character
[\'.,;:!?)] # Punctuation URL character
[\\w\\x80-\\xff#%\\~/@\\[\\]*(+=&$-]++ # Non-punctuation URL character
)*
)
(\)?) # 3: Trailing closing parenthesis (for parethesis balancing post processing)
~xS'; // The regex is a non-anchored pattern and does not have a single fixed starting character.
// Tell PCRE to spend more time optimizing since, when used on a page load, it will probably be used several times.
$ret = preg_replace_callback( $url_clickable, '_make_url_clickable_cb', $ret );
$ret = preg_replace_callback( '#([\s>])((www|ftp)\.[\w\\x80-\\xff\#$%&~/.\-;:=,?@\[\]+]+)#is', '_make_web_ftp_clickable_cb', $ret );
$ret = preg_replace_callback( '#([\s>])([.0-9a-z_+-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,})#i', '_make_email_clickable_cb', $ret );
$ret = substr( $ret, 1, -1 ); // Remove our whitespace padding.
$r .= $ret;
}
}
// Cleanup of accidental links within links
$r = preg_replace( '#(<a( [^>]+?>|>))<a [^>]+?>([^>]+?)</a></a>#i', "$1$3</a>", $r );
return $r;
690 из форума functions_content.php
{
if ($server_url === false)
{
$server_url = generate_board_url(true);
}
static $magic_url_match;
static $magic_url_replace;
if (!is_array($magic_url_match))
{
$magic_url_match = $magic_url_replace = array();
// Be sure to not let the matches cross over. ;)
// matches a xxxx://aaaaa.bbb.cccc. ...
$magic_url_match[] = '#(^|[\n\t (>.])(' . get_preg_expression('url_inline') . ')#ieu';
$magic_url_replace[] = "make_clickable_callback(MAGIC_URL_FULL, '\$1', '\$2', '$server_url')";
// matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing
$magic_url_match[] = '#(^|[\n\t (>])(' . get_preg_expression('www_url_inline') . ')#ieu';
$magic_url_replace[] = "make_clickable_callback(MAGIC_URL_WWW, '\$1', '\$2', '$server_url')";
// matches an email@domain type address at the start of a line, or after a space or after what might be a BBCode.
$magic_url_match[] = '/(^|[\n\t (>])(' . get_preg_expression('email') . ')/ie';
$magic_url_replace[] = "make_clickable_callback(MAGIC_URL_EMAIL, '\$1', '\$2', '$server_url')";
}
return preg_replace($magic_url_match, $magic_url_replace, $text);
}