phpBB — a popular script of a forum. phpBB it is created in 2000 and for today is the forum most used in the world with an open initial code. Zebroid has the maximum support of this CMS (import of a content from a site in the program, export from the program on a site, and as support of comments).
Export
Export in phpBB3 is realised in a kind
file export. The program generates XML a file which is necessary for importing to the special module on a site.
Process of installations of the module of import
Watch closely where it is necessary to add before where after, and where to replace a code.
- Download archive with the module
- It is showered archive contents in a site root
- Open a file "/includes/acp/acp_board.php"
We search:
switch($mode)
{
Further we add:
/* Start Zebroid import */
case'zebroid_import':
$display_vars=array(
'title'=>'ACP_ZEBROID',
'vars'=> array(
'legend1'=>'ZEBROID_SETTINGS',
'zeb_filename'=> array ('lang'=>'ZEBROID_FILENAME','validate'=>'string','type'=>'select','method'=>'get_zebroid_files','explain'=> true),
'forum_perm_from'=> array ('lang'=>'ZEBROID_PERMISSIONS','validate'=>'string','type'=>'select','method'=>'select_all_forums','explain'=> true),
'usr_pass'=> array ('lang'=>'ZEBROID_USR_PASS','validate'=>'string','type'=>'text:20:50','explain'=> true),
'usr_group'=> array ('lang'=>'ZEBROID_USR_GROUP','validate'=>'int','type'=>'select','method'=>'select_groups_list','explain'=> true),
'views_count'=> array ('lang'=>'ZEBROID_VIEWS_COUNT','validate'=>'string','type'=>'text:20:50','explain'=> true),
'use_avatars'=> array ('lang'=>'ZEBROID_AVATAR','validate'=>'bool','type'=>'radio:yes_no','explain'=> true),
'uniq_check'=> array ('lang'=>'ZEBROID_UNIQ_CHECK','validate'=>'bool','type'=>'radio:yes_no','explain'=> true),
),
);
break;
/* End Zebroid import * /
- In the same file
We search:
function quick_reply ($value, $key)
{
global $user;
$radio_ary = array (1 =>'YES', 0 =>'NO');
return h_radio ('config [allow_quick_reply]', $radio_ary, $value).
'
<input class = "button2" type = "submit" id = "'. $key.'_enable" name = "'. $key.'_enable" value = "'. $user-> lang ['ALLOW_QUICK_REPLY_BUTTON'].'"/>';
}
Further we add:
/* Start Zebroid import */
function get_zebroid_files ()
{
global $phpbb_root_path;
$file_list = glob ($phpbb_root_path. "/zeb_import/*.xml");
$result = ";
if ($file_list)
foreach ($file_list as $value) {
$filename = substr ($value, (strlen ($value)) - (strlen (strrchr ($value,'/'))) + 1, (strlen ($value)));
$result. = "<option value ='$ filename'> $filename </option>";
}
return $result;
}
function select_all_forums ($value, $key)
{
global $user, $config;
$forum_list = make_forum_select (false, false, true, true, true, false, true);
foreach ($forum_list as $f_id => $f_row)
{
$f_row ['selected'] = phpbb_optionget (FORUM_OPTION_FEED_NEWS, $f_row ['forum_options']);
$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>';
}
return $s_forum_options;
}
function select_groups_list () {
return group_select_options (2, array (4,5,6), false);
}
/* End Zebroid import * /
- In the same file
We search:
//We validate the complete config if whished
validate_config_vars ($display_vars ['vars'], $cfg_array, $error);
if ($submit &&! check_form_key ($form_key))
{
$error [] = $user-> lang ['FORM_INVALID'];
}
Further we add:
/* Start Zebroid import */
if ($mode =='zebroid_import'&& $submit) {
include ($phpbb_root_path.'includes/functions_zebroid.php');
$zeb_err = zebroid_import_file ($phpbb_root_path.'zeb_import /'. $cfg_array ['zeb_filename'],//the Way to a file
$cfg_array ['forum_perm_from'],//the Forum rights
$cfg_array ['usr_pass'],//the Password for users
$cfg_array ['usr_group'],//Group of users
$cfg_array ['views_count'],//Viewings
$cfg_array ['use_avatars'],//to Use avatars
$cfg_array ['uniq_check'],//to Check on presence of duplicates
$this-> u_action);//the Reference back
if ($zeb_err! = " $error [] = $zeb_err;
}
//Values on умолчанияю
$cfg_array ['usr_pass'] ='123456';
$cfg_array ['use_avatars'] ='1';
$cfg_array ['uniq_check'] ='1';
$cfg_array ['views_count'] ='30-300';
/* End Zebroid import * /
- to Open a file "/language/en/acp/board.php" or "/language/ru/acp/board.php" depending on language in options (it is possible to correct also both)
We search:
?>
Before it it is added:
/* Start Zebroid import */
$lang = array_merge ($lang, array (
'ACP_ZEBROID_EXPLAIN'=>'content Import подготовленого the program of Zebroid',
'ZEBROID_SETTINGS'=>'Options',
'ZEBROID_FILENAME'=>'a file Name',
'ZEBROID_FILENAME_EXPLAIN'=>'That it was possible to choose a file for import, it at first needs to be loaded into a folder "zeb_import" which is in a site root. The file name should be obligatory in a Latin.',
'ZEBROID_PERMISSIONS'=>'to Copy the forum rights',
'ZEBROID_PERMISSIONS_EXPLAIN'=>'Establishes the same access rights on the created forums, as at выделеного',
'ZEBROID_USR_PASS'=>'the Password for users',
'ZEBROID_USR_PASS_EXPLAIN'=>'to All new users who are created by the given script the password specified here'will be established,
'ZEBROID_USR_GROUP'=>'Group for users',
'ZEBROID_USR_GROUP_EXPLAIN'=>'Group to which the users created by a script'will get,
'ZEBROID_VIEWS_COUNT'=>'Quantity of viewings of a theme',
'ZEBROID_VIEWS_COUNT_EXPLAIN'=>'to Mozhna to specify exact value then the script to new themes will appropriate it ±20, or to specify a range, for example, "50-80"',
'ZEBROID_AVATAR'=>'to Load avatars',
'ZEBROID_AVATAR_EXPLAIN'=>'If this option is included - then to users that are created by a script, avatars from a folder "zeb_avatar" (each avatar is used only 1 time and leaves from a folder)'will be loaded,
'ZEBROID_UNIQ_CHECK'=>'to Eliminate duplicates',
'ZEBROID_UNIQ_CHECK_EXPLAIN'=>'Before that creation, whether the script will check there is no theme with such name in a database and only in case of absence to create new',
));
/* End Zebroid import * /
- to Open a file «language/en/acp/common.php» or «language/ru/acp/common.php» depending on language in options (it is possible to correct also both)
We search:
?>
Before it it is added:
/* Start Zebroid import */
$lang = array_merge ($lang, array (
'ACP_ZEBROID'=>'Zebroid import',
'LOG_CONFIG_ZEBROID'=>'<strong> Import Zebroid </strong>',
));
/* End Zebroid import * /
- to Open a file «includes/acp/info/acp_board.php»
We search:
'registration'=> array ('title'=>'ACP_REGISTER_SETTINGS','auth'=>'acl_a_board','cat'=> array ('ACP_BOARD_CONFIGURATION')),
Further we add:
'zebroid_import'=> array ('title'=>'Zebroid Import','auth'=>'acl_a_board','cat'=> array ('ACP_BOARD_CONFIGURATION')),
- to Open a file «includes/functions_posting.php»
We search:
function submit_post ($mode, $subject, $username, $topic_type, &$poll, &$data, $update_message = true, $update_search_index = true)
To replace on:
function submit_post ($mode, $subject, $username, $topic_type, &$poll, &$data, $update_message = true, $update_search_index = true, $custom_time = ")
- In the same file
We search:
$current_time = time ();
To replace on:
if (! $custom_time) $current_time = time ();
else $current_time = $custom_time;
- After installation we come in админку, вкладка «System»-> «Management of modules»-> «the administration Center». In the list on the middle it is chosen «General», then «Configuration» and in the bottom of page from the dropping out list it is chosen «Zebroid import» (a screenshot ) and we press the button to add. Further in the list near Zebroid import is pressed to «include». After all we clean cache (tab «General») Now adjustment the fashion will be accessible «General»
→ «Configuration» → «Zebroid import» (screenshot).
If you are going to use avatars then their inclusion in options of a forum and increase in the admissible size of loaded avatars to level which will not be less added by you in a folder «zeb_avatar» is obligatory point. The script automatically reduces the pictures loaded by you to 90 pixels on larger to the party.
The module is able post comments, but phpBB3 does not watch that comments and themes were are published in time is necessary, and displays at once all. If you want to have the postponed publication for this CMS — use the modified assemblage
phpBB3 Zebroid Edititon .
Import
For phpBB3 the special module of export of a forum which then can be imported without problems has been created, using a profile
XML import the file generated by module. Module installation:
- Swing the module and we unpack archive
- Open a file by means of the editor and we establish login and the password in 6 and 7 lines
- Fill in a file zexport.php in a folder with a forum
Further we open page:
http://full_path_to_forum/zexport.php
We enter broad gulls and the password, we specify what branch of a forum to export and we start process.
After export the generated file is downloaded and imported it with use of a correct profile of import XML. If you do not plan to export the received project in the future in phpBB3 then with the help снипета search and replacement which is called phpBB3, the project can be cleaned from BB-codes (more precisely to translate them in HTML-codes).
Assemblage phpBB3 Zebroid Edititon
The basic feature and advantage of this updating is that a forum script strictly supervises a conclusion that and messages depending on current date. Thus, if we by means of Zebroid have filled a forum in which there are posts and themes with not come date such themes and posts will appear then when date of their publication will come. What does it give? — Now very simply to create pseudo-active forums which will lead the life and not to veil from you.
At entering of updatings the attention has been paid to the slightest details:
- the Quantity that, messages and users corresponds to the data for time present situation
- Users with not come date of registration in lists of users are not present
- the Quantity of messages at the user is always shown true at present to time
- it is impossible to find In search of posts and that from the future
- Last activity of the user never happens more than current time
- Posts are always displayed in a chronological order
Last, by the way, is very important. Here for example: There is a theme in which 7 messages, but are displayed at present only 3 (date of the publication of the others has not come yet). The user reads a theme and decides to leave the answer which as a result gets to the place of the fourth in a theme and does not move anywhere. All answers having later date of the publication — are displayed in a theme after that post.
Attention: To be updated from official sources it is strictly forbidden
The script of import of a content of Zebroid in a cursor is already established.