diff --git a/neopolimatrix/api/elements/elements.php b/neopolimatrix/api/elements/elements.php index cb5ea1b..7a546c0 100644 --- a/neopolimatrix/api/elements/elements.php +++ b/neopolimatrix/api/elements/elements.php @@ -3,4 +3,6 @@ class elements { public static function getAllElementsOfTag($tag){ return \DBD\NEOPOLIMATRIX_GENERATE_ELEMENTLIST::QA(array($tag));} + public static function getText($tag){ + return \DBD\NEOPOLIMATRIX_GET_TEXT::Q1(array($tag));} } \ No newline at end of file diff --git a/neopolimatrix/dbd/qq/NEOPOLIMATRIX_GET_TEXT.php b/neopolimatrix/dbd/qq/NEOPOLIMATRIX_GET_TEXT.php new file mode 100644 index 0000000..801c824 --- /dev/null +++ b/neopolimatrix/dbd/qq/NEOPOLIMATRIX_GET_TEXT.php @@ -0,0 +1,11 @@ +text_id = $text_id; + } + + + public function get_text(){ + $result = ''; + $element = elements::getText($this->text_id); + $element['title'] = $element['id']; + $result .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_element/element.tpl'), $element); + return $result; + } + + public function html(){ + $vars = array(); + $vars['text'] = $this->get_text(); + return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_element/default_element.tpl'), $vars); + } +} +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + diff --git a/neopolimatrix/page/default_element/default_element.tpl b/neopolimatrix/page/default_element/default_element.tpl new file mode 100644 index 0000000..828caf4 --- /dev/null +++ b/neopolimatrix/page/default_element/default_element.tpl @@ -0,0 +1 @@ +${text} diff --git a/neopolimatrix/page/default_element/element.tpl b/neopolimatrix/page/default_element/element.tpl new file mode 100644 index 0000000..78fd0e8 --- /dev/null +++ b/neopolimatrix/page/default_element/element.tpl @@ -0,0 +1,10 @@ +
Author: ${author}
+Veröffentlicht: ${timestamp}
+ + +Author: ${author}
Veröffentlicht: ${timestamp}
diff --git a/neopolimatrix/page/default_page/default_page.tpl b/neopolimatrix/page/default_page/default_page.tpl index b58a330..9731c45 100644 --- a/neopolimatrix/page/default_page/default_page.tpl +++ b/neopolimatrix/page/default_page/default_page.tpl @@ -10,24 +10,26 @@
-