Live polemic tweet corrections V01.26
authorRaphael Velt <raph.velt@gmail.com>
Thu, 19 Jan 2012 15:40:12 +0100
changeset 485 38ac6cb87be7
parent 484 e6ac91d5462b
child 486 90a2b9b01598
Live polemic tweet corrections
web/client_new.php
web/client_old.php
web/edito-intelligence/config.php
web/res/css/tweetcast.css
web/res/js-tweetcast/live-polemic.js
--- a/web/client_new.php	Thu Jan 19 13:58:59 2012 +0100
+++ b/web/client_new.php	Thu Jan 19 15:40:12 2012 +0100
@@ -29,7 +29,9 @@
     <script type="text/javascript" src="<?php echo(registry_url('fancybox','js'))?>"></script>
     
     <script type="text/javascript">
-        <?php echo $config['js_config']; ?>
+        <?php if (isset($config['hashtag'])) echo "var tracking_keywords = ".json_encode(array($config['hashtag'])).";"; ?>
+        <?php if (isset($config['suggested_keywords'])) echo "var suggested_keywords = ".json_encode($config['suggested_keywords']).";"; ?>
+        <?php if (isset($config['js_config'])) echo $config['js_config']; ?>
     </script>
     <script type="text/javascript" src="<?php echo(registry_url('twcx-main','js'))?>"></script>
 
@@ -47,11 +49,6 @@
 /*        setTimeout(function() {
             $.scrollTo(70, 1000);
         }, 2000); */
-        
-        $("#accordeon h3").click(function() {
-            $("li.acctexte").slideToggle();
-            return false;
-        })
 
             //$("txt").hide();
             $(".loginbutton").click(function() {
@@ -156,12 +153,16 @@
             
             <div id="coldroite">
                 <ul id="onglets">
+<?php if (isset($config['semantic_board']) and isset($config['knowtex_url'])) { ?>
                     <li class="selected">
                         <a href="#vlWrap"><?php echo($translate->_('Video')); ?></a>
                     </li>
+<?php } ?>
+<?php if (isset($config['semantic_board']) and $config['semantic_board']) { ?>
                     <li>
                         <a href="semanticboard.php?small=1&theme=jour"><?php echo($translate->_('SemanticBoard')); ?></a>
                     </li>
+<?php } ?>
 <?php if (isset($config['knowtex_url'])) { ?>
                     <li>
                         <a href="<?php echo $config['knowtex_url'] ?>"><?php echo($translate->_('SocialGraph')); ?></a>
@@ -222,21 +223,25 @@
                     <li class="acctitre">
                         <h3><?php echo($translate->_('keywords')); ?></h3>
                     </li>
-                    <li class="acctexte hidden">
-                        <div class="accsubtitle">
-                            <div class="aroundsubtitle">
-                                <h4><?php echo($translate->_('suggested')); ?></h4>
-                            </div>
-                        </div>
-                        <div class="tagcloud" id="suggkw"></div>
-                    </li>
-                    <li class="acctexte hidden">
-                        <div class="accsubtitle">
-                            <div class="aroundsubtitle">
-                                <h4><?php echo($translate->_('contextual')); ?></h4>
-                            </div>
-                        </div>
-                        <div class="tagcloud" id="motscles"></div>
+                    <li class="fl">
+                        <ul class="fl">
+                            <li class="acctexte">
+                                <div class="accsubtitle">
+                                    <div class="aroundsubtitle">
+                                        <h4><?php echo($translate->_('suggested')); ?></h4>
+                                    </div>
+                                </div>
+                                <div class="tagcloud" id="suggkw"></div>
+                            </li>
+                            <li class="acctexte">
+                                <div class="accsubtitle">
+                                    <div class="aroundsubtitle">
+                                        <h4><?php echo($translate->_('contextual')); ?></h4>
+                                    </div>
+                                </div>
+                                <div class="tagcloud" id="motscles"></div>
+                            </li>
+                        </ul>
                     </li>
                 </ul>
             </div>
--- a/web/client_old.php	Thu Jan 19 13:58:59 2012 +0100
+++ b/web/client_old.php	Thu Jan 19 15:40:12 2012 +0100
@@ -278,9 +278,11 @@
         <li class="selected">
             <a href="#vlWrap"><?php echo($translate->_('Video')); ?></a>
         </li>
+<?php if (isset($config['semantic_board']) && $config['semantic_board']) { ?>
         <li>
             <a href="semanticboard.php?small=1&theme=jour"><?php echo($translate->_('SemanticBoard')); ?></a>
         </li>
+<?php } ?>
 <?php if (isset($config['knowtex_url'])) { ?>
         <li>
             <a href="<?php echo $config['knowtex_url'] ?>"><?php echo($translate->_('SocialGraph')); ?></a>
--- a/web/edito-intelligence/config.php	Thu Jan 19 13:58:59 2012 +0100
+++ b/web/edito-intelligence/config.php	Thu Jan 19 15:40:12 2012 +0100
@@ -19,10 +19,19 @@
 	//'flv_file' => 'livestream',
 	//'flv_streamer' => 'rtmp://media.iri.centrepompidou.fr/ddc-player',
     'use_tweetcast' => true,
-    'js_config' => "
-        tracking_keywords = [ '#edito11' ],
-        suggested_keywords = []
-        ",
+    'suggested_keywords' => array(
+        "intelligence",
+        "collective",
+        "artificielle",
+        "savoir",
+        "participatif",
+        "wiki",
+        "occupy",
+        "cognition",
+        "w3c",
+        "open",
+        "science",
+    ),
 	//'knowtex_url' => "http://labs.knowtex.com/enmi2011/?mapOnly#carto",
    	'keywords'   => 'editorialisation, iri',
    	'rep' => basename(__DIR__),
--- a/web/res/css/tweetcast.css	Thu Jan 19 13:58:59 2012 +0100
+++ b/web/res/css/tweetcast.css	Thu Jan 19 15:40:12 2012 +0100
@@ -58,6 +58,10 @@
     display: none;
 }
 
+.fl {
+    float: left;
+}
+
 /* feedback */
 
 #sendUsFeedBack {
@@ -292,7 +296,9 @@
 /* Liste des tweets */
 
 #tweetlist {
-	float: left; width: 280px; height: 480px; list-style: none; border-right: 1px solid #999; color: #585858; cursor: pointer; cursor: hand; background: #ffffff;
+	float: left; width: 280px; height: 480px; list-style: none; border-right: 1px solid #999;
+	color: #585858; cursor: pointer; cursor: hand; background: #ffffff;
+	font-family: Arial, Helvetica, sans-serif; /* Quick Fix */
 }
 
 #tweetlist a {
@@ -501,14 +507,10 @@
     margin: 5px 0; line-height: 1.5em;
 }
 
-#accordeon li {
+li.acctitre, li.acctexte {
     float: left; width: 480px; margin: 0 1px 1px 1px; padding: 4px; border: 1px solid #ffffff; position: relative;
 }
 
-#accordeon span {
-    padding: 2px; cursor: pointer; cursor: hand;
-}
-
 div.accsubtitle {
     position: absolute; top: 0; left: 0; width: 20px; height: 100%; background: #e0e0e0; border-right: 1px solid #999999; overflow: hidden;
 }
@@ -525,6 +527,10 @@
     width: 460px; text-align: center; margin-left: 20px;
 }
 
+.tagcloud span {
+    padding: 2px; cursor: pointer; cursor: hand;
+}
+
 li.acctitre {
     background: #efefef; cursor: pointer; cursor: hand;
 }
@@ -534,6 +540,14 @@
     max-height: 228px; overflow: auto;
 }
 
+.acctexte ul {
+    list-style: disc; font-size: 12px; padding-left: 1em;
+}
+
+.acctexte li {
+    margin: 4px 0;
+}
+
 /* Tag Cloud */
 
 #hoverkw {
--- a/web/res/js-tweetcast/live-polemic.js	Thu Jan 19 13:58:59 2012 +0100
+++ b/web/res/js-tweetcast/live-polemic.js	Thu Jan 19 15:40:12 2012 +0100
@@ -1159,6 +1159,14 @@
         _hkw.hide();
         return false;
     });
+    $(".acctitre").click(function() {
+        $(this).next().slideToggle();
+        return false;
+    })
+    
+    if (!suggested_keywords.length) {
+        $("#suggkw").parent().hide();
+    }
     
     setInterval(function() {
         var sc = $("#scrollcont");