I have never been able to find "simple" instructions for anything in that area - and I have looked.
I'll "proof read" it for you if you want
JoshyPHP wrote:Sorry for the poke, but you know this better than anyone
textreparser
service, just a collection of services under the textreparser
tag that were originally created for the CLI. The relevant methods are phpbb\textreparser\reparser_interface::get_max_id()
and phpbb\textreparser\reparser_interface::reparse_range()
. Each service can be called to reparse a range of records, e.g. all posts between 0 to 100. That's all they do, their functionality is meant to be limited. http://area51.phpbb.com/phpBB/viewtopic ... 26&t=47666phpbb\textreparser\manager
class that schedules reparsing by cron but I don't know how it works. I can't remember who wrote it but you can use git blame
if you want to track the original author.config_text
table for reparser_resume
:Code: Select all
array (
'text_reparser.contact_admin_info' =>
array (
'range-min' => 1,
'range-max' => 0,
'range-size' => 100,
),
'text_reparser.forum_description' =>
array (
'range-min' => 1,
'range-max' => 0,
'range-size' => 100,
),
'text_reparser.forum_rules' =>
array (
'range-min' => 1,
'range-max' => 0,
'range-size' => 100,
),
'text_reparser.group_description' =>
array (
'range-min' => 1,
'range-max' => 0,
'range-size' => 100,
),
'text_reparser.pm_text' =>
array (
'range-min' => 1,
'range-max' => 47994,
'range-size' => 100,
),
'text_reparser.poll_option' =>
array (
'range-min' => 1,
'range-max' => 0,
'range-size' => 100,
),
'text_reparser.poll_title' =>
array (
'range-min' => 1,
'range-max' => 201761,
'range-size' => 100,
),
'text_reparser.post_text' =>
array (
'range-min' => 1,
'range-max' => 1074936,
'range-size' => 100,
),
'text_reparser.user_signature' =>
array (
'range-min' => 1,
'range-max' => 78054,
'range-size' => 100,
),
)
Code: Select all
array (
'text_reparser.contact_admin_info' =>
array (
'range-min' => 1,
'range-max' => 0,
'range-size' => 100,
),
'text_reparser.forum_description' =>
array (
'range-min' => 1,
'range-max' => 0,
'range-size' => 100,
),
'text_reparser.forum_rules' =>
array (
'range-min' => 1,
'range-max' => 0,
'range-size' => 100,
),
'text_reparser.group_description' =>
array (
'range-min' => 1,
'range-max' => 0,
'range-size' => 100,
),
'text_reparser.pm_text' =>
array (
'range-min' => 1,
'range-max' => 0,
'range-size' => 100,
),
'text_reparser.poll_option' =>
array (
'range-min' => 1,
'range-max' => 0,
'range-size' => 100,
),
'text_reparser.poll_title' =>
array (
'range-min' => 1,
'range-max' => 0,
'range-size' => 100,
),
'text_reparser.post_text' =>
array (
'range-min' => 1,
'range-max' => 817036,
'range-size' => 100,
),
'text_reparser.user_signature' =>
array (
'range-min' => 1,
'range-max' => 78054,
'range-size' => 100,
),
)
range_size
). So I think this means that I can do something like this:
Code: Select all
$resume_data = $this->config_text->get('reparser_resume');
if (empty($resume_data))
{
// Started as 3.2
return true;
}
$state = unserialize($resume_data);
if ($state)
{
foreach ($state as $part => $data)
{
if ($data['range_max'] > 0)
{
// Some unfinished business
return false;
}
}
}
// All done
return true;
Code: Select all
$phpbb_container->get('text_reparser.manager')->schedule('post_text', 60);
phpbb.pages.text_reparser.page_text
That is very true, but it's not what I'm looking for.
'\phpbb\db\migration\data\v320\text_reparser'
Code: Select all
$reparser_state = $config_text->get('reparser_resume');
if (!empty($reparser_state))
{
$reparser_state = unserialize($reparser_state);
$range_max = isset($reparser_state['text_reparser.post_text']['range_max']) ? $reparser_state['text_reparser.post_text']['range_max'] : false;
}
range_max > 0
I show https://github.com/GerB/quotedwhere/blo ... re.php#L29Code: Select all
Write this in your console
/home/yourusername/public_html/
or /var/www/hml/
Code: Select all
cd /var/www/html/
Code: Select all
php bin/phpbbcli.php reparser:reparse --ansi
Code: Select all
php bin/phpbbcli.php reparser:reparse post_text --ansi
Code: Select all
php bin/phpbbcli.php reparser:reparse pm_text --ansi
Code: Select all
php bin/phpbbcli.php --safe-mode reparser:reparse --ansi
Code: Select all
php bin/phpbbcli.php --safe-mode reparser:reparse post_text --ansi
--ansi
after each CLI command. That is just to format the output in a more readable way.Code: Select all
UPDATE phpbb_config SET config_value = '0' WHERE config_name = 'reparse_lock';
phpbb_
to your table prefix)Does either of you have any corrections to above post?
--safe-mode
is supposed to do and I don't use it. There's an option called --dry-run
that does not save the reparsed text. I don't know whether the CLI uses a lock and I hope not. I don't know why a lock exists.