|
1 <?php |
|
2 |
|
3 /** |
|
4 * include some common code (like we did in the 90s) |
|
5 * People still do this? ;) |
|
6 */ |
|
7 $rep = $_REQUEST['rep']; |
|
8 include_once dirname(__FILE__).'/'.$rep.'/config.php'; |
|
9 // configuration |
|
10 include 'common.php'; |
|
11 // objet actuel |
|
12 $baseurl = URL_ROOT; |
|
13 |
|
14 $div_height = 640; |
|
15 if(isset($config['div_height'])) { |
|
16 $div_height = $config['div_height']; |
|
17 } |
|
18 $tweet_explain_background = URL_ROOT.'images/tweetExplainBgd.gif'; |
|
19 if(file_exists($rep.'/images/tweetExplainBgd.gif')) { |
|
20 $tweet_explain_background = URL_ROOT.$rep.'/images/tweetExplainBgd.gif'; |
|
21 } |
|
22 |
|
23 |
|
24 $url = (!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; |
|
25 |
|
26 ?> |
|
27 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
|
28 <html lang="<?php echo($actual); ?>"> |
|
29 <head> |
|
30 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
|
31 <title>Polemic tweet - <?php echo($config['title']); ?></title> |
|
32 <meta name="keywords" content="<?php echo($config['keywords']); ?>"><!-- add timestampedmetadata --> |
|
33 <!--<meta name="description" content="PoelmicTweet.fr : debate mapping, opinion, conference, video">--> |
|
34 <meta name="description" content="<?php echo($config['description']); ?>"> |
|
35 <meta name="robots" content="index, follow"> |
|
36 |
|
37 <!-- ICI : <?php echo($_SERVER['DOCUMENT_ROOT']); ?> --> |
|
38 <!-- JAVASCRIPT --> |
|
39 <script type="text/javascript" src="<?php echo(registry_url('jquery','js'));?>"></script> |
|
40 <script type="text/javascript"> |
|
41 $.noConflict(); |
|
42 </script> |
|
43 <script type="text/javascript" src="<?php echo(registry_url('raphael','js'));?>"></script> |
|
44 <script type="text/javascript" src="<?php echo(registry_url('fancybox','js'));?>"></script> |
|
45 <script type="text/javascript" src="<?php echo(registry_url('niceforms','js'));?>"></script> |
|
46 <script type="text/javascript" src="<?php echo(registry_url('jquery-url','js'));?>"></script> |
|
47 <script type="text/javascript" src="<?php echo(registry_url('ldtplayer','js'));?>"></script> |
|
48 |
|
49 <!-- Framework CSS --> |
|
50 <link rel="stylesheet" href="<?php echo($baseurl) ?>res/blueprint/screen.css" type="text/css" media="screen, projection"> |
|
51 <link rel="stylesheet" href="<?php echo($baseurl) ?>res/blueprint/print.css" type="text/css" media="print"> |
|
52 <link rel="stylesheet" href="<?php echo($baseurl) ?>res/blueprint/plugins/fancy-type/screen.css" type="text/css" media="screen, projection"> |
|
53 <link rel="stylesheet" href="<?php echo($baseurl) ?>res/css/custom.css" type="text/css" media="screen, projection"> |
|
54 <link rel="stylesheet" href="<?php echo($baseurl) ?>res/jquery.fancybox/fancybox/jquery.fancybox-1.3.4.css" media="screen"> |
|
55 |
|
56 <!-- FONT --> |
|
57 <link href='<?php echo(registry_url('PT-Sans_Narrow','font'));?>' rel='stylesheet' type='text/css'> |
|
58 <link href='<?php echo(registry_url('PT-Sans','font'));?>' rel='stylesheet' type='text/css'> |
|
59 <link href='<?php echo(registry_url('Geo','font'));?>' rel='stylesheet' type='text/css'> |
|
60 |
|
61 <style type="text/css"> |
|
62 .tweetButton{float:left;margin-right:5px;} |
|
63 .videoLivePlayer{border:1px solid #c3c3c3;width:650px;height:<?php echo($div_height-2);?>px;} |
|
64 .videoLive{width:650px;height:<?php echo($div_height); ?>px;background:#fff;float:right;margin-top:20px;padding:5px;} |
|
65 .tweetExplain{background-image:url(<?php echo($tweet_explain_background);?>);width:250px;height:<?php echo($div_height)?>px;padding:10px;position:absolute; margin-top:70px;} |
|
66 .footer{margin-top:<?php echo($div_height+100);?>px;width:960px;height:20px;position:absolute;text-align:center;} |
|
67 .tooltip{ |
|
68 z-index: 10000000000; |
|
69 } |
|
70 #tip{ |
|
71 position : absolute; |
|
72 padding : 3px; |
|
73 z-index: 10000000000; |
|
74 max-width: 200px; |
|
75 } |
|
76 #tip { |
|
77 display: none; |
|
78 background: transparent url("<?php echo($baseurl);?>images/white_arrow_long.png"); |
|
79 font-size: 12px; |
|
80 height: 125px; |
|
81 width: 180px; |
|
82 padding: 10px; |
|
83 padding-left: 15px; |
|
84 padding-top: 15px; |
|
85 padding-right: 15px; |
|
86 color: black; |
|
87 z-index: 10000000000; |
|
88 font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif"; |
|
89 overflow:hidden; |
|
90 } |
|
91 #chartTimeline{ |
|
92 padding-top: 0px; |
|
93 z-index: 9; |
|
94 position : absolute; |
|
95 } |
|
96 |
|
97 </style> |
|
98 <script type="text/javascript"> |
|
99 // Configuration Polemical Timeline |
|
100 <?php |
|
101 if(is_array($config['metadata'])): |
|
102 reset($config['metadata']); |
|
103 $first_key = key($config['metadata']); |
|
104 ?> |
|
105 var metadatas = jQuery.parseJSON('<?php echo(json_encode($config['metadata'])); ?>'); |
|
106 var url = jQuery.url(); |
|
107 var metadata_key = url.fparam('metadata'); |
|
108 if(typeof metadata_key === "undefined" || metadata_key.length === 0) { |
|
109 metadata_key = "<?php echo($first_key);?>"; |
|
110 } |
|
111 <?php else: ?> |
|
112 var metadatas = { metadata: {url: "<?php echo($config['metadata']);?>", duration: <?php echo($config['duration'])?>} }; |
|
113 var metadata_key = "metadata"; |
|
114 <?php endif;?> |
|
115 |
|
116 var config = { |
|
117 target:"chartTimeline", |
|
118 x:8, |
|
119 y:418, |
|
120 width:<?php echo($config['player_width']); ?>, |
|
121 height:<?php echo($config['player_height']); ?>, |
|
122 heightmax:<?php echo($config['player_height']); ?>, |
|
123 duration:metadatas[metadata_key].duration, |
|
124 metadata:metadatas[metadata_key].url |
|
125 }; |
|
126 </script> |
|
127 <script type='text/javascript' src='<?php echo(URL_ROOT);?>res/metadataplayer.polemic/src/js/polemic.js'></script> |
|
128 <script type="text/javascript"> |
|
129 jQuery.extend(__IriSP.lib,{jQueryToolTip:"<?php echo(URL_ROOT);?>res/metadataplayer/res/js/jquery.tools.min.js"}); |
|
130 jQuery(document).ready(function() { |
|
131 |
|
132 jQuery("#mdselect_"+metadata_key).attr("selected","selected"); |
|
133 jQuery("#mdselect").change(function() { |
|
134 var metadata_key = this.options[this.selectedIndex].value; |
|
135 window.location.hash = "#metadata="+metadata_key; |
|
136 window.location.href = window.location.href; |
|
137 window.location.reload(true); |
|
138 jQuery("#Embeded").attr('href','<?php echo(URL_ROOT.$rep);?>/embed_form.php?metadata='+metadata_key); |
|
139 }); |
|
140 if(metadata_key !== "metadata") { |
|
141 jQuery("#Embeded").attr('href','<?php echo(URL_ROOT.$rep);?>/embed_form.php?metadata='+metadata_key); |
|
142 } |
|
143 jQuery("#Embeded").fancybox({ |
|
144 'width' : 360, |
|
145 'height' : 360, |
|
146 'autoDimensions' : false, |
|
147 'transitionIn' : 'none', |
|
148 'transitionOut' : 'none', |
|
149 'type' : 'iframe' |
|
150 }); |
|
151 |
|
152 }); |
|
153 </script> |
|
154 <script type="text/javascript"> |
|
155 var _gaq = _gaq || []; |
|
156 _gaq.push(['_setAccount', 'UA-23581291-1']); |
|
157 _gaq.push(['_trackPageview']); |
|
158 |
|
159 (function() { |
|
160 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; |
|
161 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; |
|
162 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); |
|
163 })(); |
|
164 </script> |
|
165 </head> |
|
166 <body> |
|
167 |
|
168 |
|
169 <!-- tooltip --> |
|
170 <div id="tip"> |
|
171 <div id="tipcolor" style="height:10px;width:10px"></div> |
|
172 <div id="tiptext"></div> |
|
173 </div> |
|
174 |
|
175 <div class="container"> |
|
176 <img src="<?php echo($config['head_logo']);?>" class="logo"> |
|
177 <ul class="menu"> |
|
178 <li class="menuUnderline"><a href="<?php echo(URL_ROOT)?>" class="menuLink" id="Accueil"> |
|
179 <?php print $translate->_("Accueil"); ?></a></li> |
|
180 <li class="menuUnderline"><a href="<?php echo(URL_ROOT.$rep)?>/embed_form.php" class="menuLink" id="Embeded"> |
|
181 <?php print $translate->_("Partager"); ?></a></li> |
|
182 <li > </li> |
|
183 </ul> |
|
184 <ul class="menu"> |
|
185 <li class="menuUnderline"><a href="<?php echo(URL_ROOT); ?>archives.php" class="menuLink"> |
|
186 <?php print $translate->_("Archives"); ?></a></li> |
|
187 </ul> |
|
188 |
|
189 <?php if(is_array($config['metadata'])):?> |
|
190 <ul id="content_select_ul" class="menu mdselect"> |
|
191 <?php print $translate->_("changer de contenu"); ?><br/> |
|
192 <select id="mdselect"> |
|
193 <?php foreach ($config['metadata'] as $key => $value):?> |
|
194 <option value="<?php echo($key); ?>" id="mdselect_<?php echo($key); ?>" ><?php echo($value['display']); ?></option> |
|
195 <?php endforeach;?> |
|
196 </select> |
|
197 </ul> |
|
198 <ul class="menu shortlang" > |
|
199 <?php else:?> |
|
200 <ul class="menu lang" > |
|
201 <?php endif;?> |
|
202 <li class="menuUnderline"><a href="<?php echo(URL_ROOT.$rep) ?>/polemicaltimeline.php?lang=ja_JP" class="menuLink" > |
|
203 <img src='../images/flag_jp.gif'<?php if($actual!="ja_JP"){echo("style='opacity: .5;'"); } ?> /> |
|
204 <?php print $translate->_("Japonais"); ?></a></li> |
|
205 <li class="menuUnderline"><a href="<?php echo(URL_ROOT.$rep) ?>/polemicaltimeline.php?lang=fr" class="menuLink"> |
|
206 <img src='../images/flag_fr.gif' <?php if($actual!="fr"){echo("style='opacity: .5;'"); } ?> /> |
|
207 <?php print $translate->_("Français"); ?></a></li> |
|
208 <li ><a href="<?php echo(URL_ROOT.$rep) ?>/polemicaltimeline.php?lang=en" class="menuLink"> |
|
209 <img src='../images/flag_en.gif' <?php if($actual!="en"){echo("style='opacity: .5;'"); } ?> /> |
|
210 <?php print $translate->_("Anglais"); ?></a></li> |
|
211 </ul> |
|
212 |
|
213 <!-- EXPLICATION --> |
|
214 <div class="tweetExplain" > |
|
215 <h3 class="tweetWriterTitle"><?php print $translate->_("ClientTitle1 :"); ?> </h3><br/> |
|
216 <?php print $translate->_("ExplicationPT"); ?> |
|
217 </div> |
|
218 |
|
219 |
|
220 <!-- INFOS SUR LA CONF |
|
221 <div class="tweetExplain" > |
|
222 <h3 class="tweetWriterTitle"><?php echo($config['title']); ?></h3><br/> |
|
223 <?php echo($config['description']); ?> |
|
224 </div> |
|
225 --> |
|
226 |
|
227 |
|
228 |
|
229 |
|
230 <div class="videoLive" > |
|
231 <div class="videoLivePlayer"> |
|
232 <div id="chartTimeline"> </div> |
|
233 <script type="text/javascript"> |
|
234 var paper = Raphael(document.getElementById("chartTimeline"),config.width, config.height); |
|
235 </script> |
|
236 <div id="player_project_embed" class="iri_player_embed"></div> |
|
237 <script type="text/javascript"> |
|
238 var configMP = { |
|
239 metadata:{ |
|
240 format:'cinelab', |
|
241 src:config.metadata, |
|
242 load:'jsonp'}, |
|
243 gui:{ |
|
244 width:config.width, |
|
245 height:config.height, |
|
246 mode:'video', |
|
247 container:'player_project_embed', |
|
248 debug:false, |
|
249 css:'../res/css/LdtPlayer.css'}, |
|
250 |
|
251 player:{ |
|
252 type:'jwplayer', |
|
253 src:'../res/metadataplayer/res/swf/player.swf'} |
|
254 }; |
|
255 __IriSP.init(configMP); |
|
256 </script> |
|
257 </div> |
|
258 </div> |
|
259 |
|
260 |
|
261 <div class="footer"> |
|
262 <hr> |
|
263 <?php echo($config['partenaires']); ?> |
|
264 </div> |
|
265 |
|
266 </div> |
|
267 |
|
268 </body> |
|
269 </html> |