summary refs log tree commit diff stats
path: root/pages/welcome.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/welcome.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/welcome.php')
-rwxr-xr-xpages/welcome.php22
1 files changed, 20 insertions, 2 deletions
diff --git a/pages/welcome.php b/pages/welcome.php index e224c8e..26f9938 100755 --- a/pages/welcome.php +++ b/pages/welcome.php
@@ -22,13 +22,24 @@ if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);}
22 22
23require('headerproc.php'); 23require('headerproc.php');
24 24
25$pageCategory = 'home'; 25$pageCategory = 'blog';
26
27$hatNav = array( array( 'title' => 'Archive',
28 'url' => 'http://fourisland.com/blog/',
29 'icon' => '16-file-archive'));
30
26 31
27$template = new FITemplate('post'); 32$template = new FITemplate('post');
28$template->adds_block('EXTERNAL',array('exi'=>1)); 33$template->adds_block('EXTERNAL',array('exi'=>1));
29 34
30$curID = 0; 35$curID = 0;
31 36
37$gettrack = "SELECT * FROM tracking WHERE ip = \"" . $_SERVER['REMOTE_ADDR'] . "\"";
38$gettrack2 = mysql_query($gettrack);
39$gettrack3 = mysql_fetch_array($gettrack2);
40
41$trackArr = explode(',',$gettrack3['rating']);
42
32$getpost = "SELECT * FROM updates ORDER BY id DESC LIMIT 0,4"; 43$getpost = "SELECT * FROM updates ORDER BY id DESC LIMIT 0,4";
33$getpost2 = mysql_query($getpost); 44$getpost2 = mysql_query($getpost);
34while ($getpost3 = mysql_fetch_array($getpost2)) 45while ($getpost3 = mysql_fetch_array($getpost2))
@@ -59,7 +70,7 @@ while ($getpost3 = mysql_fetch_array($getpost2))
59 70
60 $template->add_ref($curID, 'POST', array( 'ID' => $getpost3['id'], 71 $template->add_ref($curID, 'POST', array( 'ID' => $getpost3['id'],
61 'YEARID' => ((date('Y',strtotime($getpost3['pubDate']))-2006) % 4), 72 'YEARID' => ((date('Y',strtotime($getpost3['pubDate']))-2006) % 4),
62 'DATE' => date('F dS Y \a\\t g:i:s a',strtotime($getpost3['pubDate'])), 73 'DATE' => date('F jS Y \a\\t g:i:s a',strtotime($getpost3['pubDate'])),
63 'MONTH' => date('M',strtotime($getpost3['pubDate'])), 74 'MONTH' => date('M',strtotime($getpost3['pubDate'])),
64 'DAY' => date('d',strtotime($getpost3['pubDate'])), 75 'DAY' => date('d',strtotime($getpost3['pubDate'])),
65 'CODED' => $getpost3['slug'], 76 'CODED' => $getpost3['slug'],
@@ -76,6 +87,13 @@ while ($getpost3 = mysql_fetch_array($getpost2))
76 $template->adds_ref_sub($curID, 'TAGS', array('TAG' => $tag)); 87 $template->adds_ref_sub($curID, 'TAGS', array('TAG' => $tag));
77 } 88 }
78 89
90 if (($gettrack3['ip'] != $_SERVER['REMOTE_ADDR']) || (array_search($getpost3['id'],$trackArr) === FALSE))
91 {
92 $template->adds_ref_sub($curID, 'CANVOTE', array('exi'=>1));
93 } else {
94 $template->adds_ref_sub($curID, 'NOVOTE', array('exi'=>1));
95 }
96
79 $curID++; 97 $curID++;
80} 98}
81 99