Updated API, new way of loading translations
This commit is contained in:
parent
a886530521
commit
7c9b1ed3cc
|
@ -2,7 +2,7 @@
|
||||||
// Command extension, https://github.com/annaesvensson/yellow-command
|
// Command extension, https://github.com/annaesvensson/yellow-command
|
||||||
|
|
||||||
class YellowCommand {
|
class YellowCommand {
|
||||||
const VERSION = "0.8.42";
|
const VERSION = "0.8.43";
|
||||||
public $yellow; // access to API
|
public $yellow; // access to API
|
||||||
public $files; // number of files
|
public $files; // number of files
|
||||||
public $links; // number of links
|
public $links; // number of links
|
||||||
|
@ -36,10 +36,7 @@ class YellowCommand {
|
||||||
|
|
||||||
// Handle command help
|
// Handle command help
|
||||||
public function onCommandHelp() {
|
public function onCommandHelp() {
|
||||||
$help = "build [directory location]\n";
|
return array("build [directory location]", "check [directory location]", "clean [directory location]");
|
||||||
$help .= "check [directory location]\n";
|
|
||||||
$help .= "clean [directory location]\n";
|
|
||||||
return $help;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Process command to build static website
|
// Process command to build static website
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// Core extension, https://github.com/annaesvensson/yellow-core
|
// Core extension, https://github.com/annaesvensson/yellow-core
|
||||||
|
|
||||||
class YellowCore {
|
class YellowCore {
|
||||||
const VERSION = "0.8.96";
|
const VERSION = "0.8.97";
|
||||||
const RELEASE = "0.8.21";
|
const RELEASE = "0.8.21";
|
||||||
public $page; // current page
|
public $page; // current page
|
||||||
public $content; // content files
|
public $content; // content files
|
||||||
|
@ -368,7 +368,9 @@ class YellowCore {
|
||||||
$data = array();
|
$data = array();
|
||||||
foreach ($this->extension->data as $key=>$value) {
|
foreach ($this->extension->data as $key=>$value) {
|
||||||
if (method_exists($value["object"], "onCommandHelp")) {
|
if (method_exists($value["object"], "onCommandHelp")) {
|
||||||
foreach (preg_split("/[\r\n]+/", $value["object"]->onCommandHelp()) as $line) {
|
$output = $value["object"]->onCommandHelp();
|
||||||
|
$lines = is_array($output) ? $output : array($output);
|
||||||
|
foreach ($lines as $line) {
|
||||||
list($command, $dummy) = $this->toolbox->getTextList($line, " ", 2);
|
list($command, $dummy) = $this->toolbox->getTextList($line, " ", 2);
|
||||||
if (!empty($command) && !isset($data[$command])) $data[$command] = $line;
|
if (!empty($command) && !isset($data[$command])) $data[$command] = $line;
|
||||||
}
|
}
|
||||||
|
@ -1700,12 +1702,19 @@ class YellowLanguage {
|
||||||
|
|
||||||
// Set default language settings
|
// Set default language settings
|
||||||
public function setDefault($text) {
|
public function setDefault($text) {
|
||||||
$settings = $this->yellow->toolbox->getTextSettings($text, "language");
|
$language = "";
|
||||||
foreach ($settings as $language=>$block) {
|
$lines = is_array($text) ? $text : array($text);
|
||||||
if (!isset($this->settings[$language])) $this->settings[$language] = new YellowArray();
|
foreach ($lines as $line) {
|
||||||
foreach ($block as $key=>$value) {
|
if (preg_match("/^\#/", $line)) continue;
|
||||||
$this->settings[$language][$key] = $value;
|
if (preg_match("/^\s*(.*?)\s*:\s*(.*?)\s*$/", $line, $matches)) {
|
||||||
$this->settingsDefaults[$key] = true;
|
if (lcfirst($matches[1])=="language" && !strempty($matches[2])) {
|
||||||
|
$language = $matches[2];
|
||||||
|
if (!isset($this->settings[$language])) $this->settings[$language] = new YellowArray();
|
||||||
|
}
|
||||||
|
if (!empty($language) && !empty($matches[1]) && !strempty($matches[2])) {
|
||||||
|
$this->settings[$language][$matches[1]] = $matches[2];
|
||||||
|
$this->settingsDefaults[$matches[1]] = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2796,7 +2805,6 @@ class YellowToolbox {
|
||||||
if (preg_match("/^\s*(.*?)\s*:\s*(.*?)\s*$/", $line, $matches)) {
|
if (preg_match("/^\s*(.*?)\s*:\s*(.*?)\s*$/", $line, $matches)) {
|
||||||
if (!empty($matches[1]) && !strempty($matches[2])) {
|
if (!empty($matches[1]) && !strempty($matches[2])) {
|
||||||
$settings[$matches[1]] = $matches[2];
|
$settings[$matches[1]] = $matches[2];
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// Edit extension, https://github.com/annaesvensson/yellow-edit
|
// Edit extension, https://github.com/annaesvensson/yellow-edit
|
||||||
|
|
||||||
class YellowEdit {
|
class YellowEdit {
|
||||||
const VERSION = "0.8.65";
|
const VERSION = "0.8.66";
|
||||||
public $yellow; // access to API
|
public $yellow; // access to API
|
||||||
public $response; // web response
|
public $response; // web response
|
||||||
public $merge; // text merge
|
public $merge; // text merge
|
||||||
|
@ -81,7 +81,7 @@ class YellowEdit {
|
||||||
|
|
||||||
// Handle command help
|
// Handle command help
|
||||||
public function onCommandHelp() {
|
public function onCommandHelp() {
|
||||||
return "user [option email password]\n";
|
return "user [option email password]";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle page content of shortcut
|
// Handle page content of shortcut
|
||||||
|
|
Binary file not shown.
|
@ -2,7 +2,7 @@
|
||||||
// Serve extension, https://github.com/annaesvensson/yellow-serve
|
// Serve extension, https://github.com/annaesvensson/yellow-serve
|
||||||
|
|
||||||
class YellowServe {
|
class YellowServe {
|
||||||
const VERSION = "0.8.20";
|
const VERSION = "0.8.21";
|
||||||
public $yellow; // access to API
|
public $yellow; // access to API
|
||||||
|
|
||||||
// Handle initialisation
|
// Handle initialisation
|
||||||
|
@ -21,7 +21,7 @@ class YellowServe {
|
||||||
|
|
||||||
// Handle command help
|
// Handle command help
|
||||||
public function onCommandHelp() {
|
public function onCommandHelp() {
|
||||||
return "serve [url]\n";
|
return "serve [url]";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Process command to start built-in web server
|
// Process command to start built-in web server
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
# Datenstrom Yellow update settings
|
# Datenstrom Yellow update settings
|
||||||
|
|
||||||
Extension: Command
|
Extension: Command
|
||||||
Version: 0.8.42
|
Version: 0.8.43
|
||||||
Description: Command line of the website.
|
Description: Command line of the website.
|
||||||
DocumentationUrl: https://github.com/annaesvensson/yellow-command
|
DocumentationUrl: https://github.com/annaesvensson/yellow-command
|
||||||
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/command.zip
|
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/command.zip
|
||||||
Published: 2022-09-22 10:13:59
|
Published: 2022-10-30 00:30:52
|
||||||
Developer: Anna Svensson
|
Developer: Anna Svensson
|
||||||
Tag: feature
|
Tag: feature
|
||||||
system/extensions/command.php: command.php, create, update
|
system/extensions/command.php: command.php, create, update
|
||||||
|
|
||||||
Extension: Core
|
Extension: Core
|
||||||
Version: 0.8.96
|
Version: 0.8.97
|
||||||
Description: Core functionality of the website.
|
Description: Core functionality of the website.
|
||||||
DocumentationUrl: https://github.com/annaesvensson/yellow-core
|
DocumentationUrl: https://github.com/annaesvensson/yellow-core
|
||||||
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/core.zip
|
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/core.zip
|
||||||
Published: 2022-10-25 11:12:07
|
Published: 2022-10-30 00:27:11
|
||||||
Developer: Mark Seuffert, David Fehrmann
|
Developer: Mark Seuffert, David Fehrmann
|
||||||
Tag: feature
|
Tag: feature
|
||||||
system/extensions/core.php: core.php, create, update
|
system/extensions/core.php: core.php, create, update
|
||||||
|
@ -27,11 +27,11 @@ system/layouts/navigation.html: navigation.html, create, update, careful
|
||||||
system/layouts/pagination.html: pagination.html, create, update, careful
|
system/layouts/pagination.html: pagination.html, create, update, careful
|
||||||
|
|
||||||
Extension: Edit
|
Extension: Edit
|
||||||
Version: 0.8.65
|
Version: 0.8.66
|
||||||
Description: Edit your website in a web browser.
|
Description: Edit your website in a web browser.
|
||||||
DocumentationUrl: https://github.com/annaesvensson/yellow-edit
|
DocumentationUrl: https://github.com/annaesvensson/yellow-edit
|
||||||
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/edit.zip
|
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/edit.zip
|
||||||
Published: 2022-10-20 20:50:00
|
Published: 2022-10-30 01:47:46
|
||||||
Developer: Anna Svensson
|
Developer: Anna Svensson
|
||||||
Tag: feature
|
Tag: feature
|
||||||
system/extensions/edit.php: edit.php, create, update
|
system/extensions/edit.php: edit.php, create, update
|
||||||
|
@ -96,11 +96,11 @@ Tag: feature
|
||||||
system/extensions/meta.php: meta.php, create, update
|
system/extensions/meta.php: meta.php, create, update
|
||||||
|
|
||||||
Extension: Serve
|
Extension: Serve
|
||||||
Version: 0.8.20
|
Version: 0.8.21
|
||||||
Description: Built-in web server.
|
Description: Built-in web server.
|
||||||
DocumentationUrl: https://github.com/annaesvensson/yellow-serve
|
DocumentationUrl: https://github.com/annaesvensson/yellow-serve
|
||||||
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/serve.zip
|
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/serve.zip
|
||||||
Published: 2022-04-17 11:12:47
|
Published: 2022-10-30 00:34:51
|
||||||
Developer: Anna Svensson
|
Developer: Anna Svensson
|
||||||
Tag: feature
|
Tag: feature
|
||||||
system/extensions/serve.php: serve.php, create, update
|
system/extensions/serve.php: serve.php, create, update
|
||||||
|
@ -121,11 +121,11 @@ system/themes/stockholm-opensans-light.woff: stockholm-opensans-light.woff, crea
|
||||||
system/themes/stockholm-opensans-regular.woff: stockholm-opensans-regular.woff, create, update, careful
|
system/themes/stockholm-opensans-regular.woff: stockholm-opensans-regular.woff, create, update, careful
|
||||||
|
|
||||||
Extension: Update
|
Extension: Update
|
||||||
Version: 0.8.85
|
Version: 0.8.87
|
||||||
Description: Keep your website up to date.
|
Description: Keep your website up to date.
|
||||||
DocumentationUrl: https://github.com/annaesvensson/yellow-update
|
DocumentationUrl: https://github.com/annaesvensson/yellow-update
|
||||||
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/update.zip
|
DownloadUrl: https://github.com/datenstrom/yellow-extensions/raw/main/downloads/update.zip
|
||||||
Published: 2022-10-23 21:06:48
|
Published: 2022-10-30 00:32:55
|
||||||
Developer: Anna Svensson
|
Developer: Anna Svensson
|
||||||
Tag: feature
|
Tag: feature
|
||||||
system/extensions/update.php: update.php, create, update
|
system/extensions/update.php: update.php, create, update
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// Update extension, https://github.com/annaesvensson/yellow-update
|
// Update extension, https://github.com/annaesvensson/yellow-update
|
||||||
|
|
||||||
class YellowUpdate {
|
class YellowUpdate {
|
||||||
const VERSION = "0.8.85";
|
const VERSION = "0.8.87";
|
||||||
const PRIORITY = "2";
|
const PRIORITY = "2";
|
||||||
public $yellow; // access to API
|
public $yellow; // access to API
|
||||||
public $extensions; // number of extensions
|
public $extensions; // number of extensions
|
||||||
|
@ -65,11 +65,7 @@ class YellowUpdate {
|
||||||
|
|
||||||
// Handle command help
|
// Handle command help
|
||||||
public function onCommandHelp() {
|
public function onCommandHelp() {
|
||||||
$help = "about [extension]\n";
|
return array("about [extension]", "install [extension]", "uninstall [extension]", "update [extension]");
|
||||||
$help .= "install [extension]\n";
|
|
||||||
$help .= "uninstall [extension]\n";
|
|
||||||
$help .= "update [extension]\n";
|
|
||||||
return $help;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse page content shortcut
|
// Parse page content shortcut
|
||||||
|
|
Loading…
Reference in a new issue