commit 871f09f6a6477a26098d10c897ef4c8e343cb523
parent 46e01475e851a6a4469c4d29f38d76775eff9fa2
Author: markseu <mark2011@mayberg.se>
Date: Wed, 8 May 2019 11:30:53 +0200
Updated core, removed keywords meta data
Diffstat:
3 files changed, 4 insertions(+), 19 deletions(-)
diff --git a/system/extensions/core.php b/system/extensions/core.php
@@ -27,8 +27,8 @@ class YellowCore {
$this->system->setDefault("sitename", "Yellow");
$this->system->setDefault("author", "Yellow");
$this->system->setDefault("email", "webmaster");
- $this->system->setDefault("language", "en");
$this->system->setDefault("timezone", "UTC");
+ $this->system->setDefault("language", "en");
$this->system->setDefault("layout", "default");
$this->system->setDefault("theme", "default");
$this->system->setDefault("parser", "markdown");
@@ -512,9 +512,6 @@ class YellowPage {
if (!$this->isExisting("description")) {
$this->set("description", $this->yellow->toolbox->createTextDescription($this->parserData, 150));
}
- if (!$this->isExisting("keywords")) {
- $this->set("keywords", $this->yellow->toolbox->createTextKeywords($this->get("title"), 10));
- }
if (defined("DEBUG") && DEBUG>=3) echo "YellowPage::parseContent location:".$this->location."<br/>\n";
}
}
@@ -984,9 +981,8 @@ class YellowPageCollection extends ArrayObject {
// Sort page collection by settings similarity
public function similar($page, $ascendingOrder = false) {
$location = $page->location;
- $keywords = $this->yellow->toolbox->createTextKeywords($page->get("title"));
- $keywords .= ",".$page->get("tag").",".$page->get("author");
- $tokens = array_unique(array_filter(preg_split("/\s*,\s*/", $keywords), "strlen"));
+ $keywords = strtoloweru($page->get("title").",".$page->get("tag").",".$page->get("author"));
+ $tokens = array_unique(array_filter(preg_split("/[,\s\(\)\+\-]/", $keywords), "strlen"));
if (!empty($tokens)) {
$array = array();
foreach ($this->getArrayCopy() as $page) {
@@ -2705,16 +2701,6 @@ class YellowToolbox {
return $output;
}
- // Create keywords from text string
- public function createTextKeywords($text, $keywordsMax = 0) {
- $tokens = array_unique(preg_split("/[,\s\(\)\+\-]/", strtoloweru($text)));
- foreach ($tokens as $key=>$value) {
- if (strlenu($value)<3) unset($tokens[$key]);
- }
- if ($keywordsMax) $tokens = array_slice($tokens, 0, $keywordsMax);
- return implode(", ", $tokens);
- }
-
// Create title from text string
public function createTextTitle($text) {
if (preg_match("/^.*\/([\w\-]+)/", $text, $matches)) $text = strreplaceu("-", " ", ucfirst($matches[1]));
diff --git a/system/layouts/header.html b/system/layouts/header.html
@@ -4,7 +4,6 @@
<title><?php echo $this->yellow->page->getHtml("titleHeader") ?></title>
<meta charset="utf-8" />
<meta name="description" content="<?php echo $this->yellow->page->getHtml("description") ?>" />
-<meta name="keywords" content="<?php echo $this->yellow->page->getHtml("keywords") ?>" />
<meta name="author" content="<?php echo $this->yellow->page->getHtml("author") ?>" />
<meta name="generator" content="Datenstrom Yellow" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
diff --git a/system/settings/system.ini b/system/settings/system.ini
@@ -3,8 +3,8 @@
Sitename: Datenstrom Yellow
Author: Datenstrom
Email: webmaster
-Language: en
Timezone: UTC
+Language: en
Layout: default
Theme: stockholm
Parser: markdown