summary refs log tree commit diff stats
path: root/pages/blog.php
diff options
context:
space:
mode:
authorStarla Insigna <hatkirby@fourisland.com>2009-08-09 09:14:58 -0400
committerStarla Insigna <hatkirby@fourisland.com>2009-08-09 09:14:58 -0400
commit893957c41481a0cd5eb624096337762ffa54ff28 (patch)
tree09d2487f8add5a6281e3482a471abf21faa4f819 /pages/blog.php
parentd27a3784c81f0c582e43655509e806978b7e65e4 (diff)
downloadfourisland-893957c41481a0cd5eb624096337762ffa54ff28.tar.gz
fourisland-893957c41481a0cd5eb624096337762ffa54ff28.tar.bz2
fourisland-893957c41481a0cd5eb624096337762ffa54ff28.zip
Created layout 7
The following changes were also made in this revision:

* All HTML was changed to XHTML and a !DOCTYPE was included to reflect this
* Rewrote quotes tracking system to be much less complicated and actually working
* Changed quotes rendering to look more like Chirpy than Rash
* Fixed comment textarea bug
* Rewrote a ton of CSS so it's not as bloated
* Added a JavaScript confirmation when deleting a comment
* AJAXified voting on the POTW
* AJAXified voting and flagging quotes
* AJAXified commenting
* AJAXified voting on posts
* Added DateFinder back after it was accidentally deleted in Layout 4.5

The following database changes must be performed as soon as possible:

* Fix title of NO <!DOCTYPE> post (the &lt; is missing the semicolon)
* Restore post Frasty Tha Snaman from a backup
* Reset "flag" field of all rows in "rash_quotes" to 0
* Remove the "vote" and "flag" columns of "rash_tracking"
* Rename the "quote_id" column of "rash_tracking" to "vote"

The following external code changes must also be performed as soon as possible:

* Add the following line to the end of the // Four Island block in The Fourm's functions.php:
  require('/svr/www/hatkirby/fourisland/main/includes/specialdates.php');
Diffstat (limited to 'pages/blog.php')
-rwxr-xr-xpages/blog.php23
1 files changed, 18 insertions, 5 deletions
diff --git a/pages/blog.php b/pages/blog.php index a03d3b1..c9781ee 100755 --- a/pages/blog.php +++ b/pages/blog.php
@@ -27,7 +27,7 @@ if ((strpos($_SERVER['REQUEST_URI'],'index.php')) && (isset($_GET['post'])))
27 header('Location: /blog/' . $_GET['post'] . '/'); 27 header('Location: /blog/' . $_GET['post'] . '/');
28} 28}
29 29
30$pageCategory = 'home'; 30$pageCategory = 'blog';
31$pageAID = 'archive'; 31$pageAID = 'archive';
32 32
33if (isset($_GET['post'])) 33if (isset($_GET['post']))
@@ -65,7 +65,7 @@ if (isset($_GET['post']))
65 65
66 $template->add_ref(0, 'POST', array( 'ID' => $getpost3['id'], 66 $template->add_ref(0, 'POST', array( 'ID' => $getpost3['id'],
67 'YEARID' => ((date('Y',strtotime($getpost3['pubDate']))-2006) % 4), 67 'YEARID' => ((date('Y',strtotime($getpost3['pubDate']))-2006) % 4),
68 'DATE' => date('F dS Y \a\\t g:i:s a',strtotime($getpost3['pubDate'])), 68 'DATE' => date('F jS Y \a\\t g:i:s a',strtotime($getpost3['pubDate'])),
69 'MONTH' => date('M',strtotime($getpost3['pubDate'])), 69 'MONTH' => date('M',strtotime($getpost3['pubDate'])),
70 'DAY' => date('d',strtotime($getpost3['pubDate'])), 70 'DAY' => date('d',strtotime($getpost3['pubDate'])),
71 'CODED' => $getpost3['slug'], 71 'CODED' => $getpost3['slug'],
@@ -80,6 +80,19 @@ if (isset($_GET['post']))
80 $template->adds_ref_sub(0, 'TAGS', array('TAG' => $tag)); 80 $template->adds_ref_sub(0, 'TAGS', array('TAG' => $tag));
81 } 81 }
82 82
83 $gettrack = "SELECT * FROM tracking WHERE ip = \"" . $_SERVER['REMOTE_ADDR'] . "\"";
84 $gettrack2 = mysql_query($gettrack);
85 $gettrack3 = mysql_fetch_array($gettrack2);
86
87 $trackArr = explode(',',$gettrack3['rating']);
88
89 if (($gettrack3['ip'] != $_SERVER['REMOTE_ADDR']) || (array_search($getpost3['id'],$trackArr) === FALSE))
90 {
91 $template->adds_ref_sub(0, 'CANVOTE', array('exi'=>1));
92 } else {
93 $template->adds_ref_sub(0, 'NOVOTE', array('exi'=>1));
94 }
95
83 $template->display(); 96 $template->display();
84 97
85 $getpings = "SELECT * FROM pingbacks WHERE post_id = " . $getpost3['id']; 98 $getpings = "SELECT * FROM pingbacks WHERE post_id = " . $getpost3['id'];
@@ -93,8 +106,8 @@ if (isset($_GET['post']))
93 } 106 }
94 107
95 $template->adds_block('PINGBACK', array( 'TITLE' => $getpings3[$i]['title'], 108 $template->adds_block('PINGBACK', array( 'TITLE' => $getpings3[$i]['title'],
96 'URL' => $getpings3[$i]['url'], 109 'URL' => htmlspecialchars($getpings3[$i]['url']),
97 'DATE' => date('F d<\S\U\P>S</\S\U\P> Y', strtotime($getpings3[$i]['pubDate'])))); 110 'DATE' => date('F jS Y', strtotime($getpings3[$i]['pubDate']))));
98 $i++; 111 $i++;
99 } 112 }
100 113
@@ -124,7 +137,7 @@ if (isset($_GET['post']))
124 { 137 {
125 $template->adds_block('BIO', array( 'TEXT' => $getbio3['text'], 138 $template->adds_block('BIO', array( 'TEXT' => $getbio3['text'],
126 'USERNAME' => $getbio3['username'], 139 'USERNAME' => $getbio3['username'],
127 'DATE' => date('F dS Y \a\\t g:i:s a',strtotime($getbio3['lastUpdated'])))); 140 'DATE' => date('F jS Y \a\\t g:i:s a',strtotime($getbio3['lastUpdated']))));
128 } 141 }
129 } elseif (isset($_GET['tag'])) 142 } elseif (isset($_GET['tag']))
130 { 143 {