From 61bf2067019e36c50d351a7de79b61548fb6d9e9 Mon Sep 17 00:00:00 2001
From: Tom Hughes
Date: Mon, 18 Mar 2013 18:42:32 +0000
Subject: [PATCH] RefreshWP 1.5
---
404.php | 11 ++
BX_functions.php | 158 +++++++++++++++++++
archive.php | 75 +++++++++
archives.php | 25 +++
comments.php | 104 +++++++++++++
footer.php | 17 ++
header.php | 67 ++++++++
images/clock.gif | Bin 0 -> 272 bytes
images/comment.gif | Bin 0 -> 364 bytes
images/content.jpg | Bin 0 -> 412 bytes
images/firefox-gray.jpg | Bin 0 -> 2436 bytes
images/footer.jpg | Bin 0 -> 2271 bytes
images/go.gif | Bin 0 -> 233 bytes
images/header.jpg | Bin 0 -> 10592 bytes
images/headerbg.gif | Bin 0 -> 176 bytes
images/menu.jpg | Bin 0 -> 507 bytes
images/page.gif | Bin 0 -> 393 bytes
images/quote.gif | Bin 0 -> 346 bytes
images/square-green.png | Bin 0 -> 193 bytes
index.php | 36 +++++
links.php | 20 +++
page.php | 22 +++
screenshot.png | Bin 0 -> 29632 bytes
search.php | 36 +++++
searchform.php | 4 +
sidebar.php | 40 +++++
single.php | 55 +++++++
style.css | 337 ++++++++++++++++++++++++++++++++++++++++
28 files changed, 1007 insertions(+)
create mode 100644 404.php
create mode 100644 BX_functions.php
create mode 100644 archive.php
create mode 100644 archives.php
create mode 100644 comments.php
create mode 100644 footer.php
create mode 100644 header.php
create mode 100644 images/clock.gif
create mode 100644 images/comment.gif
create mode 100644 images/content.jpg
create mode 100644 images/firefox-gray.jpg
create mode 100644 images/footer.jpg
create mode 100644 images/go.gif
create mode 100644 images/header.jpg
create mode 100644 images/headerbg.gif
create mode 100644 images/menu.jpg
create mode 100644 images/page.gif
create mode 100644 images/quote.gif
create mode 100644 images/square-green.png
create mode 100644 index.php
create mode 100644 links.php
create mode 100644 page.php
create mode 100644 screenshot.png
create mode 100644 search.php
create mode 100644 searchform.php
create mode 100644 sidebar.php
create mode 100644 single.php
create mode 100644 style.css
diff --git a/404.php b/404.php
new file mode 100644
index 0000000..1c4ec78
--- /dev/null
+++ b/404.php
@@ -0,0 +1,11 @@
+
+
+
+
+
Error 404 - Not Found
+
Sorry, but you are looking for something that isn't here.
+
+
+
+
+
\ No newline at end of file
diff --git a/BX_functions.php b/BX_functions.php
new file mode 100644
index 0000000..5a59190
--- /dev/null
+++ b/BX_functions.php
@@ -0,0 +1,158 @@
+Month Year
+ *
+ * - Post title (Comment count)
+ * [..]
+ *
+ */
+
+function BX_archive()
+{
+ global $month, $wpdb;
+ $now = current_time('mysql');
+ $arcresults = $wpdb->get_results("SELECT DISTINCT YEAR(post_date) AS year, MONTH(post_date) AS month, count(ID) as posts FROM " . $wpdb->posts . " WHERE post_date <'" . $now . "' AND post_status='publish' AND post_password='' GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC");
+
+ if ($arcresults) {
+ foreach ($arcresults as $arcresult) {
+ $url = get_month_link($arcresult->year, $arcresult->month);
+ $text = sprintf('%s %d', $month[zeroise($arcresult->month,2)], $arcresult->year);
+ echo get_archives_link($url, $text, '','','
');
+
+ $thismonth = zeroise($arcresult->month,2);
+ $thisyear = $arcresult->year;
+
+ $arcresults2 = $wpdb->get_results("SELECT ID, post_date, post_title, comment_status FROM " . $wpdb->posts . " WHERE post_date LIKE '$thisyear-$thismonth-%' AND post_status='publish' AND post_password='' ORDER BY post_date DESC");
+
+ if ($arcresults2) {
+ echo "\n";
+ foreach ($arcresults2 as $arcresult2) {
+ if ($arcresult2->post_date != '0000-00-00 00:00:00') {
+ $url = get_permalink($arcresult2->ID);
+ $arc_title = $arcresult2->post_title;
+
+ if ($arc_title) $text = strip_tags($arc_title);
+ else $text = $arcresult2->ID;
+
+ echo "- ".get_archives_link($url, $text, '');
+ $comments = mysql_query("SELECT * FROM " . $wpdb->comments . " WHERE comment_post_ID=" . $arcresult2->ID);
+ $comments_count = mysql_num_rows($comments);
+ if ($arcresult2->comment_status == "open" OR $comments_count > 0) echo ' ('.$comments_count.')';
+ echo "
\n";
+ }
+ }
+ echo "
\n";
+ }
+ }
+ }
+}
+
+
+/**
+ * Function BX_get_recent_posts
+ * ------------------------------------------------------
+ * Outputs an unorderd list of the most recent posts.
+ *
+ * $current_id this post will be excluded
+ * $limit max. number of posts
+ */
+
+function BX_get_recent_posts($current_id, $limit)
+{
+ global $wpdb;
+ $posts = $wpdb->get_results("SELECT ID, post_title FROM " . $wpdb->posts . " WHERE post_status='publish' ORDER BY post_date DESC LIMIT " . $limit);
+ foreach ($posts as $post) {
+ $post_title = stripslashes($post->post_title);
+ $permalink = get_permalink($post->ID);
+ if ($post->ID != $current_id) echo "" . $post_title . "\n";
+ }
+}
+
+
+/**
+ * Function BX_get_pages
+ * ------------------------------------------------------
+ * Returns the following of all WP pages:
+ * ID, title, name, (content)
+ *
+ * $withcontent specifies if the page's content will
+ * also be returned
+ */
+
+function BX_get_pages($with_content = '')
+{
+ global $wpdb;
+ $query = "SELECT ID, post_title, post_name FROM " . $wpdb->posts . " WHERE post_type='page' OR post_status='static' ORDER BY menu_order ASC";
+
+ if ($with_content == "with_content") {
+ $query = "SELECT ID, post_title,post_name, post_content FROM " . $wpdb->posts . " WHERE post_type='page' OR post_status='static' ORDER BY menu_order ASC";
+ }
+ return $wpdb->get_results($query);
+}
+
+
+/**
+ * Function BX_excluded_pages()
+ * ------------------------------------------------------
+ * Returns the Blix default pages that are excluded
+ * from the navigation in the sidebar
+ *
+ */
+
+function BX_excluded_pages()
+{
+ $pages = BX_get_pages();
+ $exclude = "";
+ if ($pages) {
+ foreach ($pages as $page) {
+ $page_id = $page->ID;
+ $page_name = $page->post_name;
+ if ($page_name == "archives" || $page_name == "about" || $page_name == "about_short" || $page_name == "contact") {
+ $exclude .= ", ".$page_id;
+ }
+ }
+ $exclude = preg_replace("/^, (.*?)/","\\1",$exclude);
+ }
+ return $exclude;
+}
+
+
+/**
+ * Function BX_shift_down_headlines
+ * ------------------------------------------------------
+ * Shifts down the headings by one level ( --> )
+ * Used for posts in the archive
+ */
+
+function BX_shift_down_headlines($text)
+{
+ $text = apply_filters('the_content', $text);
+ $text = preg_replace("/h5>/","h6>",$text);
+ $text = preg_replace("/h4>/","h5>",$text);
+ $text = preg_replace("/h3>/","h4>",$text);
+ echo $text;
+}
+
+
+/**
+ * Function BX_remove_p
+ * ------------------------------------------------------
+ * Removes the opening
and closing
from $text
+ * Used for the short about text on the front page
+ */
+
+function BX_remove_p($text)
+{
+ $text = apply_filters('the_content', $text);
+ $text = preg_replace("/^[\t|\n]?(.*)/","\\1",$text); // opening
+ $text = preg_replace("/(.*)<\/p>[\t|\n]$/","\\1",$text); // closing
+ return $text;
+}
+
+?>
\ No newline at end of file
diff --git a/archive.php b/archive.php
new file mode 100644
index 0000000..8023dd0
--- /dev/null
+++ b/archive.php
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+
+
+
Archive for the '' Category
+
+
+
Archive for
+
+
+
Archive for
+
+
+
Archive for
+
+
+
Search Results
+
+
+
Author Archive
+
+
+
Blog Archives
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
[ Back to top ]
+
+
+
+
+
+
+
+
+
+
Not Found
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/archives.php b/archives.php
new file mode 100644
index 0000000..cafce3a
--- /dev/null
+++ b/archives.php
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
Archives by Month:
+
+
+
Archives by Subject:
+
+
+
+
+
+
+
diff --git a/comments.php b/comments.php
new file mode 100644
index 0000000..5518388
--- /dev/null
+++ b/comments.php
@@ -0,0 +1,104 @@
+post_password)) { // if there's a password
+ if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) { // and it doesn't match the cookie
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ comment_status) : ?>
+
+
+
+
+
+
+
+
+
+
+comment_status) : ?>
+
+Leave a Reply
+
+
+You must be logged in to post a comment.
+
+
+
+ID); ?>
+
+
+
+
+
+
diff --git a/footer.php b/footer.php
new file mode 100644
index 0000000..674879d
--- /dev/null
+++ b/footer.php
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+ + at + + + +