11 // objet actuel |
11 // objet actuel |
12 $baseurl = URL_ROOT; |
12 $baseurl = URL_ROOT; |
13 |
13 |
14 $div_height = 640; |
14 $div_height = 640; |
15 if($translate->_('config__div_height') != 'config__div_height') { |
15 if($translate->_('config__div_height') != 'config__div_height') { |
16 $div_height = $translate->_('config__div_height'); |
16 $div_height = $translate->_('config__div_height'); |
17 } |
17 } |
18 $tweet_explain_background = URL_ROOT.'images/tweetExplainBgd.gif'; |
18 $tweet_explain_background = URL_ROOT.'images/tweetExplainBgd.gif'; |
19 if(file_exists(dirname(__FILE__)."/$rep/images/tweetExplainBgd.gif")) { |
19 if(file_exists(dirname(__FILE__)."/$rep/images/tweetExplainBgd.gif")) { |
20 $tweet_explain_background = URL_ROOT.$rep.'/images/tweetExplainBgd.gif'; |
20 $tweet_explain_background = URL_ROOT.$rep.'/images/tweetExplainBgd.gif'; |
21 } |
21 } |
22 |
22 |
23 $head_logo = URL_ROOT."$rep/images/head_logo.gif"; |
23 $head_logo = URL_ROOT."$rep/images/head_logo.gif"; |
24 if($translate->_('config__head_logo') != 'config__head_logo' && $translate->_('config__head_logo') != null ) { |
24 if($translate->_('config__head_logo') != 'config__head_logo' && $translate->_('config__head_logo') != null ) { |
25 $head_logo = URL_ROOT."$rep/".$translate->_('config__head_logo'); |
25 $head_logo = URL_ROOT."$rep/".$translate->_('config__head_logo'); |
26 } |
26 } |
27 |
27 |
28 $url = (!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; |
28 $url = (!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; |
|
29 |
|
30 $protocol_level = ( |
|
31 isset($_REQUEST['protocol_level']) |
|
32 ? $_REQUEST['protocol_level'] |
|
33 : ( |
|
34 isset($config['protocol_level']) |
|
35 ? $config['protocol_level'] |
|
36 : 3 |
|
37 ) |
|
38 ); |
|
39 |
|
40 $protocol_level = min(3,max(0, $protocol_level)); |
|
41 |
|
42 $use_protocol = (isset($_REQUEST['protocol_level']) || isset($config['protocol_level'])); |
|
43 |
|
44 if ($use_protocol && !isset($_SESSION['answered_events'])) { |
|
45 $_SESSION['answered_events'] = array(); |
|
46 } |
|
47 |
|
48 $show_splash = ( $use_protocol && !in_array($rep, $_SESSION['answered_events']) ); |
|
49 |
|
50 if ($show_splash) { |
|
51 array_push($_SESSION['answered_events'], $rep); |
|
52 } |
29 |
53 |
30 ?> |
54 ?> |
31 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
55 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
32 <html lang="<?php echo($actual); ?>"> |
56 <html lang="<?php echo($actual); ?>"> |
33 <head> |
57 <head> |
34 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
58 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
35 <title>Polemic tweet - <?php echo($translate->_('config__title')); ?></title> |
59 <title>Polemic tweet - <?php echo($translate->_('config__title')); ?></title> |
36 <meta name="keywords" content="<?php echo($translate->_('config__keywords')); ?>"><!-- add timestampedmetadata --> |
60 <meta name="keywords" content="<?php echo($translate->_('config__keywords')); ?>"><!-- add timestampedmetadata --> |
37 <!--<meta name="description" content="PoelmicTweet.fr : debate mapping, opinion, conference, video">--> |
61 <!--<meta name="description" content="PoelmicTweet.fr : debate mapping, opinion, conference, video">--> |
38 <meta name="description" content="<?php echo(strip_tags($translate->_('config__description'))); ?>"> |
62 <meta name="description" content="<?php echo(strip_tags($translate->_('config__description'))); ?>"> |
39 <meta name="robots" content="index, follow"> |
63 <meta name="robots" content="index, follow"> |
40 |
64 |
41 <!-- ICI : <?php echo($_SERVER['DOCUMENT_ROOT']); ?> --> |
65 <!-- ICI : <?php echo($_SERVER['DOCUMENT_ROOT']); ?> --> |
42 <!-- JAVASCRIPT --> |
66 <!-- JAVASCRIPT --> |
43 <script type="text/javascript" src="<?php echo(registry_url('json-js','js'));?>"></script> |
67 <script type="text/javascript" src="<?php echo(registry_url('json-js','js'));?>"></script> |
44 <script type="text/javascript" src="<?php echo(registry_url('jquery','js'));?>"></script> |
68 <script type="text/javascript" src="<?php echo(registry_url('jquery','js'));?>"></script> |
45 <script type="text/javascript"> |
69 <script type="text/javascript"> |
46 $.noConflict(); |
70 $.noConflict(); |
47 </script> |
71 </script> |
48 <script type="text/javascript" src="<?php echo(registry_url('fancybox','js'));?>"></script> |
72 <script type="text/javascript" src="<?php echo(registry_url('fancybox','js'));?>"></script> |
49 <script type="text/javascript" src="<?php echo(registry_url('jquery-url','js'));?>"></script> |
73 <script type="text/javascript" src="<?php echo(registry_url('jquery-url','js'));?>"></script> |
50 <script type="text/javascript" src="<?php echo(registry_url('metadataplayer','js'));?>"></script> |
74 <script type="text/javascript" src="<?php echo(registry_url('metadataplayer','js'));?>"></script> |
51 |
75 <script type="text/javascript" src="<?php echo(registry_url('tracemanager','js'));?>"></script> |
52 <!-- Framework CSS --> |
76 |
53 <link rel="stylesheet" href="<?php echo(registry_url('tweetcast','css'));?>?v=210512" type="text/css" media="screen, projection"/> |
77 <!-- Framework CSS --> |
54 <link rel="stylesheet" href="<?php echo(registry_url('fancybox','css'));?>" media="screen"/> |
78 <link rel="stylesheet" href="<?php echo(registry_url('tweetcast','css'));?>?v=11072012" type="text/css" media="screen, projection"/> |
55 |
79 <link rel="stylesheet" href="<?php echo(registry_url('fancybox','css'));?>" media="screen"/> |
56 <!-- FONT --> |
80 |
57 <link href='<?php echo(registry_url('PT-Sans_Narrow','font'));?>' rel='stylesheet' type='text/css'/> |
81 <!-- FONT --> |
58 <link href='<?php echo(registry_url('PT-Sans','font'));?>' rel='stylesheet' type='text/css'/> |
82 <link href='<?php echo(registry_url('PT-Sans_Narrow','font'));?>' rel='stylesheet' type='text/css'/> |
59 |
83 <link href='<?php echo(registry_url('PT-Sans','font'));?>' rel='stylesheet' type='text/css'/> |
60 |
84 |
61 <script type="text/javascript"> |
85 |
62 // Configuration Polemical Timeline |
86 <script type="text/javascript"> |
63 if (typeof jQuery == "undefined") { |
87 // Configuration Polemical Timeline |
64 jQuery = IriSP.jQuery; |
88 if (typeof jQuery == "undefined") { |
65 } |
89 jQuery = IriSP.jQuery; |
66 <?php |
90 } |
67 if(is_array($translate->_('config__metadata'))): |
91 <?php |
68 reset($translate->_('config__metadata')); |
92 if(is_array($translate->_('config__metadata'))): |
69 $first_key = key($translate->_('config__metadata')); |
93 reset($translate->_('config__metadata')); |
70 ?> |
94 $first_key = key($translate->_('config__metadata')); |
71 var metadatas = jQuery.parseJSON('<?php echo(json_encode($translate->_('config__metadata'))); ?>'); |
95 ?> |
72 var url = jQuery.url(); |
96 var metadatas = jQuery.parseJSON('<?php echo(json_encode($translate->_('config__metadata'))); ?>'); |
73 var metadata_key = url.fparam('metadata'); |
97 var url = jQuery.url(); |
74 if(typeof metadata_key === "undefined" || metadata_key.length === 0) { |
98 var metadata_key = url.fparam('metadata'); |
75 metadata_key = "<?php echo($first_key);?>"; |
99 if(typeof metadata_key === "undefined" || metadata_key.length === 0) { |
76 } |
100 metadata_key = "<?php echo($first_key);?>"; |
77 <?php else: ?> |
101 } |
78 var metadatas = { metadata: {url: "<?php echo($translate->_('config__metadata'));?>"} }; |
102 <?php else: ?> |
79 var metadata_key = "metadata"; |
103 var metadatas = { metadata: {url: "<?php echo($translate->_('config__metadata'));?>"} }; |
80 <?php endif;?> |
104 var metadata_key = "metadata"; |
81 |
105 <?php endif;?> |
82 |
106 |
|
107 var _tracer = tracemanager.init_trace("test", { |
|
108 url: "http://traces.advene.org:5000/", |
|
109 requestmode: "GET", |
|
110 syncmode: "sync", |
|
111 default_subject: "PolemicTweet" |
|
112 }); |
|
113 _tracer.trace("Pt_LoadPage", { |
|
114 protocol_level: <?php echo $protocol_level; ?>, |
|
115 url: document.location.href |
|
116 }); |
|
117 |
83 IriSP.libFiles.defaultDir = "<?php echo(registry_url('libdir','js'));?>"; |
118 IriSP.libFiles.defaultDir = "<?php echo(registry_url('libdir','js'));?>"; |
84 IriSP.widgetsDir = "<?php echo(registry_url('ldtwidgets','js'));?>"; |
119 IriSP.widgetsDir = "<?php echo(registry_url('ldtwidgets','js'));?>"; |
85 IriSP.libFiles.locations.jwPlayerSWF = "<?php echo(URL_ROOT); ?>res/mediaplayer/player.swf"; |
120 IriSP.libFiles.locations.jwPlayerSWF = "<?php echo(URL_ROOT); ?>res/mediaplayer/player.swf"; |
86 IriSP.language = "<?php echo($actual) ?>"; |
121 IriSP.language = "<?php echo($actual) ?>"; |
87 |
122 |
88 var _metadata = { |
123 var _metadata = { |
89 url: metadatas[metadata_key].url + '?callback=?', |
124 url: metadatas[metadata_key].url + '?callback=?', |
90 format: 'ldt' |
125 format: 'ldt' |
91 }; |
126 }; |
|
127 var _protocol_level = <?php echo $protocol_level; ?>; |
92 var _config = { |
128 var _config = { |
93 gui: { |
129 gui: { |
94 width: 600, |
130 width: 600, |
95 height: 800, |
131 height: 800, |
96 container: 'LdtPlayer', |
132 container: 'LdtPlayer', |
97 default_options: { |
133 default_options: { |
98 metadata: _metadata |
134 metadata: _metadata |
99 }, |
135 }, |
100 css:'<?php echo(registry_url('metadataplayer','css'));?>', |
136 css:'<?php echo(registry_url('metadataplayer','css'));?>', |
101 widgets: [ |
137 widgets: [ |
102 <?php |
138 <?php if ($protocol_level > 1): ?> |
103 if (!isset($config['protocol_level']) || $config['protocol_level'] > 1) { |
139 { |
104 echo '{ type: "Polemic"'; |
140 type: "Polemic" |
105 if (isset($config['protocol_level']) && $config['protocol_level'] < 3) { |
141 <?php if ($protocol_level < 3): ?> |
106 echo ', polemics: []'; |
142 , |
107 } |
143 polemics: [] |
108 echo '},'; |
144 <?php endif; ?> |
109 } |
145 }, |
110 ?> |
146 <?php endif; ?> |
111 { type: "Slider" }, |
147 { type: "Slider" }, |
112 { |
148 { |
113 type: "Controller", |
149 type: "Controller", |
114 disable_annotate_btn: true |
150 disable_annotate_btn: true |
115 }, |
151 }, |
|
152 <?php if ($protocol_level > 1): ?> |
116 { |
153 { |
117 type: "Segments", |
154 type: "Segments", |
118 annotation_type: [ "chap", "découpage" ] |
155 annotation_type: [ "chap", "découpage" ] |
119 }, |
156 }, |
120 { type: "Arrow" }, |
157 { type: "Arrow" }, |
132 { |
169 { |
133 type: "AnnotationsList", |
170 type: "AnnotationsList", |
134 //ajax_url : "http://ldt.iri.centrepompidou.fr/ldtplatform/api/ldt/segments/{{media}}/{{begin}}/{{end}}?callback=?", |
171 //ajax_url : "http://ldt.iri.centrepompidou.fr/ldtplatform/api/ldt/segments/{{media}}/{{begin}}/{{end}}?callback=?", |
135 //foreign_url : "http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/front/player/{{media}}/{{project}}/{{annotationType}}#id={{annotation}}", |
172 //foreign_url : "http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/front/player/{{media}}/{{project}}/{{annotationType}}#id={{annotation}}", |
136 container: "AnnotationsListContainer" |
173 container: "AnnotationsListContainer" |
137 }, |
174 <?php if ($protocol_level < 3): ?> |
|
175 , |
|
176 polemics: [] |
|
177 <?php endif; ?> |
|
178 }, |
|
179 <?php endif; ?> |
138 { type: "Mediafragment"}, |
180 { type: "Mediafragment"}, |
139 { |
181 { |
140 type: "Trace", |
182 type: "Trace", |
141 default_subject: "Polemic" |
183 tracer: _tracer |
142 } |
184 } |
143 ] |
185 ] |
144 }, |
186 }, |
145 player:{ |
187 player:{ |
146 type:'jwplayer', // player type |
188 type:'jwplayer', // player type |
147 live: true, |
189 live: true, |
148 height: 360, |
190 height: 360, |
149 width: 600, |
191 width: 600, |
150 provider: "rtmp", |
192 provider: "rtmp", |
151 autostart: true, |
|
152 metadata: _metadata |
193 metadata: _metadata |
153 } |
194 } |
154 }; |
195 }; |
155 |
196 |
156 jQuery(document).ready(function() { |
197 |
157 |
198 jQuery(document).ready(function() { |
158 jQuery("#mdselect_"+metadata_key).attr("selected","selected"); |
199 |
159 jQuery("#mdselect").change(function() { |
200 <?php if ($show_splash): ?> |
160 var metadata_key = this.options[this.selectedIndex].value; |
201 var _fancybox = jQuery.fancybox; |
161 window.location.hash = "#metadata="+metadata_key; |
202 jQuery.fancybox( |
162 window.location.href = window.location.href; |
203 jQuery("#splash").html(), |
163 window.location.reload(true); |
204 { |
164 jQuery(".embedbutton").attr('href','<?php echo(URL_ROOT.$rep);?>/embed_form.php?metadata='+metadata_key); |
205 width: 500, |
165 }); |
206 modal: true, |
166 if(metadata_key !== "metadata") { |
207 closeBtn: false |
167 jQuery(".embedbutton").attr('href','<?php echo(URL_ROOT.$rep);?>/embed_form.php?metadata='+metadata_key); |
208 }); |
168 } |
209 |
169 jQuery(".embedbutton").fancybox({ |
210 jQuery("#fancybox-content form").submit(function() { |
170 'width' : 360, |
211 _fancybox.close(); |
171 'height' : 360, |
212 var _checkboxes = jQuery("#fancybox-content .checkbox:checked").map(function() { return this.value }), |
172 'autoDimensions' : false, |
213 _data = { |
173 'transitionIn' : 'none', |
214 eventLink: _checkboxes, |
174 'transitionOut' : 'none', |
215 eMail: jQuery("#fancybox-content .eMail").val(), |
175 'type' : 'iframe' |
216 twitterHandle: jQuery("#fancybox-content .twitterHandle").val(), |
176 }); |
217 protocolLevel: _protocol_level |
177 jQuery(".acctitre").click(function() { |
218 } |
178 var _nx = jQuery(this).next(); |
219 _tracer.trace("Pt_SendForm", _data); |
179 if (_nx.is(":hidden")) { |
220 return false; |
180 jQuery(".acctexte").slideUp(); |
221 }); |
181 _nx.slideDown(); |
222 <?php endif; ?> |
182 } |
223 |
183 }) |
224 jQuery("#mdselect_"+metadata_key).attr("selected","selected"); |
184 |
225 jQuery("#mdselect").change(function() { |
185 }); |
226 var metadata_key = this.options[this.selectedIndex].value; |
186 </script> |
227 window.location.hash = "#metadata="+metadata_key; |
187 <script type="text/javascript"> |
228 window.location.href = window.location.href; |
188 var _gaq = _gaq || []; |
229 window.location.reload(true); |
189 _gaq.push(['_setAccount', 'UA-23581291-1']); |
230 jQuery(".embedbutton").attr('href','<?php echo(URL_ROOT.$rep);?>/embed_form.php?metadata='+metadata_key); |
190 _gaq.push(['_trackPageview', location.pathname + location.search + location.hash]); |
231 }); |
191 _gaq.push(['_setAllowAnchor', true]); |
232 if(metadata_key !== "metadata") { |
192 |
233 jQuery(".embedbutton").attr('href','<?php echo(URL_ROOT.$rep);?>/embed_form.php?metadata='+metadata_key); |
193 (function() { |
234 } |
194 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; |
235 jQuery(".embedbutton").fancybox({ |
195 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; |
236 'width' : 360, |
196 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); |
237 'height' : 360, |
197 })(); |
238 'autoDimensions' : false, |
198 </script> |
239 'transitionIn' : 'none', |
|
240 'transitionOut' : 'none', |
|
241 'type' : 'iframe' |
|
242 }); |
|
243 jQuery(".embedbutton").click(function() { |
|
244 _tracer.trace("Pt_EmbedButtonClicked"); |
|
245 }); |
|
246 jQuery(".acctitre").click(function() { |
|
247 var _nx = jQuery(this).next(); |
|
248 if (_nx.is(":hidden")) { |
|
249 jQuery(".acctexte").slideUp(); |
|
250 _nx.slideDown(); |
|
251 } |
|
252 }) |
|
253 |
|
254 }); |
|
255 </script> |
|
256 <script type="text/javascript"> |
|
257 var _gaq = _gaq || []; |
|
258 _gaq.push(['_setAccount', 'UA-23581291-1']); |
|
259 _gaq.push(['_trackPageview', location.pathname + location.search + location.hash]); |
|
260 _gaq.push(['_setAllowAnchor', true]); |
|
261 |
|
262 (function() { |
|
263 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; |
|
264 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; |
|
265 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); |
|
266 })(); |
|
267 </script> |
199 </head> |
268 </head> |
200 <body> |
269 <body> |
201 <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 <div id="sendUsFeedBack"><a href="<?php echo($C_feedback_form_url); ?>" target="_blank"><img src="<?php echo(URL_ROOT); ?>images/sendusfeedback.png"></a></div> |
202 |
271 |
203 <!-- tooltip --> |
272 <!-- tooltip --> |
204 </div> |
273 </div> |
205 |
274 <div id="splash" style="display:none;"> |
|
275 <div class="splash"> |
|
276 <h1><?php echo $translate->_("Protocol_Head").$translate->_('config__title'); ?></h1> |
|
277 <p><?php echo $translate->_("Protocol_Subtitle"); ?></p> |
|
278 <?php echo $translate->_("Protocol_Explain_Level_".$protocol_level); ?> |
|
279 <hr /> |
|
280 <h2><?php echo $translate->_("Protocol_Questions_Head"); ?></h2> |
|
281 <form> |
|
282 <h3><?php echo $translate->_("Protocol_Questions_Part_1_prefix").$translate->_('config__title').$translate->_("Protocol_Questions_Part_1_suffix"); ?></h3> |
|
283 <ul> |
|
284 <li><input class="checkbox" type="checkbox" value="wasThere"/><?php echo $translate->_("Protocol_Answer_WasThere"); ?></li> |
|
285 <li><input class="checkbox" type="checkbox" value="watchedStream"/><?php echo $translate->_("Protocol_Answer_WatchedStream"); ?></li> |
|
286 <li><input class="checkbox" type="checkbox" value="liveTweeted"/><?php echo $translate->_("Protocol_Answer_liveTweeted"); ?></li> |
|
287 <li><input class="checkbox" type="checkbox" value="none"/><?php echo $translate->_("Protocol_Answer_none"); ?></li> |
|
288 </ul> |
|
289 <h3><?php echo $translate->_("Protocol_Questions_Part_2"); ?></h3> |
|
290 <ul> |
|
291 <li><label><?php echo $translate->_("Protocol_Answer_Mail"); ?></label><input class="eMail" name="eMail" /></li> |
|
292 <li><label><?php echo $translate->_("Protocol_Answer_Twitter"); ?></label><input class="twitterHandle" name="twitterHandle" /></li> |
|
293 </ul> |
|
294 <input type="submit" value="<?php echo $translate->_("Protocol_Submit_Label"); ?>" class="submit" /> |
|
295 </form> |
|
296 </div> |
|
297 </div> |
206 <div id="container"> |
298 <div id="container"> |
207 <div class="barre"> |
299 <div class="barre"> |
208 <img id="headlogo" src="<?php echo($head_logo); ?>" width="171" height="63" /> |
300 <img id="headlogo" src="<?php echo($head_logo); ?>" width="171" height="63" /> |
209 <div id="minilogo"></div> |
301 <div id="minilogo"></div> |
210 <ul class="menu"> |
302 <ul class="menu"> |