|
1 <?php |
|
2 |
|
3 /** |
|
4 * include some common code (like we did in the 90s) |
|
5 * People still do this? ;) |
|
6 */ |
|
7 include_once './common.php'; |
|
8 |
|
9 /** |
|
10 * Do we already have a valid Access Token or need to go get one? |
|
11 */ |
|
12 if (!isset($_SESSION['TWITTER_ACCESS_TOKEN']) && isset($_GET['CONNECT']) ) { |
|
13 /** |
|
14 * Guess we need to go get one! |
|
15 */ |
|
16 $token = $consumer->getRequestToken(); |
|
17 $_SESSION['TWITTER_REQUEST_TOKEN'] = serialize($token); |
|
18 |
|
19 /** |
|
20 * Now redirect user to Twitter site so they can log in and |
|
21 * approve our access |
|
22 */ |
|
23 $consumer->redirect(); |
|
24 } |
|
25 |
|
26 /* CLIENT VAR LIVE */ |
|
27 |
|
28 $C_hashtag= "#rsln"; |
|
29 $C_link = "http://www.rslnmag.fr/blog/2011/3/24/la-journaliste-mercedes-bunz-prochaine-invitee-des-rencontres-rsln/"; |
|
30 $C_title = "Mercedes Bunz et le journaliste"; |
|
31 $C_REP = "rsln-mercedes-bunz/"; |
|
32 $C_description = "Elle nous racontera comment les algorithmes ont fini par devenir des producteurs d'infos et pourquoi ils ne remplaceront pour autant jamais les journalistes. |
|
33 <br/><br/> |
|
34 (titre de sa conférence, en VO : When robots learned to write, How the rise of the algorithms will change journalism and revolutionize our concept of knowledge.) |
|
35 <br/><br/> |
|
36 C'est un thème sur lequel elle avait été très remarquée, lors d'une intervention à la conférence Lift, à Genève, en mai 2010."; |
|
37 |
|
38 $C_partenaires = " |
|
39 <a href='http://www.iri.centrepompidou.fr/' class='footerLink' target='_blank'> |
|
40 IRI </a> |
|
41 | <a href='http://www.rslnmag.fr/' class='footerLink' target='_blank' > RSLN </a> |
|
42 | <a href='http://www.microsoft.fr/' class='footerLink' target='_blank'> MICROSOFT.fr </a>"; |
|
43 |
|
44 ?> |
|
45 |
|
46 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" |
|
47 "http://www.w3.org/TR/html4/strict.dtd"> |
|
48 |
|
49 <html lang="<?php echo($actual); ?>"> |
|
50 <head> |
|
51 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
|
52 <title>RSLN - Live Video and Annotation</title> |
|
53 <meta http-equiv="X-UA-Compatible" content="IE=8" /> |
|
54 |
|
55 <!-- Framework CSS --> |
|
56 <link rel="stylesheet" href="res/blueprint/screen.css" type="text/css" media="screen, projection"> |
|
57 <link rel="stylesheet" href="res/blueprint/print.css" type="text/css" media="print"> |
|
58 <!--[if lt IE 8]><link rel="stylesheet" href="blueprint/ie.css" type="text/css" media="screen, projection"><![endif]--> |
|
59 <link rel="stylesheet" href="res/blueprint/plugins/fancy-type/screen.css" type="text/css" media="screen, projection"> |
|
60 <link rel="stylesheet" href="res/css/custom.css" type="text/css" media="screen, projection"> |
|
61 <link rel="stylesheet" type="text/css" href="res/jquery.fancybox/fancybox/jquery.fancybox-1.3.4.css" media="screen"> |
|
62 <link rel="stylesheet" type="text/css" href="res/niceforms/niceforms-custom.css" media="screen" > |
|
63 |
|
64 <!-- JAVASCRIPT --> |
|
65 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> |
|
66 <script type="text/javascript" src="res/jquery.fancybox/fancybox/jquery.fancybox-1.3.4.pack.js"></script> |
|
67 <script type="text/javascript" src="res/metadataplayer/res/js/jquery.tools.min.js"></script> |
|
68 <script type="text/javascript" src="res/niceforms/niceforms.js"></script> |
|
69 <script src="http://widgets.twimg.com/j/2/widget.js"></script> |
|
70 |
|
71 <!-- FONT --> |
|
72 <link href='http://fonts.googleapis.com/css?family=PT+Sans+Narrow&subset=latin' rel='stylesheet' type='text/css'> |
|
73 <link href='http://fonts.googleapis.com/css?family=PT+Sans&subset=latin' rel='stylesheet' type='text/css'> |
|
74 <link href='http://fonts.googleapis.com/css?family=Geo&subset=latin' rel='stylesheet' type='text/css'> |
|
75 |
|
76 <script type="text/javascript"> |
|
77 $(document).ready(function() { |
|
78 |
|
79 doTimer(); |
|
80 //$("txt").hide(); |
|
81 $(".loginbutton").click(function() { |
|
82 document.location.href="<?php URL_ROOT ?>?CONNECT=true"; |
|
83 }); |
|
84 $("#IDENTIFIER").click(function() { |
|
85 document.location.href="<?php URL_ROOT ?>?CONNECT=true"; |
|
86 }); |
|
87 |
|
88 $("#messageSuccess").hide(); |
|
89 $("#messageFailed").hide(); |
|
90 $("#txt").hide(); |
|
91 |
|
92 // BUTTONS |
|
93 $("#positive").click(function(){ |
|
94 var MyValue = $('#status').attr("value"); |
|
95 $('#status').attr("value",MyValue+"++ "); |
|
96 }); |
|
97 $("#negative").click(function(){ |
|
98 var MyValue = $('#status').attr("value"); |
|
99 $('#status').attr("value",MyValue+"-- "); |
|
100 }); |
|
101 $("#reference").click(function(){ |
|
102 var MyValue = $('#status').attr("value"); |
|
103 $('#status').attr("value",MyValue+"== "); |
|
104 }); |
|
105 $("#question").click(function(){ |
|
106 var MyValue = $('#status').attr("value"); |
|
107 $('#status').attr("value",MyValue+"?? "); |
|
108 }); |
|
109 |
|
110 // SEND TWEETS |
|
111 $("#sendTweet").click(function(){ |
|
112 var MyStatus = $('#status').attr("value"); |
|
113 $.post('tweet_ajax.php', {status:MyStatus} |
|
114 ,function(data) { |
|
115 |
|
116 if(data=="true"){ |
|
117 $("#messageSuccess").show('fast'); |
|
118 $("#messageSuccess").delay(800).hide('slow'); |
|
119 $('#status').attr("value","#rsln"); |
|
120 }else{ |
|
121 $("#error").text(data); |
|
122 $("#messageFailed").show('fast'); |
|
123 $("#messageFailed").delay(800).hide('slow'); |
|
124 } |
|
125 |
|
126 }); |
|
127 |
|
128 }); |
|
129 |
|
130 $(".timeFrame").tooltip(); |
|
131 /* |
|
132 * Lightbox button |
|
133 */ |
|
134 $("#About").fancybox({ |
|
135 'titlePosition' : 'inside', |
|
136 'transitionIn' : 'none', |
|
137 'transitionOut' : 'none', |
|
138 'enableEscapeButton': 'none', |
|
139 'margin' : 1, |
|
140 'padding' : 0 |
|
141 }<?php if (!isset($_SESSION['TWITTER_ACCESS_TOKEN'])){echo(").trigger('click');");}else{echo(");");} ?> |
|
142 |
|
143 |
|
144 $("#Program").fancybox({ |
|
145 'width' : '75%', |
|
146 'height' : '75%', |
|
147 'autoScale' : false, |
|
148 'transitionIn' : 'none', |
|
149 'transitionOut' : 'none', |
|
150 'type' : 'iframe' |
|
151 }); |
|
152 |
|
153 $("#Video_ldt").fancybox({ |
|
154 'width' : 1021, |
|
155 'height' : 661, |
|
156 'autoScale' : false, |
|
157 'transitionIn' : 'none', |
|
158 'transitionOut' : 'none', |
|
159 'type' : 'iframe' |
|
160 }); |
|
161 |
|
162 $("#ACCES").click(function() { |
|
163 $.fancybox.close(); |
|
164 }); |
|
165 |
|
166 // Buttons |
|
167 |
|
168 |
|
169 }); |
|
170 |
|
171 |
|
172 <!-- LIMIT TEXTAREA: |
|
173 function imposemax(Object) |
|
174 { |
|
175 return (Object.value.length <= 140); |
|
176 } |
|
177 // End --> |
|
178 |
|
179 <!-- TIMER |
|
180 var c=0; |
|
181 var t; |
|
182 var timer_is_on=0; |
|
183 |
|
184 function timedCount() |
|
185 { |
|
186 document.getElementById('txt').value=c; |
|
187 c = c+1; |
|
188 t = window.setTimeout("timedCount()",1000); |
|
189 $(".twtr-ft").hide(); |
|
190 $(".twtr-hd").hide(); |
|
191 //twtr-tweet |
|
192 $(".twtr-tweet").each(colorTweetings); |
|
193 |
|
194 } |
|
195 |
|
196 function colorTweetings (){ |
|
197 var tweettemp = $(this).html(); |
|
198 if (tweettemp.search(/\x3F\x3F/)!=-1){ |
|
199 $(this).css({'background-color': '#bfdbec','color':"#000"}); |
|
200 } |
|
201 if (tweettemp.search(/\x2B\x2B/)!=-1){ |
|
202 $(this).css({'background-color': '#c5e7cd','color':"#fff"}); |
|
203 } |
|
204 if (tweettemp.search(/\x2D\x2D/)!=-1){ |
|
205 $(this).css({'background-color': '#f6ced0','color':"#fff"}); |
|
206 } |
|
207 if (tweettemp.search(/\x3D\x3D/)!=-1){ |
|
208 $(this).css({'background-color': '#ecedc1','color':"#000"}); |
|
209 } |
|
210 }; |
|
211 |
|
212 |
|
213 |
|
214 function doTimer() |
|
215 { |
|
216 if (!timer_is_on) |
|
217 { |
|
218 timer_is_on=1; |
|
219 timedCount(); |
|
220 } |
|
221 } |
|
222 |
|
223 function stopCount() |
|
224 { |
|
225 clearTimeout(t); |
|
226 timer_is_on=0; |
|
227 } |
|
228 // |
|
229 //--> |
|
230 </script> |
|
231 |
|
232 <script type="text/javascript"> |
|
233 |
|
234 var _gaq = _gaq || []; |
|
235 _gaq.push(['_setAccount', 'UA-9955524-3']); |
|
236 _gaq.push(['_setDomainName', '.iri.centrepompidou.fr']); |
|
237 _gaq.push(['_trackPageview']); |
|
238 |
|
239 (function() { |
|
240 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; |
|
241 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; |
|
242 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); |
|
243 })(); |
|
244 |
|
245 </script> |
|
246 |
|
247 </head> |
|
248 <body> |
|
249 <div class="container"> |
|
250 <img src="<?php echo($C_REP); ?>/images/head_logo.gif" class="Producteur logo"> |
|
251 <div id="minilogo" style="margin-left:85px;height:5px;top:5px;"></div> |
|
252 <ul class="menu"> |
|
253 <li class="menuUnderline"><a href="index.php" class="menuLink"> |
|
254 <?php print $translate->_("Accueil"); ?> </a></li> |
|
255 <li class="menuUnderline" ><a href="<?php echo($C_link); ?>" class="menuLink" target="_blank" id='Program'> |
|
256 <?php print $translate->_("Programme"); ?></a></li> |
|
257 <li ><a href="about.php" class="menuLink" > |
|
258 <?php print $translate->_("A propos"); ?></a></li> |
|
259 |
|
260 </ul> |
|
261 |
|
262 <ul class="menu" > |
|
263 <li class="menuUnderline"><a href="<?php URL_ROOT ?>?lang=ja_JP" class="menuLink" > |
|
264 <img src='images/flag_jp.gif'<?php if($actual!="ja_JP"){echo("style='opacity: .5;'"); } ?> /> |
|
265 <?php print $translate->_("Japonais"); ?></a></li> |
|
266 <li class="menuUnderline"><a href="<?php URL_ROOT ?>?lang=fr" class="menuLink"> |
|
267 <img src='images/flag_fr.gif' <?php if($actual!="fr"){echo("style='opacity: .5;'"); } ?> /> |
|
268 <?php print $translate->_("Français"); ?></a></li> |
|
269 <li ><a href="<?php URL_ROOT ?>?lang=en" class="menuLink"> |
|
270 <img src='images/flag_en.gif' <?php if($actual!="en"){echo("style='opacity: .5;'"); } ?> /> |
|
271 <?php print $translate->_("Anglais"); ?></a></li> |
|
272 </ul> |
|
273 |
|
274 |
|
275 <div class="videoLive"> |
|
276 <div class="videoLivePlayer"> |
|
277 <img src="<?php echo($C_REP); ?>/images/big_visuel_rsln_mb.jpg" width="500" height="375" /> |
|
278 </div> |
|
279 |
|
280 </div> |
|
281 |
|
282 <div class="videoLiveProgram"> |
|
283 |
|
284 <div class="arrowContainer"> |
|
285 <div class="arrow"> </div> |
|
286 </div> |
|
287 <div class="videoLiveProgramTitle"> |
|
288 <b><?php echo($C_title); ?></b></div> |
|
289 <div class="videoLiveProgramDescription"> |
|
290 <br><?php echo($C_description); ?></div> |
|
291 |
|
292 |
|
293 </div> |
|
294 |
|
295 <div class="tweetWriter"> |
|
296 <h3 class="tweetWriterTitle"><?php print $translate->_("ClientTitle1 :"); ?></h3> |
|
297 <form action="tweet.php" method="post" id="statusform" > |
|
298 <?php if (!isset($_SESSION['TWITTER_ACCESS_TOKEN'])){ |
|
299 echo("<div class='loginbutton' ><a href='".URL_ROOT."?CONNECT=true' class='loginlink'> |
|
300 ".$translate->_("Vous n'êtes pas connecté.")."</a></div>"); |
|
301 }else{ |
|
302 echo("<textarea name='status' id='status' rows='3' cols='50' onkeypress='return imposemax(this);'>".$C_hashtag."</textarea>"); |
|
303 } |
|
304 ?> |
|
305 |
|
306 |
|
307 <div id="messageSuccess" style="background-color:lightgreen;"> |
|
308 <?php print $translate->_("Envoyé"); ?><br><br> |
|
309 </div> |
|
310 |
|
311 <div id="messageFailed" style="background-color:red;"> |
|
312 <?php print $translate->_("Erreur1"); ?><div id="error"> </div><br/><br> |
|
313 </div> |
|
314 |
|
315 |
|
316 |
|
317 <a class="button_w" href="#" id="sendTweet" style="float:right;margin-right:15px;margin-left:35px;width:70px;" > |
|
318 <span><?php print $translate->_("Envoyer"); ?></span></a> |
|
319 <!--<button name="s" type="button" id="sendTweet" |
|
320 style="float:right;margin-right:15px;margin-left:35px;width:70px;" >Envoyer</button>--> |
|
321 <a |
|
322 |
|
323 id="positive" |
|
324 title="accord" |
|
325 class="tweetButton">++</a> |
|
326 <a |
|
327 |
|
328 id="negative" |
|
329 title="désaccord" |
|
330 class="tweetButton">--</a> |
|
331 <a |
|
332 |
|
333 id="reference" |
|
334 title="reference" |
|
335 class="tweetButton">==</a> |
|
336 <a |
|
337 |
|
338 id="question" |
|
339 title="question" |
|
340 class="tweetButton"> ??</a> |
|
341 </form> |
|
342 </div> |
|
343 |
|
344 <div class="tweetReader"> |
|
345 <script> |
|
346 new TWTR.Widget({ |
|
347 version: 2, |
|
348 type: 'search', |
|
349 search: '<?php echo($C_hashtag); ?>', |
|
350 interval: 1000, |
|
351 title: '', |
|
352 subject: '', |
|
353 width: 377, |
|
354 height: 450, |
|
355 theme: { |
|
356 shell: { |
|
357 background: '#ffffff', |
|
358 color: '#ffffff' |
|
359 }, |
|
360 tweets: { |
|
361 background: '#ffffff', |
|
362 color: '#444444', |
|
363 links: '#1985b5' |
|
364 } |
|
365 }, |
|
366 features: { |
|
367 scrollbar: false, |
|
368 loop: true, |
|
369 live: true, |
|
370 hashtags: true, |
|
371 timestamp: true, |
|
372 avatars: true, |
|
373 toptweets: true, |
|
374 behavior: 'default' |
|
375 } |
|
376 }).render().start(); |
|
377 </script> |
|
378 </div> |
|
379 |
|
380 <div class="footer"> |
|
381 <hr> |
|
382 <?php |
|
383 echo($C_partenaires); |
|
384 |
|
385 if (isset($_SESSION['TWITTER_ACCESS_TOKEN'])){ |
|
386 echo("| <a href='clear.php' class='footerLink'>".$translate->_("Déconnexion")."</a>"); |
|
387 } |
|
388 ?> |
|
389 <input type="text" id="txt" size="3"/> |
|
390 |
|
391 </div> |
|
392 |
|
393 |
|
394 </div> |
|
395 |
|
396 <!-- LIGHTBOX --> |
|
397 <div style="display:none;"> |
|
398 <div id="Aboutbox" > |
|
399 <div class="lightBorder"> |
|
400 <div class="lightTitle" style="height:45px;"> </div> |
|
401 <div class="lightSubTitle"><?php print $translate->_("splatchPageTitle"); ?></div> |
|
402 <div class="lightDescription"><?php print $translate->_("splatchPageText"); ?></div> |
|
403 <div> |
|
404 <br/> |
|
405 <a class="button_b" href="#" id="IDENTIFIER"><span><?php print $translate->_("S'identifier"); ?></span></a> <br/><br/> |
|
406 <a class="button_w" href="#" id="ACCES"><span><?php print $translate->_("Libre accès"); ?></span></a> |
|
407 </div> |
|
408 </div> |
|
409 </div> |
|
410 </div> |
|
411 <!-- END LIGHTBOX --> |
|
412 |
|
413 |
|
414 </body> |
|
415 </html> |