From 0b075f3ea2616cfde4d976199a69ba631174a336 Mon Sep 17 00:00:00 2001 From: Arno Richter Date: Tue, 13 Dec 2022 22:27:21 +0100 Subject: gave up and sorted files into a directory structure. made snippets for header, nav and footer. made it easier to add additional css files as themes. prepare a little for addition of a real template engine. added a css reset file to share between themes, if warranted. --- templates/loginform.inc.php | 39 +++++++++++++++++ templates/postform.inc.php | 54 ++++++++++++++++++++++++ templates/single.inc.php | 100 ++++++++++++++++++++++++++++++++++++++++++++ templates/timeline.inc.php | 57 +++++++++++++++++++++++++ 4 files changed, 250 insertions(+) create mode 100644 templates/loginform.inc.php create mode 100644 templates/postform.inc.php create mode 100644 templates/single.inc.php create mode 100644 templates/timeline.inc.php (limited to 'templates') diff --git a/templates/loginform.inc.php b/templates/loginform.inc.php new file mode 100644 index 0000000..b852de7 --- /dev/null +++ b/templates/loginform.inc.php @@ -0,0 +1,39 @@ + 'error', + 'message' => 'You entered wrong user credentials. Please try again.' + ); + } + } + + $title_suffix = 'login'; + require(ROOT.DS.'snippets'.DS.'header.snippet.php'); + +?> +
+ +

Please enter your login information.

+ +

+ +
+
+
+ +
+
+ + + diff --git a/templates/postform.inc.php b/templates/postform.inc.php new file mode 100644 index 0000000..149028b --- /dev/null +++ b/templates/postform.inc.php @@ -0,0 +1,54 @@ + 0) { + $message = array( + 'status' => 'success', + 'message' => 'Successfully posted status #'.$id + ); + + rebuild_feeds(); + if($config['ping'] == true) ping_microblog(); + if($config['crosspost_to_twitter'] == true) { + $twitter_response = json_decode(twitter_post_status($_POST['content']), true); + + if(!empty($twitter_response['errors'])) { + $message['message'] .= ' (But crossposting to twitter failed!)'; + } + } + + header('Location: '.$config['url']); + die(); + } + } + + $title_suffix = 'new post'; + require(ROOT.DS.'snippets'.DS.'header.snippet.php'); + +?> +
+ + +

+ +
+ +

+ +
+
+ + + diff --git a/templates/single.inc.php b/templates/single.inc.php new file mode 100644 index 0000000..af486d5 --- /dev/null +++ b/templates/single.inc.php @@ -0,0 +1,100 @@ + +
+ + +
+ + + diff --git a/templates/timeline.inc.php b/templates/timeline.inc.php new file mode 100644 index 0000000..234ea83 --- /dev/null +++ b/templates/timeline.inc.php @@ -0,0 +1,57 @@ + +
+ + + +

No posts found.

+ + +
+ + + -- cgit v1.2.3