From 68fc9e55e538e03f94509731ab41a0c8cf96710f Mon Sep 17 00:00:00 2001 From: George Halkiadakis Date: Mon, 17 Apr 2023 12:12:22 +0300 Subject: setup a real server environment (apache DocumentRoot=/var/www/public) --- html/app/views/simple/post.php | 236 ----------------------------------------- 1 file changed, 236 deletions(-) delete mode 100644 html/app/views/simple/post.php (limited to 'html/app/views/simple/post.php') diff --git a/html/app/views/simple/post.php b/html/app/views/simple/post.php deleted file mode 100644 index 9e37cd9..0000000 --- a/html/app/views/simple/post.php +++ /dev/null @@ -1,236 +0,0 @@ -get_post($post_id); -$categories = $wiki->category_tree(); -$breadcrumbs = Render::all_breadcrumbs($categories); - -if ($post == false) { // when post not found - $post = [ // create a virtual record with error messages - 'id' => 0, - 'title' => 'Το άρθρο που αναζητήσατε δεν υπάρχει', - 'category_id' => 0, - 'intro' => 'Για να βρειτε το άρθρο που ψάχνετε χρησιμοποιήστε την αναζήτηση - του wiki ή πλοηγηθείτε στο δέντρο των κατηγοριών.', - 'body' => "" - ]; - -} else { // post found; prepare article's data to render - - $category_id = $post['category_id']; - - // find parent_ids of current category (to open the menu tree) - $category_path = []; - foreach($breadcrumbs[$category_id]['parents'] as $parent) { - $category_path[] = intval($parent['id']); - } - $category_path[] = intval($category_id); - -} - - -// format special parts of post -$parsedown = new Parsedown(); -$body_html = $parsedown->text($post['body']); // body: markdown to html - -// decode json output (tags + medias) -if ($post['tags_json'] != null) { $tags = json_decode($post['tags_json']); } -if ($post['medias_json'] != null) { $medias = json_decode($post['medias_json']); } - - -// then render the page ... -// ----------------------------------------------------------------------------- -?> - - - - Wiki - - false ]); ?> - - - - -
- -
- - -
- -
- -
- -
- - - -
- - -
- - -

- - - - - - - - -

- - - - - - -

- - - -
- -
- - - -
-

Συνημμένα:

-
    - - reference == 1) : ?> -
  1. - - title?> - -
  2. - - -
-
- - - - -
- Επικέτες: - - name?> - -
- - -
- -
- -
-
- - - - - - - - - - - - - - -- cgit v1.2.3