Webmaster общности: Predpriemach.com | SearchEngines.bg

    Интегриране на wordpres с phpbb

    Wordpress уроци

    Автор: index

    Източник :http://www.wp-united.com/
    Автор : John Wells
    Превод: Преслав Панайотов.
    Проекта е защитен от John Wells с GnU Лиценз.
    Мода е преведен специално за web-tourist.net
    Ниво на трудност: Средно
    Време за добавяне на мода : ~10-20 минути/зависи си от човека /

    Файлове за редакция:

    • includes/functions_content.php,
    • includes/functions.php,
    • memberlist.php,
    • viewtopic.php,
    • ucp.php,
    • includes/ucp/ucp_profile.php,
    • includes/functions_user.php,
    • includes/acp/acp_users.php,
    • language/en/common.php

    Файлове за КОПИРАНЕ:

    • /root/blog.php,
    • /root/adm/style/acp_wp_united.php,
    • /root/includes/acp/acp_wp_united.php,
    • /root/includes/acp/info/acp_wp_united.php,
    • /root/language/en/mods/admin_wp-united.php,
    • /root/language/en/mods/permissions_wp-united.php,
    • /root/language/en/mods/wp-united.php,
    • /root/styles/prosilver/template/blog.html,
    • /root/styles/subsilver2/template/blog.html,
    • /root/wp-united/*

    Отворете :includes/functions_content.php
    Намерете:

    function make_clickable($text, $server_url = false, $class = 'postlink')
    {

    Добави преди него:

    if (!function_exists('make_clickable'))
    {

    Намерете:

    if ($server_url === false)
    {

    Добави преди него:

    global $IN_WORDPRESS;
    if ($IN_WORDPRESS)
    {
    return wp_make_clickable($text); //WP version
    } else {//phpBB version

    Намери:

    return preg_replace($magic_url_match, $magic_url_replace, $text);
    }

    Добави след него:

    }
    }

    Запамети и затвори файла.

    Отвори: includes/functions.php
    Намери:

    // Which timezone?
    $tz = ($user->data['user_id'] != ANONYMOUS) ? strval(doubleval($user->data['user_timezone'])) : strval(doubleval($config['board_timezone']));

    Добави след него:

    require_once($phpbb_root_path . 'wp-united/wpu-actions.' . $phpEx);
    $GLOBALS['wpu_actions']->do_head($template);

    Намери:

    $template->display('body');

    Добави след него:

    require_once($phpbb_root_path . 'wp-united/wpu-actions.' . $phpEx);
    $GLOBALS['wpu_actions']->do_tail();

    Запамети и затвори файла.

    Отворете :memberlist.php
    Намери:

    if (!empty($profile_fields['row']))
    {

    Добави след него:

    require_once($phpbb_root_path . 'wp-united/wpu-actions.' . $phpEx);
    $GLOBALS['wpu_actions']->generate_profile_link($member['user_wpublog_id'], $template);

    Запамети и затвори файла.

    Отвори :viewtopic.php
    Намери:

    }
    $db->sql_freeresult($result);
    
    // Load custom profile fields
    if ($config['load_cpf_viewtopic'])

    Добави ПРЕДИ него:

    require_once($phpbb_root_path . 'wp-united/wpu-actions.' . $phpEx);
    $GLOBALS['wpu_actions']->generate_viewtopic_link($row['user_wpublog_id'], $user_cache[$poster_id]);
    

    Намери:

    // Dump vars into template
    $template->assign_block_vars('postrow', $postrow);

    Добави преди това:

    $GLOBALS['wpu_actions']->show_viewtopic_link($user_cache[$poster_id], $postrow);

    Запамети и затвори файла.

    Отвори:ucp.php
    Намери:

    $message = $message . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a> ');

    Добави след това:

    require_once($phpbb_root_path . 'wp-united/wpu-actions.' . $phpEx);
    $GLOBALS['wpu_actions']->do_logout();
    

    Запамети и затвори файла.

    Отвори: includes/ucp/ucp_profile.php
    Намери:

    $message = 'PROFILE_UPDATED';

    Добави след това:

    require_once($phpbb_root_path . 'wp-united/wpu-actions.' . $phpEx);
    $GLOBALS['wpu_actions']->profile_update('reg_details', $user->data['user_id'], $user->data['user_wpuint_id'], $sql_ary);
    

    Намери:

    // Update Custom Fields
    if (sizeof($cp_data))

    Добави преди него:

    require_once($phpbb_root_path . 'wp-united/wpu-actions.' . $phpEx);
    $GLOBALS['wpu_actions']->profile_update('profile_info', $user->data['user_id'], $user->data['user_wpuint_id'], $sql_ary);

    Запамети и затвори файла.

    Отвори:includes/functions_user.php
    Намери:

    if (isset($sql_ary['user_avatar']))
    {

    Добави след това:

    require_once($GLOBALS['phpbb_root_path'] . 'wp-united/wpu-actions.' . $GLOBALS['phpEx']);
    $GLOBALS['wpu_actions']->profile_update('avatar', ($custom_userdata === false) ? $user->data['user_id'] : $custom_userdata['user_id'], ($custom_userdata === false) ? $user->data['user_wpuint_id'] : $custom_userdata['user_wpuint_id'], $sql_ary);

    Запамети и затвори файла.

    Отвори: includes/acp/acp_users.php
    Намери:

    add_log('admin', 'LOG_USER_USER_UPDATE', $data['username']);

    Добави преди това:

    require_once($phpbb_root_path . 'wp-united/wpu-actions.' . $phpEx);
    $GLOBALS['wpu_actions']->profile_update('reg_details', $user_id, $user_row['user_wpuint_id'], $sql_ary);
    

    Намери:

    // Update Custom Fields
    if (sizeof($cp_data))

    Добави преди това:

    require_once($phpbb_root_path . 'wp-united/wpu-actions.' . $phpEx);
    $GLOBALS['wpu_actions']->profile_update('profile_info', $user_id, $user_row['user_wpuint_id'], $sql_ary);
    

    Запамети и затвори файла.

    Отвори: language/en/common.php
    Намери:

    'YOU_NO_NEW_PM' => 'No new private messages are waiting for you.',

    Добави След това:

    //WP-United
    'BLOG' => 'WordPress Blog',
    'VISIT_BLOG' => 'Visit User\'s Blog',
    'ACP_WP_UNITED' => 'WP-United',
    'ACP_WPU_MAINPAGE' => 'WP-United Administration',
    'ACP_WPU_CATMAIN' => 'WP-United Admin',
    'ACP_WPU_CATSETUP' => 'Set Up WP-United',
    'ACP_WPU_CATMANAGE' => 'Manage User Integration',
    'ACP_WPU_CATSUPPORT' => 'Support WP-United',
    'ACP_WPU_CATOTHER' => 'Other',
    'ACP_WPU_MAINTITLE' => 'Main Page',
    'ACP_WPU_DETAILED' => 'All Settings On A Page',

    Това е всичко… Можете да свалите целият пакет от сайта на http://www.wp-united.com/ ==>
    http://www.wp-united.com/get-wp-united