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); +} + ?> Polemic tweet - <?php echo($translate->_('config__title')); ?> - - - - - - - - - - - - - - - - - - - - ' rel='stylesheet' type='text/css'/> - ' rel='stylesheet' type='text/css'/> - - - + + + + + + + + + + + + + ' rel='stylesheet' type='text/css'/> + ' rel='stylesheet' type='text/css'/> + + + - + + var _fancybox = jQuery.fancybox; + jQuery.fancybox( + jQuery("#splash").html(), + { + width: 500, + modal: true, + closeBtn: false + }); + + jQuery("#fancybox-content form").submit(function() { + _fancybox.close(); + var _checkboxes = jQuery("#fancybox-content .checkbox:checked").map(function() { return this.value }), + _data = { + eventLink: _checkboxes, + eMail: jQuery("#fancybox-content .eMail").val(), + twitterHandle: jQuery("#fancybox-content .twitterHandle").val(), + protocolLevel: _protocol_level + } + _tracer.trace("Pt_SendForm", _data); + return false; + }); + + + jQuery("#mdselect_"+metadata_key).attr("selected","selected"); + jQuery("#mdselect").change(function() { + var metadata_key = this.options[this.selectedIndex].value; + window.location.hash = "#metadata="+metadata_key; + window.location.href = window.location.href; + window.location.reload(true); + jQuery(".embedbutton").attr('href','/embed_form.php?metadata='+metadata_key); + }); + if(metadata_key !== "metadata") { + jQuery(".embedbutton").attr('href','/embed_form.php?metadata='+metadata_key); + } + jQuery(".embedbutton").fancybox({ + 'width' : 360, + 'height' : 360, + 'autoDimensions' : false, + 'transitionIn' : 'none', + 'transitionOut' : 'none', + 'type' : 'iframe' + }); + jQuery(".embedbutton").click(function() { + _tracer.trace("Pt_EmbedButtonClicked"); + }); + jQuery(".acctitre").click(function() { + var _nx = jQuery(this).next(); + if (_nx.is(":hidden")) { + jQuery(".acctexte").slideUp(); + _nx.slideDown(); + } + }) + + }); + +
- +
@@ -226,18 +318,18 @@
- -
+ +
- -
+ +
-
-
-
+
+
+
@@ -306,10 +401,10 @@ - +
+ _('config__partenaires')); ?> + +