diff options
author | Starla Insigna <hatkirby@fourisland.com> | 2009-10-03 15:24:04 -0400 |
---|---|---|
committer | Starla Insigna <hatkirby@fourisland.com> | 2009-10-03 15:24:04 -0400 |
commit | b0aabd0559eb6ca70af2ffeb35299b63d7edf097 (patch) | |
tree | f6b31f7478c540ecb056bc22508fb1450e2735c7 | |
parent | dc0fb9445e8a3ede8bc33d6779fadd89b7ea6893 (diff) | |
download | fourisland-b0aabd0559eb6ca70af2ffeb35299b63d7edf097.tar.gz fourisland-b0aabd0559eb6ca70af2ffeb35299b63d7edf097.tar.bz2 fourisland-b0aabd0559eb6ca70af2ffeb35299b63d7edf097.zip |
Fixed voting issue
Because XHTML was accidentally disabled in the previous changeset, a new error was found that, when in HTML mode (required for IE and layouts prior to 7), voting did not work due to the encoded ampherstand in the query string. This is odd because what works in XHTML should also work in HTML. So, to fix this, XHTML was re-enabled and now the ampherstand is only encoded when XHTML mode is on. Also fixed some positioning errors with the tails of bubbles.
-rw-r--r-- | includes/layout.php | 15 | ||||
-rwxr-xr-x | index.php | 34 | ||||
-rwxr-xr-x | pages/blog.php | 3 | ||||
-rwxr-xr-x | pages/quotes.php | 4 | ||||
-rwxr-xr-x | pages/welcome.php | 3 | ||||
-rwxr-xr-x | theme/comments.tpl | 4 | ||||
-rwxr-xr-x | theme/css/bubbles.css | 2 | ||||
-rw-r--r-- | theme/layouts/4.5/style.css | 8 | ||||
-rw-r--r-- | theme/layouts/6.2/style.css | 8 | ||||
-rw-r--r-- | theme/layouts/7/style.css | 7 | ||||
-rwxr-xr-x | theme/post.tpl | 6 | ||||
-rwxr-xr-x | theme/quotes/browse.tpl | 2 |
12 files changed, 64 insertions, 32 deletions
diff --git a/includes/layout.php b/includes/layout.php index 8e92256..ffe1aa6 100644 --- a/includes/layout.php +++ b/includes/layout.php | |||
@@ -22,21 +22,6 @@ if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);} | |||
22 | 22 | ||
23 | require('headerproc.php'); | 23 | require('headerproc.php'); |
24 | 24 | ||
25 | if (isset($_GET['layout'])) | ||
26 | { | ||
27 | if (!file_exists('theme/layouts/' . basename($_GET['layout']))) | ||
28 | { | ||
29 | $_GET['layout'] = '7'; | ||
30 | } | ||
31 | |||
32 | setcookie('layout', $_GET['layout'], time()+60*60*24*30, '/', '.fourisland.com'); | ||
33 | |||
34 | unset($_GET['layout']); | ||
35 | |||
36 | header('Location: ' . getRewriteURL()); | ||
37 | exit; | ||
38 | } | ||
39 | |||
40 | $template = new FITemplate('layouts/' . getLayout() . '/layout'); | 25 | $template = new FITemplate('layouts/' . getLayout() . '/layout'); |
41 | 26 | ||
42 | $template->add('CATEGORY',(isset($pageCategory)) ? $pageCategory : 'none'); | 27 | $template->add('CATEGORY',(isset($pageCategory)) ? $pageCategory : 'none'); |
diff --git a/index.php b/index.php index d110743..7a958ee 100755 --- a/index.php +++ b/index.php | |||
@@ -20,14 +20,6 @@ | |||
20 | 20 | ||
21 | require('headerproc.php'); | 21 | require('headerproc.php'); |
22 | 22 | ||
23 | if (preg_match('|MSIE ([0-9].[0-9]{1,2})|', $_SERVER['HTTP_USER_AGENT'], $matched)) | ||
24 | { | ||
25 | header('Content-type: text/html'); | ||
26 | $usingIE = true; | ||
27 | } else { | ||
28 | // header('Content-type: application/xhtml+xml'); | ||
29 | } | ||
30 | |||
31 | header('X-Pingback: http://fourisland.com/xmlrpc.php'); | 23 | header('X-Pingback: http://fourisland.com/xmlrpc.php'); |
32 | 24 | ||
33 | include('../security/config.php'); | 25 | include('../security/config.php'); |
@@ -42,6 +34,32 @@ include('includes/functions.php'); | |||
42 | include('includes/hits.php'); | 34 | include('includes/hits.php'); |
43 | include('includes/updatePending.php'); | 35 | include('includes/updatePending.php'); |
44 | 36 | ||
37 | if (isset($_GET['layout'])) | ||
38 | { | ||
39 | if (!file_exists('theme/layouts/' . basename($_GET['layout']))) | ||
40 | { | ||
41 | $_GET['layout'] = '7'; | ||
42 | } | ||
43 | |||
44 | setcookie('layout', $_GET['layout'], time()+60*60*24*30, '/', '.fourisland.com'); | ||
45 | |||
46 | unset($_GET['layout']); | ||
47 | |||
48 | header('Location: ' . getRewriteURL()); | ||
49 | exit; | ||
50 | } | ||
51 | |||
52 | if (preg_match('|MSIE ([0-9].[0-9]{1,2})|', $_SERVER['HTTP_USER_AGENT'], $matched)) | ||
53 | { | ||
54 | $usingIE = true; | ||
55 | } else { | ||
56 | if (getLayout() == '7') | ||
57 | { | ||
58 | header('Content-type: application/xhtml+xml'); | ||
59 | $xhtml = true; | ||
60 | } | ||
61 | } | ||
62 | |||
45 | if (strpos($_SERVER['REQUEST_URI'],'index.php')) | 63 | if (strpos($_SERVER['REQUEST_URI'],'index.php')) |
46 | { | 64 | { |
47 | header('Location: ' . getRewriteURL()); | 65 | header('Location: ' . getRewriteURL()); |
diff --git a/pages/blog.php b/pages/blog.php index 6703c12..28fa759 100755 --- a/pages/blog.php +++ b/pages/blog.php | |||
@@ -29,6 +29,9 @@ if (isset($_GET['post'])) | |||
29 | { | 29 | { |
30 | $template = new FITemplate('post'); | 30 | $template = new FITemplate('post'); |
31 | $template->adds_block('INTERNAL',array('exi'=>1)); | 31 | $template->adds_block('INTERNAL',array('exi'=>1)); |
32 | $template->add('IFXAMP', $xhtml ? '&' : '&'); | ||
33 | $template->add('IFXLT', $xhtml ? '<' : '<'); | ||
34 | $template->add('IFXGT', $xhtml ? '>' : '>'); | ||
32 | 35 | ||
33 | $getpost = "SELECT * FROM updates WHERE slug = \"" . urldecode($_GET['post']) . "\""; | 36 | $getpost = "SELECT * FROM updates WHERE slug = \"" . urldecode($_GET['post']) . "\""; |
34 | $getpost2 = mysql_query($getpost); | 37 | $getpost2 = mysql_query($getpost); |
diff --git a/pages/quotes.php b/pages/quotes.php index f1e0d65..8c6958d 100755 --- a/pages/quotes.php +++ b/pages/quotes.php | |||
@@ -187,7 +187,11 @@ if (isset($_GET['id']) && !(is_numeric($_GET['id']))) | |||
187 | 187 | ||
188 | function quote_generation($query, $origin, $page = 1, $quote_limit = 50, $page_limit = 10) | 188 | function quote_generation($query, $origin, $page = 1, $quote_limit = 50, $page_limit = 10) |
189 | { | 189 | { |
190 | global $xhtml; | ||
191 | |||
190 | $template = new FITemplate('quotes/browse'); | 192 | $template = new FITemplate('quotes/browse'); |
193 | $template->add('IFXAMP', $xhtml ? '&' : '&'); | ||
194 | |||
191 | if ($page != -1) | 195 | if ($page != -1) |
192 | { | 196 | { |
193 | $template->adds_block('PAGENUMBERS',array('exi'=>1)); | 197 | $template->adds_block('PAGENUMBERS',array('exi'=>1)); |
diff --git a/pages/welcome.php b/pages/welcome.php index 5bd710c..833af8a 100755 --- a/pages/welcome.php +++ b/pages/welcome.php | |||
@@ -31,6 +31,9 @@ $hatNav = array( array( 'title' => 'Archive', | |||
31 | 31 | ||
32 | $template = new FITemplate('post'); | 32 | $template = new FITemplate('post'); |
33 | $template->adds_block('EXTERNAL',array('exi'=>1)); | 33 | $template->adds_block('EXTERNAL',array('exi'=>1)); |
34 | $template->add('IFXAMP', $xhtml ? '&' : '&'); | ||
35 | $template->add('IFXLT', $xhtml ? '<' : '<'); | ||
36 | $template->add('IFXGT', $xhtml ? '>' : '>'); | ||
34 | 37 | ||
35 | $curID = 0; | 38 | $curID = 0; |
36 | 39 | ||
diff --git a/theme/comments.tpl b/theme/comments.tpl index 5e1c564..9c86009 100755 --- a/theme/comments.tpl +++ b/theme/comments.tpl | |||
@@ -1,8 +1,6 @@ | |||
1 | <a name="comments" /> | 1 | <a name="comments"></a> |
2 | 2 | ||
3 | <!--BEGIN COMMENTS--> | 3 | <!--BEGIN COMMENTS--> |
4 | <a name="comment-<!--COMMENTS.ID-->" /> | ||
5 | |||
6 | <!--BEGIN COMMENTS.EDITOR--> | 4 | <!--BEGIN COMMENTS.EDITOR--> |
7 | <form action="/edit-comment.php?id=<!--COMMENTS.ID-->" method="post"> | 5 | <form action="/edit-comment.php?id=<!--COMMENTS.ID-->" method="post"> |
8 | <!--END COMMENTS.EDITOR--> | 6 | <!--END COMMENTS.EDITOR--> |
diff --git a/theme/css/bubbles.css b/theme/css/bubbles.css index 68a3cc4..29c9930 100755 --- a/theme/css/bubbles.css +++ b/theme/css/bubbles.css | |||
@@ -8,7 +8,6 @@ | |||
8 | 8 | ||
9 | div.module + cite { | 9 | div.module + cite { |
10 | position: relative; | 10 | position: relative; |
11 | top: -0.15em; | ||
12 | left: 0.2em; | 11 | left: 0.2em; |
13 | margin: 0; | 12 | margin: 0; |
14 | padding: 15px 0px 0px 15px; | 13 | padding: 15px 0px 0px 15px; |
@@ -18,7 +17,6 @@ div.module + cite { | |||
18 | } | 17 | } |
19 | 18 | ||
20 | div.module.unrounded + cite { | 19 | div.module.unrounded + cite { |
21 | top: -0.5em; | ||
22 | padding-top: 10px; | 20 | padding-top: 10px; |
23 | } | 21 | } |
24 | 22 | ||
diff --git a/theme/layouts/4.5/style.css b/theme/layouts/4.5/style.css index b8afbbb..7e9b574 100644 --- a/theme/layouts/4.5/style.css +++ b/theme/layouts/4.5/style.css | |||
@@ -231,3 +231,11 @@ div#flash { | |||
231 | * > html div#flash { | 231 | * > html div#flash { |
232 | position: absolute; | 232 | position: absolute; |
233 | } | 233 | } |
234 | |||
235 | div.module + cite { | ||
236 | top: -0.15em; | ||
237 | } | ||
238 | |||
239 | div.module.unrounded + cite { | ||
240 | top: -0.4em; | ||
241 | } | ||
diff --git a/theme/layouts/6.2/style.css b/theme/layouts/6.2/style.css index 53f3556..e68f7f8 100644 --- a/theme/layouts/6.2/style.css +++ b/theme/layouts/6.2/style.css | |||
@@ -245,3 +245,11 @@ span.post-vote { | |||
245 | position: relative; | 245 | position: relative; |
246 | top: -20px; | 246 | top: -20px; |
247 | } | 247 | } |
248 | |||
249 | div.module + cite { | ||
250 | top: -0.15em; | ||
251 | } | ||
252 | |||
253 | div.module.unrounded + cite { | ||
254 | top: -0.4em; | ||
255 | } | ||
diff --git a/theme/layouts/7/style.css b/theme/layouts/7/style.css index c16bdfa..e90ee05 100644 --- a/theme/layouts/7/style.css +++ b/theme/layouts/7/style.css | |||
@@ -181,3 +181,10 @@ div#sidebar ul li.active a, div#sidebar ul li a:hover { | |||
181 | color: black; | 181 | color: black; |
182 | } | 182 | } |
183 | 183 | ||
184 | div.module + cite { | ||
185 | top: -0.4em; | ||
186 | } | ||
187 | |||
188 | div.module.unrounded + cite { | ||
189 | top: -0.7em; | ||
190 | } | ||
diff --git a/theme/post.tpl b/theme/post.tpl index 2c65e51..7bf5481 100755 --- a/theme/post.tpl +++ b/theme/post.tpl | |||
@@ -7,13 +7,13 @@ | |||
7 | 7 | ||
8 | function ratePost(id, dir) | 8 | function ratePost(id, dir) |
9 | { | 9 | { |
10 | jQuery("#post-"+id+" .post-rating-up").addClass("post-action-done").html("<img src='/theme/images/icons/thumb_up.png' alt='+1' />"); | 10 | jQuery("#post-"+id+" .post-rating-up").addClass("post-action-done").html("<!--IFXLT-->img src='/theme/images/icons/thumb_up.png' alt='+1' /<!--IFXGT-->"); |
11 | jQuery("#post-"+id+" .post-rating-down").addClass("post-action-done").html("<img src='/theme/images/icons/thumb_down.png' alt='-1' />"); | 11 | jQuery("#post-"+id+" .post-rating-down").addClass("post-action-done").html("<!--IFXLT-->img src='/theme/images/icons/thumb_down.png' alt='-1' /<!--IFXGT-->"); |
12 | jQuery("#flash").text("Processing....").slideDown(); | 12 | jQuery("#flash").text("Processing....").slideDown(); |
13 | jQuery.ajax({ | 13 | jQuery.ajax({ |
14 | type: "GET", | 14 | type: "GET", |
15 | url: "/vote.php", | 15 | url: "/vote.php", |
16 | data: "id="+id+"&dir="+dir, | 16 | data: "id="+id+"<!--IFXAMP-->dir="+dir, |
17 | dataType: "text", | 17 | dataType: "text", |
18 | success: function(msg) { | 18 | success: function(msg) { |
19 | if (msg != "") | 19 | if (msg != "") |
diff --git a/theme/quotes/browse.tpl b/theme/quotes/browse.tpl index d710d3f..24afd14 100755 --- a/theme/quotes/browse.tpl +++ b/theme/quotes/browse.tpl | |||
@@ -10,7 +10,7 @@ function voteQuote(id, dir) | |||
10 | jQuery.ajax({ | 10 | jQuery.ajax({ |
11 | type: "GET", | 11 | type: "GET", |
12 | url: "/quotes/vote.php", | 12 | url: "/quotes/vote.php", |
13 | data: "id="+id+"&dir="+dir, | 13 | data: "id="+id+"<!--IFXAMP-->dir="+dir, |
14 | dataType: "text", | 14 | dataType: "text", |
15 | success: function(msg) { | 15 | success: function(msg) { |
16 | if (msg != "") | 16 | if (msg != "") |