61 <meta http-equiv="X-UA-Compatible" content="IE=9" /> |
63 <meta http-equiv="X-UA-Compatible" content="IE=9" /> |
62 |
64 |
63 <!-- FONT --> |
65 <!-- FONT --> |
64 <link href='<?php echo(registry_url('PT-Sans_Narrow','font'))?>' rel='stylesheet' type='text/css'> |
66 <link href='<?php echo(registry_url('PT-Sans_Narrow','font'))?>' rel='stylesheet' type='text/css'> |
65 <link href='<?php echo(registry_url('PT-Sans','font'))?>' rel='stylesheet' type='text/css'> |
67 <link href='<?php echo(registry_url('PT-Sans','font'))?>' rel='stylesheet' type='text/css'> |
66 |
68 |
67 <!-- CSS --> |
69 <!-- CSS --> |
68 <link rel="stylesheet" href="<?php echo(registry_url('fancybox','css'));?>" type="text/css" media="screen"> |
70 <link rel="stylesheet" href="<?php echo(registry_url('fancybox','css'));?>" type="text/css" media="screen"> |
69 <link rel="stylesheet" href="<?php echo(registry_url('tweetcast','css'));?>?v=210512" type="text/css" media="screen, projection"/> |
71 <link rel="stylesheet" href="<?php echo(registry_url('tweetcast','css'));?>?v=210512" type="text/css" media="screen, projection"/> |
70 |
72 |
71 <!-- JAVASCRIPT --> |
73 <!-- JAVASCRIPT --> |
76 <script type="text/javascript" src="<?php echo(registry_url('jquery-mousewheel','js'))?>"></script> |
78 <script type="text/javascript" src="<?php echo(registry_url('jquery-mousewheel','js'))?>"></script> |
77 <script type="text/javascript" src="<?php echo(registry_url('jquery-scrollto','js'))?>"></script> |
79 <script type="text/javascript" src="<?php echo(registry_url('jquery-scrollto','js'))?>"></script> |
78 <script type="text/javascript" src="<?php echo(registry_url('underscore','js'))?>"></script> |
80 <script type="text/javascript" src="<?php echo(registry_url('underscore','js'))?>"></script> |
79 <script type="text/javascript" src="<?php echo(registry_url('raphael','js'))?>"></script> |
81 <script type="text/javascript" src="<?php echo(registry_url('raphael','js'))?>"></script> |
80 <script type="text/javascript" src="<?php echo(registry_url('fancybox','js'))?>"></script> |
82 <script type="text/javascript" src="<?php echo(registry_url('fancybox','js'))?>"></script> |
81 |
83 |
82 <script type="text/javascript"> |
84 <script type="text/javascript"> |
83 <?php |
85 <?php |
84 if (isset($config['tracking_keywords']) && count($config['tracking_keywords'])) { |
86 if (isset($config['tracking_keywords']) && count($config['tracking_keywords'])) { |
85 echo "var tracking_keywords = ".json_encode($config['tracking_keywords']).';'; |
87 echo "var tracking_keywords = ".json_encode($config['tracking_keywords']).';'; |
86 } elseif (isset($config['hashtag'])) { |
88 } elseif (isset($config['hashtag'])) { |
87 echo "var tracking_keywords = ".json_encode(array($config['hashtag'])).";"; |
89 echo "var tracking_keywords = ".json_encode(array($config['hashtag'])).";"; |
88 } |
90 } |
89 ?> |
91 ?> |
90 <?php if (isset($config['suggested_keywords'])) echo "var suggested_keywords = ".json_encode($config['suggested_keywords']).";"; ?> |
92 <?php if (isset($config['suggested_keywords'])) echo "var suggested_keywords = ".json_encode($config['suggested_keywords']).";"; ?> |
91 <?php if (isset($config['js_config'])) echo $config['js_config']; ?> |
93 <?php if (isset($config['js_config'])) echo "\n".$config['js_config']."\n"; ?> |
92 l10n = { "rechercher" : "<?php echo $translate->_('Rechercher'); ?>" } |
94 l10n = { "rechercher" : "<?php echo $translate->_('Rechercher'); ?>" } |
93 var annotations = { |
95 if (typeof annotations == "undefined" || !annotations) { |
94 "default" : { |
96 var annotations = JSON.parse("<?php echo addslashes(json_encode($annotations)); ?>"); |
95 "colors" : { |
97 for(var annot_cat in annotations) { |
96 "h" : 0, |
98 if("keywords" in annotations[annot_cat]) { |
97 "s" : 0 |
99 annotations[annot_cat]['keywords'] = [ new RegExp(annotations[annot_cat]['keywords']), ]; |
98 } |
|
99 }, |
|
100 "positive" : { |
|
101 "display_name" : "++ | <?php echo $translate->_('Agree'); ?>", |
|
102 "keywords" : [ /\+\+/ ], |
|
103 "colors" : { |
|
104 "h" : .3, |
|
105 "s" : .65 |
|
106 } |
|
107 }, |
|
108 "negative" : { |
|
109 "display_name" : "-- | <?php echo $translate->_('Disagree'); ?>", |
|
110 "keywords" : [ /\-\-/ ], |
|
111 "colors" : { |
|
112 "h" : 0, |
|
113 "s" : .8 |
|
114 } |
|
115 }, |
|
116 "reference" : { |
|
117 "display_name" : "== | <?php echo $translate->_('Reference'); ?>", |
|
118 "keywords" : [ /\=\=/ ], |
|
119 "colors" : { |
|
120 "h" : .16, |
|
121 "s" : .8 |
|
122 } |
|
123 }, |
|
124 "question" : { |
|
125 "display_name" : "?? | <?php echo $translate->_('Question'); ?>", |
|
126 "keywords" : [ /\?\?/ ], |
|
127 "colors" : { |
|
128 "h" : .6, |
|
129 "s" : .8 |
|
130 } |
100 } |
131 } |
101 } |
132 } |
102 } |
|
103 console.log(annotations); |
133 </script> |
104 </script> |
134 <?php if (isset($_SESSION['TWITTER_ACCESS_TOKEN'])) { ?> |
105 <?php if (isset($_SESSION['TWITTER_ACCESS_TOKEN'])) { ?> |
135 <script type="text/javascript" src="<?php echo(registry_url('twcx-main','js'))?>"></script> |
106 <script type="text/javascript" src="<?php echo(registry_url('twcx-main','js'))?>"></script> |
136 <?php } ?> |
107 <?php } ?> |
137 |
108 |
138 <script type="text/javascript"> |
109 <script type="text/javascript"> |
139 |
110 |
140 function add_grammar(value) { |
111 function add_grammar(value) { |
141 var _st = $('#status'), |
112 var _st = $('#status'), |
142 _val = _st.val(); |
113 _val = _st.val(); |
143 _st.val( _val + ( _val[_val.length - 1] == " " ? "" : " " ) + value ).change(); |
114 _st.val( _val + ( _val[_val.length - 1] == " " ? "" : " " ) + value ).change(); |
144 } |
115 } |
145 |
116 |
146 $(document).ready(function() { |
117 $(document).ready(function() { |
147 |
118 |
148 |
119 |
149 function updateCounter() { |
120 function updateCounter() { |
150 var _v = $("#status").val(); |
121 var _v = $("#status").val(); |
151 if (_v.length > 140) { |
122 if (_v.length > 140) { |
152 _v = _v.substr(0,140); |
123 _v = _v.substr(0,140); |
153 $("#status").val(_v); |
124 $("#status").val(_v); |
165 } else { |
136 } else { |
166 $(_e).removeClass('selected'); |
137 $(_e).removeClass('selected'); |
167 } |
138 } |
168 }); |
139 }); |
169 } |
140 } |
170 |
141 |
171 // BUTTONS |
142 // BUTTONS |
172 $(".tweetButton").click(function() { |
143 $(".tweetButton").click(function() { |
173 add_grammar($(this).find('span.twbSyntax').text()); |
144 add_grammar($(this).find('span.twbSyntax').text()); |
174 updateCounter(); |
145 updateCounter(); |
175 }) |
146 }) |
176 |
147 |
177 // SEND TWEETS |
148 // SEND TWEETS |
178 $("#sendTweet").click(function(){ |
149 $("#sendTweet").click(function(){ |
179 var MyStatus = $('#status').val(); |
150 var MyStatus = $('#status').val(); |
180 $.post('tweet_ajax.php', {status:MyStatus} |
151 $.post('tweet_ajax.php', {status:MyStatus} |
181 ,function(data) { |
152 ,function(data) { |
182 |
153 |
183 if(data=="true"){ |
154 if(data=="true"){ |
184 $("#messageSuccess").show('fast'); |
155 $("#messageSuccess").show('fast'); |
185 $("#messageSuccess").delay(800).hide('slow'); |
156 $("#messageSuccess").delay(800).hide('slow'); |
186 $('#status').val("<?php echo($config['hashtag']); ?>"); |
157 $('#status').val("<?php echo($config['hashtag']); ?>"); |
187 $('#status').change(); |
158 $('#status').change(); |
188 }else{ |
159 }else{ |
189 $("#error").text(data); |
160 $("#error").text(data); |
190 $("#messageFailed").show('fast'); |
161 $("#messageFailed").show('fast'); |
191 $("#messageFailed").delay(800).hide('slow'); |
162 $("#messageFailed").delay(800).hide('slow'); |
192 } |
163 } |
193 |
164 |
194 }); |
165 }); |
195 |
166 |
196 }); |
167 }); |
197 |
168 |
198 |
169 |
199 $("#status").bind("change keyup paste blur focus",updateCounter); |
170 $("#status").bind("change keyup paste blur focus",updateCounter); |
200 |
171 |
201 |
172 |
202 $("#Program").fancybox({ |
173 $("#Program").fancybox({ |
203 'width' : '75%', |
174 'width' : '75%', |
204 'height' : '75%', |
175 'height' : '75%', |
205 'autoScale' : false, |
176 'autoScale' : false, |
206 'transitionIn' : 'none', |
177 'transitionIn' : 'none', |
213 'autoDimensions' : false, |
184 'autoDimensions' : false, |
214 'transitionIn' : 'none', |
185 'transitionIn' : 'none', |
215 'transitionOut' : 'none', |
186 'transitionOut' : 'none', |
216 'type' : 'iframe' |
187 'type' : 'iframe' |
217 }); |
188 }); |
218 |
189 |
219 $("#onglets a").click(function() { |
190 $("#onglets a").click(function() { |
220 $("div.ifwrap").hide(); |
191 $("div.ifwrap").hide(); |
221 $("#onglets li").removeClass("selected"); |
192 $("#onglets li").removeClass("selected"); |
222 $(this).parent().addClass("selected"); |
193 $(this).parent().addClass("selected"); |
223 var hr = $(this).attr("href"); |
194 var hr = $(this).attr("href"); |
246 <?php } ?> |
217 <?php } ?> |
247 //<!-- LIMIT TEXTAREA: |
218 //<!-- LIMIT TEXTAREA: |
248 // End --> |
219 // End --> |
249 |
220 |
250 </script> |
221 </script> |
251 |
222 |
252 <script type="text/javascript"> |
223 <script type="text/javascript"> |
253 |
224 |
254 var _gaq = _gaq || []; |
225 var _gaq = _gaq || []; |
255 _gaq.push(['_setAccount', 'UA-23581291-1']); |
226 _gaq.push(['_setAccount', 'UA-23581291-1']); |
256 _gaq.push(['_trackPageview']); |
227 _gaq.push(['_trackPageview']); |
257 _gaq.push(['_setAllowAnchor', true]); |
228 _gaq.push(['_setAllowAnchor', true]); |
258 |
229 |
259 (function() { |
230 (function() { |
260 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; |
231 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; |
261 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; |
232 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; |
262 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); |
233 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); |
263 })(); |
234 })(); |
264 |
235 |
265 </script> |
236 </script> |
266 |
237 |
267 </head> |
238 </head> |
268 <body<?php if ($embed) { echo ' class="embed"'; } ?>> |
239 <body<?php if ($embed) { echo ' class="embed"'; } ?>> |
269 <div id="sendUsFeedBack"><a href="<?php echo($C_feedback_form_url); ?>" target="_blank"><img src="<?php echo(URL_ROOT); ?>images/sendusfeedback.png"></a></div> |
240 <div id="sendUsFeedBack"><a href="<?php echo($C_feedback_form_url); ?>" target="_blank"><img src="<?php echo(URL_ROOT); ?>images/sendusfeedback.png"></a></div> |
270 |
241 |
271 <div id="container"> |
242 <div id="container"> |
272 |
243 |
273 <div id="coldroite"> |
244 <div id="coldroite"> |
274 |
245 |
275 <div class="embedbar"> |
246 <div class="embedbar"> |
276 <a class="embedbutton" href="<?php echo(URL_ROOT.$rep)?>/live_embed_form.php">Intégrer</a> |
247 <a class="embedbutton" href="<?php echo(URL_ROOT.$rep)?>/live_embed_form.php">Intégrer</a> |
277 <!-- AddThis Button BEGIN --> |
248 <!-- AddThis Button BEGIN --> |
278 <div class="addthis_toolbox addthis_default_style addthis_32x32_style"> |
249 <div class="addthis_toolbox addthis_default_style addthis_32x32_style"> |
279 <a class="addthis_button_facebook"></a> |
250 <a class="addthis_button_facebook"></a> |
437 <?php print $translate->_("Erreur1"); ?><div id="error"> </div><br/><br/> |
408 <?php print $translate->_("Erreur1"); ?><div id="error"> </div><br/><br/> |
438 </div> |
409 </div> |
439 <a href="#" id="sendTweet" > |
410 <a href="#" id="sendTweet" > |
440 <span><?php print $translate->_("Envoyer"); ?></span> |
411 <span><?php print $translate->_("Envoyer"); ?></span> |
441 </a> |
412 </a> |
442 <a id="positive" title="++ | <?php echo $translate->_('Agree'); ?>" class="tweetButton twbGreen"> |
413 <?php foreach ($annotations as $annot_cat => $annot_def) { |
443 <span class="twbSyntax">++</span> |
414 if($annot_cat == "default") { |
444 <span class="twbSeparator">|</span> |
415 continue; |
445 <span class="twbLabel"><?php echo $translate->_('Agree'); ?></span> |
416 } |
446 </a> |
417 $display_parts = explode(" | ", $annot_def['display_name']); |
447 <a id="negative" title="-- | <?php echo $translate->_('Disagree'); ?>" class="tweetButton twbRed"> |
418 ?> |
448 <span class="twbSyntax">--</span> |
419 <a id="<?php echo $annot_cat; ?>" title="<?php echo $annot_def['display_name']; ?>" class="tweetButton <?php echo $annot_def['colors_class']; ?>"> |
449 <span class="twbSeparator">|</span> |
420 <span class="twbSyntax"><?php echo $display_parts[0]; ?></span> |
450 <span class="twbLabel"><?php echo $translate->_('Disagree'); ?></span> |
421 <span class="twbSeparator">|</span> |
451 </a> |
422 <span class="twbLabel"><?php echo $display_parts[1]; ?></span> |
452 <a id="reference" title="== | <?php echo $translate->_('Reference'); ?>" class="tweetButton twbYellow"> |
423 </a> |
453 <span class="twbSyntax">==</span> |
424 <?php } ?> |
454 <span class="twbSeparator">|</span> |
425 |
455 <span class="twbLabel"><?php echo $translate->_('Reference'); ?></span> |
|
456 </a> |
|
457 <a id="question" title="?? | <?php echo $translate->_('Question'); ?>" class="tweetButton twbBlue"> |
|
458 <span class="twbSyntax">??</span> |
|
459 <span class="twbSeparator">|</span> |
|
460 <span class="twbLabel"><?php echo $translate->_('Question'); ?></span> |
|
461 </a> |
|
462 |
|
463 <div style="clear: both;"></div> |
426 <div style="clear: both;"></div> |
464 </form> |
427 </form> |
465 </div> |
428 </div> |
466 </div> |
429 </div> |
467 |
430 |
468 <?php if (isset($_SESSION['TWITTER_ACCESS_TOKEN'])) { ?> |
431 <?php if (isset($_SESSION['TWITTER_ACCESS_TOKEN'])) { ?> |
469 |
432 |
470 <div id="tweetviz"> |
433 <div id="tweetviz"> |
471 <div class="barre"> |
434 <div class="barre"> |
472 <form id="recherche"> |
435 <form id="recherche"> |
473 <input autocomplete="off" class="greyed" id="inp_q" value="<?php echo $translate->_('Rechercher'); ?>" /> |
436 <input autocomplete="off" class="greyed" id="inp_q" value="<?php echo $translate->_('Rechercher'); ?>" /> |
474 <input id="inp_submit" type="submit" /> |
437 <input id="inp_submit" type="submit" /> |
488 <div id="timeline"></div> |
451 <div id="timeline"></div> |
489 <div id="scrollcont"> |
452 <div id="scrollcont"> |
490 <div id="scrollin"></div> |
453 <div id="scrollin"></div> |
491 </div> |
454 </div> |
492 </div> |
455 </div> |
493 |
456 |
494 <?php } else {?> |
457 <?php } else {?> |
495 |
458 |
496 <p class="connect-message"><a href="<?php echo URL_ROOT.$rep; ?>/client.php?CONNECT=true"><?php echo $translate->_('You must be connected with your Twitter account to read the conversation'); ?></a></p> |
459 <p class="connect-message"><a href="<?php echo URL_ROOT.$rep; ?>/client.php?CONNECT=true"><?php echo $translate->_('You must be connected with your Twitter account to read the conversation'); ?></a></p> |
497 |
460 |
498 <?php } ?> |
461 <?php } ?> |
499 |
462 |
500 </div> |
463 </div> |
501 <?php $pad_url = $translate->_('config__pad_url');?> |
464 <?php $pad_url = $translate->_('config__pad_url');?> |
502 <?php if ($pad_url !== "config__pad_url"):?> |
465 <?php if ($pad_url !== "config__pad_url"):?> |
503 <ul class="accordeon"> |
466 <ul class="accordeon"> |
504 <li class="acctitre"> |
467 <li class="acctitre"> |