Compare commits
1 Commits
main
...
release/de
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
54677c8372 |
@@ -437,8 +437,8 @@ QUERY
|
||||
$authors[] = $author->name;
|
||||
}
|
||||
$item->author = implode(', ', $authors);
|
||||
} else if(isset($block->text) && $block->type != 'info') {
|
||||
$text .= strip_tags($block->text);
|
||||
} else if(isset($block->text)) {
|
||||
$text .= '<div class="' . $block->type . '">' . $block->text . '</div>';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -446,25 +446,19 @@ QUERY
|
||||
}
|
||||
}
|
||||
$result[] = [
|
||||
'title' => $this->nlpo_convert_utf8($item->title),
|
||||
'title' => $item->title,
|
||||
'url' => 'https://nhgooi.nl/' . $item->url,
|
||||
'text' => $this->nlpo_convert_utf8($text),
|
||||
'text' => $text,
|
||||
'date' => $item->published->format('Y-m-d\TH:i:s.z\Z'),
|
||||
'art_id' => $item->id,
|
||||
'author' => $item->author,
|
||||
'excerpt' => $this->nlpo_convert_utf8(strip_tags($item->content)),
|
||||
'excerpt' => strip_tags($item->content),
|
||||
'categories' => $tags,
|
||||
'tags' => $tags,
|
||||
'comment_count' => 0
|
||||
];
|
||||
}
|
||||
header('Content-Type: application/json; charset=utf-8');
|
||||
return json_encode($result, JSON_UNESCAPED_UNICODE);
|
||||
}
|
||||
|
||||
private function nlpo_convert_utf8($str) {
|
||||
$str = html_entity_decode($str, ENT_QUOTES, 'UTF-8');
|
||||
return $str;
|
||||
return response()->json($result);
|
||||
}
|
||||
|
||||
private function itemFromCategory($category, $id) {
|
||||
|
||||
@@ -15,6 +15,7 @@ class CalendarEvent extends Model {
|
||||
public $keywords;
|
||||
public $url;
|
||||
public $metadata;
|
||||
public $tags;
|
||||
|
||||
public function __construct($data, $images = null, $podcast = null) {
|
||||
parent::__construct($data);
|
||||
|
||||
@@ -19,11 +19,12 @@ class NewsItem extends Model {
|
||||
public $category;
|
||||
public $theme;
|
||||
public $region;
|
||||
public $tags;
|
||||
|
||||
public $podcast;
|
||||
public $images;
|
||||
public $video;
|
||||
|
||||
|
||||
public $url;
|
||||
public $metadata;
|
||||
|
||||
@@ -79,6 +80,11 @@ class NewsItem extends Model {
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($data->tags)) {
|
||||
foreach($data->tags as $tag) {
|
||||
$this->theme = new \Model\NewsRegion($tag->titel, $tag->slug);
|
||||
}
|
||||
}
|
||||
|
||||
$images = ($images != null) ? $images
|
||||
: (isset($data->images) ? $data->images : null);
|
||||
|
||||
Reference in New Issue
Block a user