aboutsummaryrefslogtreecommitdiff
path: root/app/class
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2020-01-30 01:54:50 +0100
committervincent-peugnet <v.peugnet@free.fr>2020-01-30 01:55:00 +0100
commit40ef00fee7286a186673ff3fb26b6802421b2bc4 (patch)
treed148fff0a745e72454cfc8b704048478a2cdc07a /app/class
parentcdd3895f772d60404c73abf9067b0f0a09e4ebf2 (diff)
downloadwcms-40ef00fee7286a186673ff3fb26b6802421b2bc4.tar.gz
wcms-40ef00fee7286a186673ff3fb26b6802421b2bc4.zip
work on thumbnail admin
Diffstat (limited to 'app/class')
-rw-r--r--app/class/Config.php13
-rw-r--r--app/class/Page.php26
2 files changed, 16 insertions, 23 deletions
diff --git a/app/class/Config.php b/app/class/Config.php
index 555129b..6ddb3e4 100644
--- a/app/class/Config.php
+++ b/app/class/Config.php
@@ -23,6 +23,7 @@ abstract class Config
protected static $defaultbody = '%HEADER%'. PHP_EOL .PHP_EOL . '%NAV%'. PHP_EOL .PHP_EOL . '%ASIDE%'. PHP_EOL .PHP_EOL . '%MAIN%'. PHP_EOL .PHP_EOL . '%FOOTER%';
protected static $defaultpage = '';
protected static $defaultfavicon = '';
+ protected static $defaultthumbnail = '';
protected static $analytics = '';
protected static $externallinkblank = true;
protected static $internallinkblank = false;
@@ -204,6 +205,11 @@ abstract class Config
return self::$defaultfavicon;
}
+ public static function defaultthumbnail()
+ {
+ return self::$defaultthumbnail;
+ }
+
public static function analytics()
{
return self::$analytics;
@@ -363,6 +369,13 @@ abstract class Config
}
}
+ public static function setdefaultthumbnail($defaultthumbnail)
+ {
+ if(is_string($defaultthumbnail)) {
+ self::$defaultthumbnail = $defaultthumbnail;
+ }
+ }
+
public static function setdefaultpage($defaultpage)
{
if(is_string($defaultpage)) {
diff --git a/app/class/Page.php b/app/class/Page.php
index 7475b6b..fff98dc 100644
--- a/app/class/Page.php
+++ b/app/class/Page.php
@@ -17,7 +17,6 @@ class Page extends Dbitem
protected $datemodif;
protected $daterender;
protected $css;
- protected $quickcss;
protected $javascript;
protected $body;
protected $header;
@@ -76,7 +75,6 @@ class Page extends Dbitem
$this->setdatemodif($now);
$this->setdaterender($now);
$this->setcss('');
- $this->setquickcss([]);
$this->setjavascript('');
$this->setbody('');
$this->setheader('');
@@ -93,7 +91,7 @@ class Page extends Dbitem
$this->settemplatebody('');
$this->settemplatecss('');
$this->settemplatejavascript('');
- $this->settemplateoptions(['externalcss', 'externaljavascript', 'favicon', 'reccursivecss', 'quickcss']);
+ $this->settemplateoptions(['externalcss', 'externaljavascript', 'favicon', 'thumbnail', 'reccursivecss']);
$this->setfavicon('');
$this->setauthors([]);
$this->setinvites([]);
@@ -228,15 +226,6 @@ class Page extends Dbitem
return $this->css;
}
- public function quickcss($type = 'array')
- {
- if ($type == 'json') {
- return json_encode($this->quickcss);
- } elseif ($type == 'array') {
- return $this->quickcss;
- }
- }
-
public function javascript($type = 'string')
{
return $this->javascript;
@@ -365,9 +354,9 @@ class Page extends Dbitem
$template['javascript'] = $this->templatejavascript;
$template['cssreccursive'] = $this->checkoption('reccursive');
- $template['cssquickcss'] = $this->checkoption('quickcss');
$template['externalcss'] = $this->checkoption('externalcss');
$template['cssfavicon'] = $this->checkoption('favicon');
+ $template['cssthumbnail'] = $this->checkoption('thumbnail');
$template['externaljavascript'] = $this->checkoption('externaljavascript');
@@ -381,7 +370,7 @@ class Page extends Dbitem
function checkoption($option)
{
- if (in_array('reccursive', $this->templateoptions)) {
+ if (in_array($option, $this->templateoptions)) {
return true;
} else {
return false;
@@ -536,15 +525,6 @@ class Page extends Dbitem
}
- public function setquickcss($quickcss)
- {
- if (is_string($quickcss)) {
- $quickcss = json_decode($quickcss, true);
- }
- if (is_array($quickcss)) {
- $this->quickcss = $quickcss;
- }
- }
public function setjavascript($javascript)
{