$dao = new wsDAOTheme($core->con);
print_r($dao->selectById('3641'));
}
+
+ public static function getAdditionalSettingsMap(): array
+ {
+ return ['book_id' => 'book_id', 'lang' => 'lang', 'theme' => 'theme', 'status' => 'status', 'proprietaire_id' => 'owner', 'date' => 'date', 'changedate' => 'changedate', 'wslink' => 'wslink', 'hosting' => 'hosting', 'exportdatas' => 'exportdata'];
+ }
+
+ public static function getReadonlySettings()
+ {
+ return ['book_id', 'date', 'changedate', 'wslink', 'hosting', 'exportdatas'];
+ }
+
+
+ public static function exportPublicationSettings($books = null, $title = 'Settings')
+ {
+
+ set_time_limit(0);
+ if (null === $books || !count($books)) {
+ wsDroits::admin(true);
+ global $core;
+ $dao = new wsDAOBook($core->con);
+ $books = $dao->getListe('book_id', 'DESC');
+ }
+
+ $p = new wsBookParametres(new wsBook());
+
+ $xls = new PHPExcel();
+ $sheet = $xls->getActiveSheet();
+ $sheet->freezePane('B2');
+ $standardSettings = self::getAdditionalSettingsMap();
+ $readonlyList = self::getReadonlySettings();
+ $j = 0;
+ foreach ($standardSettings as $column => $label) {
+ if ($label !== 'exportdata') {
+ $sheet->getColumnDimensionByColumn($j)->setAutoSize(true);
+ }
+
+ if (in_array($column, $readonlyList, true)) {
+ self::_readonlyStyle($sheet->getStyle(PHPExcel_Cell::stringFromColumnIndex($j)));
+ }
+ $sheet->setCellValueByColumnAndRow($j, 1, $label);
+ $j++;
+ }
+ $paramCols = [];
+ foreach ($p->getForms() as $form) {
+ $form = $p->getForm($form, true);
+ foreach ($form['fields'] as $k => $field) {
+ $readonly = false;
+ if (!$field['editable']) {
+ $readonly = true;
+ }
+
+ if ($readonly) {
+ self::_readonlyStyle($sheet->getStyle(PHPExcel_Cell::stringFromColumnIndex($j)));
+ }
+ $sheet->getCommentByColumnAndRow($j, 1)->getText()->createTextRun($field['label']);
+ $sheet->getColumnDimensionByColumn($j)->setAutoSize(true);
+ $sheet->setCellValueByColumnAndRow($j, 1, $k);
+
+ $paramCols[] = $k;
+ $j++;
+ }
+ }
+
+ $i = 2;
+ foreach ($books as $id => $book) {
+ $j = 0;
+ foreach ($standardSettings as $column => $label) {
+ $url = false;
+ if ($column === 'hosting') {
+ $export = json_decode($book->exportdatas, true);
+ if (isset($export['install_hosting']['online']['dir']) && $export['install_hosting']['online']['dir']) {
+ $val = 'https://hosting.fluidbook.com/' . $export['install_hosting']['online']['dir'];
+ $url = $val;
+ } else {
+ $val = '-';
+ }
+ } else if ($column === 'wslink') {
+ $val = 'https://workshop.fluidbook.com/viewerh/' . $id . '_' . $book->hash . '/';
+ } else {
+ $val = $book->$column;
+ }
+ if (strpos($column, 'date') !== false) {
+ $val = date('Y-m-d', $val);
+ }
+ $sheet->setCellValueByColumnAndRow($j, $i, $val);
+ if ($url) {
+ $sheet->getCellByColumnAndRow($j, $i)->getHyperlink()->setUrl($url);
+ }
+
+ $j++;
+ }
+ foreach ($paramCols as $col) {
+ $sheet->setCellValueByColumnAndRow($j, $i, $book->parametres->$col);
+ $j++;
+ }
+ $i++;
+ }
+ ob_end_clean();
+ header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
+ header('Content-Disposition: attachment; filename="' . CubeIT_Text::str2URL($title) . '.xlsx"');
+ $writer = new PHPExcel_Writer_Excel2007($xls);
+ $writer->save('php://output');
+ exit;
+ }
+
+
+ /**
+ * @param $style PHPExcel_Style
+ */
+ protected static function _readonlyStyle($style)
+ {
+ $style->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID)->getStartColor()->setRGB('DDDDDD');
+ $style->getFont()->getColor()->setRGB('666666');
+ }
+
+
}
header('Location: https://www.orpi.com/');
}
- public static function getAdditionalSettingsMap(): array
- {
- return ['book_id' => 'book_id', 'lang' => 'lang', 'theme' => 'theme', 'status' => 'status', 'proprietaire_id' => 'owner', 'date' => 'date', 'changedate' => 'changedate', 'wslink' => 'wslink', 'hosting' => 'hosting', 'exportdatas' => 'exportdata'];
- }
-
- public static function getReadonlySettings()
- {
- return ['book_id', 'date', 'changedate', 'wslink', 'hosting', 'exportdatas'];
- }
-
public static function exportPublicationSettings($args)
{
global $core;
$books = wsUrl::listeBooks($r->dashboard_id, commonUrl::getDashboardSettings($r->settings), true);
}
- $p = new wsBookParametres(new wsBook());
-
- $xls = new PHPExcel();
- $sheet = $xls->getActiveSheet();
- $sheet->freezePane('B2');
- $standardSettings = self::getAdditionalSettingsMap();
- $readonlyList = self::getReadonlySettings();
- $j = 0;
- foreach ($standardSettings as $column => $label) {
- if ($label !== 'exportdata') {
- $sheet->getColumnDimensionByColumn($j)->setAutoSize(true);
- }
-
- if (in_array($column, $readonlyList, true)) {
- self::_readonlyStyle($sheet->getStyle(PHPExcel_Cell::stringFromColumnIndex($j)));
- }
- $sheet->setCellValueByColumnAndRow($j, 1, $label);
- $j++;
- }
- $paramCols = [];
- foreach ($p->getForms() as $form) {
- $form = $p->getForm($form, true);
- foreach ($form['fields'] as $k => $field) {
- $readonly = false;
- if (!$field['editable']) {
- $readonly = true;
- }
-
- if ($readonly) {
- self::_readonlyStyle($sheet->getStyle(PHPExcel_Cell::stringFromColumnIndex($j)));
- }
- $sheet->getCommentByColumnAndRow($j, 1)->getText()->createTextRun($field['label']);
- $sheet->getColumnDimensionByColumn($j)->setAutoSize(true);
- $sheet->setCellValueByColumnAndRow($j, 1, $k);
-
- $paramCols[] = $k;
- $j++;
- }
- }
-
- $i = 2;
- foreach ($books as $id => $book) {
- $j = 0;
- foreach ($standardSettings as $column => $label) {
- $url = false;
- if ($column === 'hosting') {
- $export = json_decode($book->exportdatas, true);
- if (isset($export['install_hosting']['online']['dir']) && $export['install_hosting']['online']['dir']) {
- $val = 'https://hosting.fluidbook.com/' . $export['install_hosting']['online']['dir'];
- $url = $val;
- } else {
- $val = '-';
- }
- } else if ($column === 'wslink') {
- $val = 'https://workshop.fluidbook.com/viewerh/' . $id . '_' . $book->hash . '/';
- } else {
- $val = $book->$column;
- }
- if (strpos($column, 'date') !== false) {
- $val = date('Y-m-d', $val);
- }
- $sheet->setCellValueByColumnAndRow($j, $i, $val);
- if ($url) {
- $sheet->getCellByColumnAndRow($j, $i)->getHyperlink()->setUrl($url);
- }
-
- $j++;
- }
- foreach ($paramCols as $col) {
- $sheet->setCellValueByColumnAndRow($j, $i, $book->parametres->$col);
- $j++;
- }
- $i++;
- }
- ob_end_clean();
- header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
- header('Content-Disposition: attachment; filename="' . CubeIT_Text::str2URL($title) . '.xlsx"');
- $writer = new PHPExcel_Writer_Excel2007($xls);
- $writer->save('php://output');
- exit;
+ wsMaintenance::exportPublicationSettings($books,$title);
}
- /**
- * @param $style PHPExcel_Style
- */
- protected static function _readonlyStyle($style)
- {
- $style->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID)->getStartColor()->setRGB('DDDDDD');
- $style->getFont()->getColor()->setRGB('666666');
- }
-}
+}
\ No newline at end of file
'fieldsnames' => ['audiodescriptionTexts', 'audiodescriptionVoice']
];
+ // Tooltip
+
+
+ // Splashscreen
+
$this->fields['splashImage'] = ['type' => 'freefile', 'default' => '', 'editable' => true, 'label' => __('Image'), 'grade' => 3, 'fileFilter' => $imageFilter];
$this->fields['splashURL'] = ['type' => 'text', 'default' => '', 'editable' => true, 'label' => __('URL'), 'grade' => 3];
$this->fields['splashTarget'] = ['type' => 'combo', 'datas' => $target, 'default' => '_self', 'editable' => true, 'label' => __('Ouvrir le lien'), 'grade' => 3];
'label' => __("Couleur du texte des infobulles"));\r
$this->fields['tooltipTextSize'] = array('type' => 'integer', 'default' => 100, 'editable' => true,\r
'label' => __('Taille du texte des infobulles'));\r
+ $this->fields['tooltipPaddingSize'] = array('type' => 'integer', 'default' => 20, 'editable' => true,\r
+ 'label' => __('Marge intérieure des infobulles'));\r
$this->fields['bookmarkBackgroundColor'] = array('type' => 'couleurAlpha', 'default' => 'ffadadad', 'editable' => true,\r
'label' => __("Couleur de fond des marques-pages"));\r
$this->fields['bookmarkStarDisabledColor'] = array('type' => 'couleurAlpha', 'default' => '00ffffff', 'editable' => true,\r
'|', 'bookShadeColor', '|', 'usePageEdges',\r
'|', 'displayPageNumber', 'colorPageNumber',\r
'|', 'linksColor', 'videoBackgroundColor',\r
- '|', 'tooltipBackColor', 'tooltipTextColor', 'tooltipTextSize',\r
+ '|', 'tooltipBackColor', 'tooltipTextColor', 'tooltipTextSize','tooltipPaddingSize',\r
'|', 'bookmarkBackgroundColor', 'bookmarkStarDisabledColor', 'bookmarkStarEnabledColor'));\r
/* Credits */\r
$this->fields['creditsColor'] = array('type' => 'couleurAlpha', 'default' => '80ffffff', 'editable' => true,\r