ZEBROID - Technological Future: Web development . With the speed of light the soft will generate Adsense Ready Sites on more then 40 CMS Engines. Zebroid will help you manufacture the most complicated processes with maximum accuracy and relevance!

Module phpbb3


]>
]>

Installing a module of posting to forum engine phpBB3

Install process:

  1. Download the file: http://zebroid.us/forum/viewtopic.php?f=3&t;=6&p;=6#p6 (only for buyers)

  2. Unpack it in the root of site

  3. Open file "/includes/acp/acp_board.php"

    [cut]

    [Search:]

    1.switch ($mode)
    2.{

    [Then add:]

    01./* Start Zebroid import */
    02.case 'zebroid_import':   
    03.$display_vars = array(
    04.'title'    => 'ACP_ZEBROID',
    05.'vars'    => array(
    06.'legend1'            => 'ZEBROID_SETTINGS',
    07.'zeb_filename'        => array('lang' => 'ZEBROID_FILENAME',        'validate' => 'string',        'type' => 'select',     'method' => 'get_zebroid_files', 'explain' => true),
    08.'forum_perm_from'    => array('lang' => 'ZEBROID_PERMISSIONS',    'validate' => 'string',        'type' => 'select',  'method' => 'select_all_forums', 'explain' => true),
    09.'usr_pass'            => array('lang' => 'ZEBROID_USR_PASS',        'validate' => 'string',        'type' => 'text:20:50', 'explain' => true),
    10.'usr_group'         => array('lang' => 'ZEBROID_USR_GROUP',       'validate' => 'int',     'type' => 'select',  'method' => 'select_groups_list', 'explain' => true),
    11.'views_count'       => array('lang' => 'ZEBROID_VIEWS_COUNT', 'validate' => 'string',      'type' => 'text:20:50', 'explain' => true),
    12.'use_avatars'       => array('lang' => 'ZEBROID_AVATAR',      'validate' => 'bool',        'type' => 'radio:yes_no',    'explain' => true),
    13.),
    14.);
    15.break;
    16./* End Zebroid import */

  4. In the same file

    [Search:]

    1.function quick_reply($value, $key)
    2.{
    3.global $user;
    4.$radio_ary = array(1 => 'YES', 0 => 'NO');
    5.return h_radio('config[allow_quick_reply]', $radio_ary, $value) .
    6.'
    7.<input class="button2" type="submit" id="' . $key . '_enable" name="' . $key . '_enable" value="' . $user->lang['ALLOW_QUICK_REPLY_BUTTON'] . '" />';
    8.}

    [Then add:]

    01./* Start Zebroid import */ 
    02.function get_zebroid_files()
    03.{       
    04.global $phpbb_root_path;
    05.$file_list = glob($phpbb_root_path . "/zeb_import/*.xml");
    06. 
    07.$result = '';
    08.if($file_list)
    09.foreach ($file_list as $value) {
    10.$filename = substr($value, (strlen ($value)) - (strlen (strrchr($value, '/'))) + 1, (strlen ($value)));
    11.$result .= "<option value='$filename'>$filename</option>";
    12.}
    13.return $result;
    14.}
    15. 
    16.function select_all_forums($value, $key)
    17.{
    18.global $user, $config;
    19.$forum_list = make_forum_select(false, false, true, true, true, false, true);
    20.foreach ($forum_list as $f_id => $f_row)
    21.{
    22.$f_row['selected'] = phpbb_optionget(FORUM_OPTION_FEED_NEWS, $f_row['forum_options']);
    23.$s_forum_options .= '<option value="' . $f_id . '"' . (($f_row['selected']) ? ' selected="selected"' : '') . (($f_row['disabled']) ? ' disabled="disabled" class="disabled-option"' : '') . '>' . $f_row['padding'] . $f_row['forum_name'] . '</option>';
    24.}
    25. 
    26.return $s_forum_options;
    27.}   
    28. 
    29.function select_groups_list(){
    30.return group_select_options(2, array(4,5,6), false);
    31.}
    32./* End Zebroid import */

  5. In the same file

    [Search:]

    1.// We validate the complete config if whished
    2.validate_config_vars($display_vars['vars'], $cfg_array, $error);
    3.if ($submit && !check_form_key($form_key))
    4.{
    5.$error[] = $user->lang['FORM_INVALID'];
    6.}

    [Then add:]

    01./* Start Zebroid import */
    02.if ($mode == 'zebroid_import' && $submit) {
    03.include($phpbb_root_path . 'includes/functions_zebroid.php');   
    04.$zeb_err = zebroid_import_file($phpbb_root_path . 'zeb_import/' . $cfg_array['zeb_filename'], //Путь к файлу 
    05.$cfg_array['forum_perm_from'], //Форумные права      
    06.$cfg_array['usr_pass'], //Пароль для пользователей                                  
    07.$cfg_array['usr_group'], //Группа пользователей
    08.$cfg_array['views_count'], //Просмотров
    09.$cfg_array['use_avatars'], //Использовать аватары
    10.$this->u_action); //Ссылка назад
    11.if ($zeb_err != '') $error[] = $zeb_err;
    12.}
    13. 
    14.//Значения по умолчанияю
    15.$cfg_array['usr_pass'] = '123456';
    16.$cfg_array['use_avatars'] = '1';
    17.$cfg_array['views_count'] = '30-300';
    18./* End Zebroid import */

  6. Open the file "/language/en/acp/board.php" or "/language/ru/acp/board.php" depending on the language settings in (you can edit both)

    [Search:]

    1.?>

    [Prior to this add:]

    01./* Start Zebroid import */
    02.$lang = array_merge($lang, array(
    03.'ACP_ZEBROID_EXPLAIN'   => 'Импорт контента подготовленого программой Зеброид',
    04.'ZEBROID_SETTINGS'              => 'Настройки',
    05.'ZEBROID_FILENAME'              => 'Имя файла',
    06.'ZEBROID_FILENAME_EXPLAIN'      => 'Для того, чтобы можно было выбрать файл для импорта, его сначала нужно загрузить в папку "zeb_import", которая находится в корне сайта. Имя файла обязательно должно быть на латинице.',
    07.'ZEBROID_PERMISSIONS'           => 'Копировать форумные права',
    08.'ZEBROID_PERMISSIONS_EXPLAIN'   => 'Устанавливает такие же права доступа на созданные форумы, что и у выделеного',
    09.'ZEBROID_USR_PASS'              => 'Пароль для пользователей',
    10.'ZEBROID_USR_PASS_EXPLAIN'      => 'Всем новым пользователям, которых создаёт данный скрипт будет установлен указанный здесь пароль',
    11.'ZEBROID_USR_GROUP'             => 'Группа для пользователей',
    12.'ZEBROID_USR_GROUP_EXPLAIN'     => 'Группа, в которую попадут созданные скриптом пользователи',  
    13.'ZEBROID_VIEWS_COUNT'           => 'Количество просмотров темы',
    14.'ZEBROID_VIEWS_COUNT_EXPLAIN'   => 'Можна указать точное значение, тогда скрипт новым темам будет присваивать его +/-20, или же указать диапазон, например, "50-80"',
    15.'ZEBROID_AVATAR'                => 'Загружать аватары',
    16.'ZEBROID_AVATAR_EXPLAIN'        => 'Если эта опция включена - тогда пользователям, что создаются скриптом, будут загружаться аватары из папки "zeb_avatar" (каждый аватар используется только 1 раз и удаляется из папка)',
    17.));
    18./* End Zebroid import */

  7. Open the file "language/en/acp/common.php" or "language/ru/acp/common.php " depending on the language settings in (you can edit both)

    [Search:]

    1.?>

    [Prior to this add:]

    1./* Start Zebroid import */
    2.$lang = array_merge($lang, array(
    3.'ACP_ZEBROID'       => 'Zebroid import',
    4.'LOG_CONFIG_ZEBROID'    => '<strong>Zebroid import</strong>',
    5.));
    6./* End Zebroid import */
    5.	Open the file "includes/acp/info/acp_board.php"

    [Search:]

    1.'registration'  => array('title' => 'ACP_REGISTER_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),

    [Then add:]

    1.'zebroid_import'    => array('title' => 'Zebroid Import', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),

  8. Open the file "includes/functions_posting.php"

    [Search:]

    1.function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $update_message = true, $update_search_index = true)

    [Replace on:]

    1.function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $update_message = true, $update_search_index = true, $custom_time = '')

  9. In the same file

    [Search:]

    1.$current_time = time();

    [Replace on:]

    1.if(!$custom_time) $current_time = time();
    2.else $current_time = $custom_time;

  10. After installation, go to admin panel, tab "System" -> “Module Management” -> “Central Administration”. In the middle of the list, select "General", then "Configuration" and at the bottom of the drop-down list, select "Zebroid import" and press Add button. Then on the list next to Zebroid import click "activate". After all we clean the cache (the "General"). Now mode setting will be available in the "General" -> "Configuration" -> "Zebroid import".

  11. If you intend to use avatars, then you should include them in the forum settings and increase the allowable size of the downloadable avatars to a level that is not lower than you add in the folder "zeb_avatar". The script will automatically reduce your uploaded images to 90 pixels on the larger side.

Log in to leave a comment