$this->config->rasterizePages = ArrayUtil::parseRange($this->config->rasterizePages);
$this->config->vectorPages = array_diff(ArrayUtil::parseRange($this->config->vectorPages), $this->config->rasterizePages);
$this->numerotation = $this->config->numerotation = explode(',', $this->getFluidbook()->page_numbers);
- $this->config->dynamicBackgroundColor=[];
+ $this->config->dynamicBackgroundColor = [];
$this->initTabsConfig();
$dbc[$page] = $e;
}
}
- if(count($dbc)) {
+ if (count($dbc)) {
$this->config->dynamicBackgroundColor = $dbc + $this->config->dynamicBackgroundColor;
}
foreach ($p as $range => $coins) {
$pages = ArrayUtil::parseRange($range);
foreach ($pages as $page) {
+ if ($this->isDoublePage() && $page % 2 === 1 && $page > 1) {
+ continue;
+ }
$this->config->set('gamifyCoins.visit_page_' . $page, $coins);
}
}
{
$this->addSettingField('section_gamify', FormSection::class, $this->__('Gamification'));
$this->addSettingField('gamify_coins_pages', Textarea::class, $this->__('Attribuer des coins lors de la visite des pages'), [
- 'hint' => __('Format (un par ligne): numéro de page=[variable:]nombre. Par exemple : :example1 ou :example2', ['example1' => '2=5', 'example2' => '5=A:10']),
+ 'hint' => __('Format (un par ligne): numéro ou intervale de pages=[variable:]nombre. Par exemple : :example1 ou :example2 ou :example3', ['example1' => '2=5', 'example2' => '5=A:10','example3'=>'5-8;9=1']),
]);
}