aboutsummaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authorWojciech Polak <polak@gnu.org>2011-10-30 09:59:24 +0100
committerWojciech Polak <polak@gnu.org>2011-10-30 09:59:24 +0100
commit443ac490b868d36c223b074dbf7fcab729cd708c (patch)
treeb858d9b3e36cb0b605c0a11d90fdfc725e60cad1 /frontend
parentda57070b7ed9cee48166d3b30dbc3baba793ed06 (diff)
downloadcheetah-443ac490b868d36c223b074dbf7fcab729cd708c.tar.gz
cheetah-443ac490b868d36c223b074dbf7fcab729cd708c.tar.bz2
Preliminary changes towards HTTPS.
Diffstat (limited to 'frontend')
-rw-r--r--frontend/index.php3
-rw-r--r--frontend/reader.php22
2 files changed, 12 insertions, 13 deletions
diff --git a/frontend/index.php b/frontend/index.php
index 02da8fa..d84f89f 100644
--- a/frontend/index.php
+++ b/frontend/index.php
@@ -28,9 +28,6 @@ if ($session->status['afterlogged'] != 'yes') {
include 'login.php';
}
else {
- if (isset ($_SERVER['HTTPS'])) {
- redirect ('http://'.$CONF['site'].'/');
- }
getvars ('signed_request');
if ($signed_request)
redirect ('http://'.$CONF['site'].'/reader?insideFB=1');
diff --git a/frontend/reader.php b/frontend/reader.php
index 98aac9f..40eb22c 100644
--- a/frontend/reader.php
+++ b/frontend/reader.php
@@ -2,7 +2,7 @@
/*
Cheetah News reader.php
- Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Wojciech Polak.
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Wojciech Polak.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@@ -38,7 +38,7 @@ if ($session->status['afterlogged'] == 'yes')
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link id="style" rel="stylesheet" type="text/css" href="<?=dsp('css')?>" />
-<?php if ($CONF['feedEngine'] != 'cthonly') { ?><script type="text/javascript" src="http://www.google.com/jsapi?key=<?=$CONF['google.key']?>"></script>
+<?php if ($CONF['feedEngine'] != 'cthonly') { ?><script type="text/javascript" src="https://www.google.com/jsapi?key=<?=$CONF['google.key']?>"></script>
<? } ?>
<script type="text/javascript">
<?php echo "var CONF = {'fbe': '".($insideFB ? 'google' : $CONF['feedEngine']).
@@ -362,19 +362,21 @@ var SIGS = {'js':'".$SIGS["js"]."', 'tr':'".$SIGS["tr"]."', 'wt':'".
<script type="text/javascript">CONF.fb_app_id = '<?=$CONF["fb.app_id"]?>';</script>
<div id="fb-root"></div>
<div id="fbFanbox" style="display:none">
- <iframe src="http://www.facebook.com/plugins/fan.php?id=<?=$CONF['fb.app_id']?>&amp;width=500&amp;height=300&amp;connections=10&amp;stream=false&amp;header=false" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:500px; height:300px"></iframe>
+ <iframe src="https://www.facebook.com/plugins/fan.php?id=<?=$CONF['fb.app_id']?>&amp;width=500&amp;height=300&amp;connections=10&amp;stream=false&amp;header=false" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:500px; height:300px"></iframe>
</div>
<?php } ?>
<?php if (isset ($CONF['google.analytics'])) { ?>
<script type="text/javascript">
-var tracker;
-setTimeout (function () {
- $.getScript ('http://www.google-analytics.com/ga.js', function () {
- if (typeof _gat != 'undefined') {
- tracker = _gat._getTracker ('<?=$CONF["google.analytics"]?>');
- tracker._initData (); tracker._trackPageview ();
- }}); }, 5000);
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', '<?=$CONF["google.analytics"]?>']);
+_gaq.push(['_setDomainName', 'www.cheetah-news.com']);
+_gaq.push(['_trackPageview']);
+(function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
</script>
<?php } ?>

Return to:

Send suggestions and report system problems to the System administrator.