web/polemicaltimeline.php
changeset 779 e13084ff318b
parent 778 525f00c2d6ac
child 852 957175538495
equal deleted inserted replaced
778:525f00c2d6ac 779:e13084ff318b
   106     <?php endif;?>
   106     <?php endif;?>
   107     var _protocol_level = _protocol_level,
   107     var _protocol_level = _protocol_level,
   108         _cookiematches = document.cookie.match(/PHPSESSID=([A-Za-z0-9]+)/),
   108         _cookiematches = document.cookie.match(/PHPSESSID=([A-Za-z0-9]+)/),
   109         _cookie = (_cookiematches && _cookiematches.length > 1 ? _cookiematches[1] : undefined);
   109         _cookie = (_cookiematches && _cookiematches.length > 1 ? _cookiematches[1] : undefined);
   110 
   110 
   111 <?php if ($use_protocol): ?>
       
   112     var _tracer = tracemanager.init_trace("test", {
   111     var _tracer = tracemanager.init_trace("test", {
   113             url: "http://traces.advene.org:5000/",
   112             url: "http://trail.dev.fabelier.org/",
   114             requestmode: "GET",
   113             requestmode: "GET",
   115             syncmode: "sync",
   114             syncmode: "sync",
   116             default_subject: "PolemicTweet"
   115             default_subject: "PolemicTweet"
   117         });
   116         });
   118     _tracer.trace("Pt_LoadPage", {
   117     _tracer.trace("Pt_LoadPage", {
   119         url: document.location.href,
   118         cookie: _cookie,
   120         protocol_level: <?php echo $protocol_level; ?>,
   119         url: document.location.href
   121         cookie: _cookie
       
   122     });
   120     });
   123 <?php endif; ?>
       
   124     
   121     
   125     IriSP.libFiles.defaultDir = "<?php echo(registry_url('libdir','js'));?>";
   122     IriSP.libFiles.defaultDir = "<?php echo(registry_url('libdir','js'));?>";
   126     IriSP.widgetsDir = "<?php echo(registry_url('ldtwidgets','js'));?>";
   123     IriSP.widgetsDir = "<?php echo(registry_url('ldtwidgets','js'));?>";
   127     IriSP.libFiles.locations.jwPlayerSWF = "<?php echo(URL_ROOT); ?>res/mediaplayer/player.swf";
   124     IriSP.libFiles.locations.jwPlayerSWF = "<?php echo(URL_ROOT); ?>res/mediaplayer/player.swf";
   128     IriSP.language = "<?php echo($actual) ?>";
   125     IriSP.language = "<?php echo($actual) ?>";
   162                 type: "Controller",
   159                 type: "Controller",
   163                 disable_annotate_btn: true
   160                 disable_annotate_btn: true
   164             },
   161             },
   165 <?php if ($protocol_level > 1): ?>
   162 <?php if ($protocol_level > 1): ?>
   166             {
   163             {
   167                 type: "MultiSegments"
   164                 type: "Segments",
       
   165                 annotation_type: "chap"
       
   166             },
       
   167             {
       
   168                 type: "Annotation",
       
   169                 annotation_type: "chap"
   168             },
   170             },
   169             { type: "Tweet" },
   171             { type: "Tweet" },
   170 <?php if (!$use_protocol): ?>
       
   171             {
   172             {
   172                 type: "Tagcloud",
   173                 type: "Tagcloud",
   173                 container: "TagcloudContainer",
   174                 container: "TagcloudContainer",
   174                 exclude_pattern: /^@/,
   175                 exclude_pattern: /^@/,
   175                 custom_stopwords: <?php echo json_encode(array($translate->_('config__hashtag'))) ?>
   176                 custom_stopwords: <?php echo json_encode(array($translate->_('config__hashtag'))) ?>
   178                 type: "AnnotationsList",
   179                 type: "AnnotationsList",
   179                 //ajax_url : "http://ldt.iri.centrepompidou.fr/ldtplatform/api/ldt/segments/{{media}}/{{begin}}/{{end}}?callback=?", 
   180                 //ajax_url : "http://ldt.iri.centrepompidou.fr/ldtplatform/api/ldt/segments/{{media}}/{{begin}}/{{end}}?callback=?", 
   180                 //foreign_url : "http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/front/player/{{media}}/{{project}}/{{annotationType}}#id={{annotation}}",
   181                 //foreign_url : "http://ldt.iri.centrepompidou.fr/ldtplatform/ldt/front/player/{{media}}/{{project}}/{{annotationType}}#id={{annotation}}",
   181                 container: "AnnotationsListContainer"
   182                 container: "AnnotationsListContainer"
   182             },
   183             },
   183 /*            {
       
   184                 type: "Slideshare",
       
   185                 container: "Slideshare"
       
   186         }, */
       
   187 <?php endif; ?>
       
   188 <?php endif; ?>
   184 <?php endif; ?>
   189             { type: "Mediafragment"},
   185             { type: "Mediafragment"},
   190 <?php if ($use_protocol): ?>
       
   191             {
   186             {
   192                 type: "Trace",
   187                 type: "Trace",
   193                 tracer: _tracer,
   188                 tracer: _tracer,
   194                 extend: {
   189                 extend: {
   195                     cookie: _cookie,
   190                     cookie: _cookie,
   196                     protocol_level: _protocol_level,
       
   197                     url: document.location.href
   191                     url: document.location.href
   198                 },
   192                 },
   199                 js_console: true
   193                 js_console: false
   200             }
   194             }
   201 <?php endif; ?>
       
   202         ]
   195         ]
   203     };
   196     };
   204     
   197     
   205     jQuery(document).ready(function() {
   198     jQuery(document).ready(function() {
   206 
   199