diff -r 529fbf71f876 -r 635a86f25fe7 web/polemicaltimeline.php --- a/web/polemicaltimeline.php Fri Jul 06 18:23:19 2012 +0200 +++ b/web/polemicaltimeline.php Wed Jul 11 18:21:43 2012 +0200 @@ -13,11 +13,11 @@ $div_height = 640; if($translate->_('config__div_height') != 'config__div_height') { - $div_height = $translate->_('config__div_height'); + $div_height = $translate->_('config__div_height'); } $tweet_explain_background = URL_ROOT.'images/tweetExplainBgd.gif'; if(file_exists(dirname(__FILE__)."/$rep/images/tweetExplainBgd.gif")) { - $tweet_explain_background = URL_ROOT.$rep.'/images/tweetExplainBgd.gif'; + $tweet_explain_background = URL_ROOT.$rep.'/images/tweetExplainBgd.gif'; } $head_logo = URL_ROOT."$rep/images/head_logo.gif"; @@ -27,59 +27,94 @@ $url = (!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; +$protocol_level = ( + isset($_REQUEST['protocol_level']) + ? $_REQUEST['protocol_level'] + : ( + isset($config['protocol_level']) + ? $config['protocol_level'] + : 3 + ) +); + +$protocol_level = min(3,max(0, $protocol_level)); + +$use_protocol = (isset($_REQUEST['protocol_level']) || isset($config['protocol_level'])); + +if ($use_protocol && !isset($_SESSION['answered_events'])) { + $_SESSION['answered_events'] = array(); +} + +$show_splash = ( $use_protocol && !in_array($rep, $_SESSION['answered_events']) ); + +if ($show_splash) { + array_push($_SESSION['answered_events'], $rep); +} + ?>
_('config__description')); ?>