--- a/script/lib/iri_tweet/create_twitter_export_conf.py Tue Apr 26 10:53:35 2011 +0200
+++ b/script/lib/iri_tweet/create_twitter_export_conf.py Tue Apr 26 13:57:29 2011 +0200
@@ -1,5 +1,5 @@
from lxml import etree
-from optparse import OptionParser
+from optparse import OptionParser #@UnresolvedImport
def get_options():
--- a/script/lib/iri_tweet/export_tweet_db.py Tue Apr 26 10:53:35 2011 +0200
+++ b/script/lib/iri_tweet/export_tweet_db.py Tue Apr 26 13:57:29 2011 +0200
@@ -1,10 +1,9 @@
-from models import *
-from utils import *
-from optparse import OptionParser
+from models import setup_database
+from optparse import OptionParser #@UnresolvedImport
from sqlalchemy.orm import sessionmaker
+from utils import set_logging_options, set_logging, TwitterProcessor
import logging
-import sqlite3
-import sys
+import sqlite3 #@UnresolvedImport
# 'entities': "tweet_entity",
@@ -35,11 +34,11 @@
curs_in = conn_in.cursor()
fields_mapping = {}
for i,res in enumerate(curs_in.execute("select json from tweet_tweet;")):
- logging.debug("main loop %d : %s" % (i, res[0]))
+ logging.debug("main loop %d : %s" % (i, res[0])) #@UndefinedVariable
processor = TwitterProcessor(eval(res[0]), res[0], session, options.token_filename)
processor.process()
session.commit()
- logging.debug("main : %d tweet processed" % (i+1))
+ logging.debug("main : %d tweet processed" % (i+1)) #@UndefinedVariable
except Exception, e:
session.rollback()
raise e
--- a/script/lib/iri_tweet/export_twitter_alchemy.py Tue Apr 26 10:53:35 2011 +0200
+++ b/script/lib/iri_tweet/export_twitter_alchemy.py Tue Apr 26 13:57:29 2011 +0200
@@ -2,26 +2,20 @@
# coding=utf-8
from lxml import etree
-from models import *
-from optparse import OptionParser
-from sqlalchemy import Table, Column, Integer, BigInteger, String, MetaData, \
- ForeignKey
-from sqlalchemy.orm import sessionmaker, mapper
-from sqlalchemy.sql import select, or_
-from utils import *
+from optparse import OptionParser #@UnresolvedImport
+from sqlalchemy import Table, Column, BigInteger, MetaData
+from sqlalchemy.orm import sessionmaker
+from utils import parse_date, set_logging_options, set_logging, get_filter_query
+from models import setup_database
import datetime
-import email.utils
import logging
-import os
import os.path
import re
-import re
import sys
import time
-import uuid
+import uuid #@UnresolvedImport
import httplib2
import anyjson
-import StringIO
#class TweetExclude(object):
# def __init__(self, id):
@@ -30,9 +24,6 @@
# def __repr__(self):
# return "<TweetExclude(id=%d)>" % (self.id)
-def parse_date(date_str):
- ts = email.utils.parsedate_tz(date_str)
- return datetime.datetime(*ts[0:7])
def parse_polemics(tw, extended_mode):
"""
@@ -108,7 +99,7 @@
set_logging(options)
- logging.debug("OPTIONS : " + repr(options))
+ logging.debug("OPTIONS : " + repr(options)) #@UndefinedVariable
if len(sys.argv) == 1 or options.database is None:
parser.print_help()
@@ -164,7 +155,7 @@
for params in parameters:
- logging.debug("PARAMETERS " + repr(params))
+ logging.debug("PARAMETERS " + repr(params)) #@UndefinedVariable
start_date_str = params.get("start_date",None)
end_date_str = params.get("end_date", None)
@@ -194,12 +185,12 @@
if content_file and content_file.find("http") == 0:
- logging.debug("url : " + content_file)
+ logging.debug("url : " + content_file) #@UndefinedVariable
h = httplib2.Http()
resp, content = h.request(content_file)
- logging.debug("url response " + repr(resp) + " content " + repr(content))
+ logging.debug("url response " + repr(resp) + " content " + repr(content)) #@UndefinedVariable
project = anyjson.deserialize(content)
root = etree.fromstring(project["ldt"])
@@ -214,7 +205,7 @@
root = etree.Element(u"iri")
- project = etree.SubElement(root, u"project", {u"abstract":u"Twitter comments on ENMI",u"title":u"Twitter comments on ENMI 2009", u"user":u"IRI Web", u"id":unicode(uuid.uuid4())})
+ project = etree.SubElement(root, u"project", {u"abstract":u"Polemics Tweets",u"title":u"Polemic Tweets", u"user":u"IRI Web", u"id":unicode(uuid.uuid4())})
medias = etree.SubElement(root, u"medias")
media = etree.SubElement(medias, u"media", {u"pict":u"", u"src":unicode(options.content), u"video":unicode(options.video), u"id":unicode(options.content_id), u"extra":u""})
@@ -256,7 +247,7 @@
if ensemble_parent is None:
- logging.error("Can not process file")
+ logging.error("Can not process file") #@UndefinedVariable
sys.exit()
if options.replace:
@@ -311,18 +302,18 @@
project["ldt"] = output_data
body = anyjson.serialize(project)
- logging.debug("write http " + content_file)
- logging.debug("write http " + repr(body))
+ logging.debug("write http " + content_file) #@UndefinedVariable
+ logging.debug("write http " + repr(body)) #@UndefinedVariable
h = httplib2.Http()
resp, content = h.request(content_file, "PUT", headers={'content-type':'application/json'}, body=body)
- logging.debug("write http " + repr(resp) + " content " + content)
+ logging.debug("write http " + repr(resp) + " content " + content) #@UndefinedVariable
else:
if content_file and os.path.exists(content_file):
dest_file_name = content_file
else:
dest_file_name = options.filename
- logging.debug("WRITE : " + dest_file_name)
+ logging.debug("WRITE : " + dest_file_name) #@UndefinedVariable
output = open(dest_file_name, "w")
output.write(output_data)
output.flush()
--- a/script/lib/iri_tweet/models.py Tue Apr 26 10:53:35 2011 +0200
+++ b/script/lib/iri_tweet/models.py Tue Apr 26 13:57:29 2011 +0200
@@ -67,6 +67,7 @@
user_id = Column(Integer, ForeignKey('tweet_user.id'))
original_json = Column(String)
entity_list = relationship(Entity, backref='tweet')
+ received_at = Column(DateTime, default=datetime.datetime.now())
#user = relationship(User, primaryjoin=user_id == User.id)
--- a/script/lib/iri_tweet/utils.py Tue Apr 26 10:53:35 2011 +0200
+++ b/script/lib/iri_tweet/utils.py Tue Apr 26 13:57:29 2011 +0200
@@ -260,7 +260,7 @@
#user
user_fields = {
- 'lang' : self.json_dict['iso_language_code'],
+ 'lang' : self.json_dict.get('iso_language_code',None),
'profile_image_url' : self.json_dict["profile_image_url"],
'screen_name' : self.json_dict["from_user"],
}
--- a/script/rest/search_enmi.py Tue Apr 26 10:53:35 2011 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-from iri_tweet import models, utils
-from sqlalchemy.orm import sessionmaker
-import anyjson
-import sqlite3
-import twitter
-
-def get_option():
-
- parser = OptionParser()
-
- parser.add_option("-l", "--log", dest="logfile",
- help="log to file", metavar="LOG", default="stderr")
- parser.add_option("-v", dest="verbose", action="count",
- help="verbose", metavar="VERBOSE", default=0)
- parser.add_option("-q", dest="quiet", action="count",
- help="quiet", metavar="QUIET", default=0)
- parser.add_option("-r", "--request", dest="request",
- help="twitter request", metavar="REQUEST", default=0)
- parser.add_option("-Q", dest="query",
- help="query", metavar="QUERY")
- parser.add_option("-P", dest="rpp", metavar="RPP", default="50",
- help="Result per page")
- parser.add_option("-t", dest="token_filename", metavar="TOKEN_FILENAME", default=".oauth_token",
- help="Token file name")
-
-
- #add request token
- #add
-
- return parser.parse_args()
-
-if __name__ == "__main__":
-
- (options, args) = get_option()
-
- twitter = twitter.Twitter(domain="search.twitter.com")
- engine, metadata = models.setup_database('sqlite:///'+args[0], echo=((options.verbose-options.quiet)>0))
- Session = sessionmaker(bind=engine)
- session = Session()
- try:
- #conn.row_factory = sqlite3.Row
- #curs = conn.cursor()
- #curs.execute("create table if not exists tweet_tweet (json);")
- #conn.commit()
-
- results = None
- page = 1
-
- while page <= int(1500/int(options.rpp)) and ( results is None or len(results) > 0):
- results = twitter. search(q=options.query, rpp=options.rpp, page=page)
- for tweet in results["results"]:
- print tweet
- tweet_str = anyjson.serialize(tweet)
- #invalidate user id
- processor = utils.TwitterProcessor(tweet, tweet_str, session, options.token_filename)
- processor.process()
- session.flush()
- page += 1
- session.commit()
- finally:
- session.close()
-
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/script/rest/search_twitter.py Tue Apr 26 13:57:29 2011 +0200
@@ -0,0 +1,66 @@
+from iri_tweet import models, utils
+from sqlalchemy.orm import sessionmaker
+import anyjson
+import sqlite3
+import twitter
+from optparse import OptionParser
+
+
+def get_option():
+
+ parser = OptionParser()
+
+ parser.add_option("-l", "--log", dest="logfile",
+ help="log to file", metavar="LOG", default="stderr")
+ parser.add_option("-v", dest="verbose", action="count",
+ help="verbose", metavar="VERBOSE", default=0)
+ parser.add_option("-q", dest="quiet", action="count",
+ help="quiet", metavar="QUIET", default=0)
+ parser.add_option("-r", "--request", dest="request",
+ help="twitter request", metavar="REQUEST", default=0)
+ parser.add_option("-Q", dest="query",
+ help="query", metavar="QUERY")
+ parser.add_option("-P", dest="rpp", metavar="RPP", default="50",
+ help="Result per page")
+ parser.add_option("-t", dest="token_filename", metavar="TOKEN_FILENAME", default=".oauth_token",
+ help="Token file name")
+
+
+ #add request token
+ #add
+
+ return parser.parse_args()
+
+if __name__ == "__main__":
+
+ (options, args) = get_option()
+
+ twitter = twitter.Twitter(domain="search.twitter.com")
+ engine, metadata = models.setup_database('sqlite:///'+args[0], echo=((options.verbose-options.quiet)>0))
+ Session = sessionmaker(bind=engine)
+ session = Session()
+ try:
+ #conn.row_factory = sqlite3.Row
+ #curs = conn.cursor()
+ #curs.execute("create table if not exists tweet_tweet (json);")
+ #conn.commit()
+
+ results = None
+ page = 1
+
+ while page <= int(1500/int(options.rpp)) and ( results is None or len(results) > 0):
+ results = twitter. search(q=options.query, rpp=options.rpp, page=page)
+ for tweet in results["results"]:
+ print tweet
+ tweet_str = anyjson.serialize(tweet)
+ #invalidate user id
+ processor = utils.TwitterProcessor(tweet, tweet_str, session, options.token_filename)
+ processor.process()
+ session.flush()
+ session.commit()
+ page += 1
+ #session.commit()
+ finally:
+ session.close()
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/script/stream/get_stats.py Tue Apr 26 13:57:29 2011 +0200
@@ -0,0 +1,38 @@
+
+import httplib2
+import anyjson
+from lxml import etree
+import sys
+import pprint
+
+def get_stats(url):
+
+ h = httplib2.Http()
+ resp, content = h.request(url)
+ #project = anyjson.deserialize(content)
+ root = etree.fromstring(content)
+
+ #get all annotations
+ res_xpath = root.xpath("//ensemble[starts-with(@id,'tweet_')]//element")
+
+ total_annot = len(res_xpath)
+ total_with_polemic = 0
+ total_by_type = {}
+
+
+ for annot in res_xpath:
+ polemic_list = annot.xpath("meta/polemics/polemic")
+ if len(polemic_list)> 0:
+ total_with_polemic += 1
+ for polemic_item in polemic_list:
+ pol_type = polemic_item.text
+ total_by_type[pol_type] = total_by_type.get(pol_type,0) + 1
+
+
+ return {"total_annotations": total_annot, "total_with_polemics": total_with_polemic, "polemic_by_type": total_by_type}
+
+if __name__ == "__main__":
+
+ pp = pprint.PrettyPrinter(indent=4, width=1)
+
+ pp.pprint(get_stats(sys.argv[1]))
\ No newline at end of file
--- a/web/.htaccess Tue Apr 26 10:53:35 2011 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-php_value include_path ".:/Users/cybunk/WORK/IRI/REPO_TWEET_LIVE/web/lib/"
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/web/.htaccess.tmpl Tue Apr 26 13:57:29 2011 +0200
@@ -0,0 +1,1 @@
+php_value include_path ".:/Users/cybunk/WORK/IRI/REPO_TWEET_LIVE/web/lib/"
\ No newline at end of file
--- a/web/about.php Tue Apr 26 10:53:35 2011 +0200
+++ b/web/about.php Tue Apr 26 13:57:29 2011 +0200
@@ -21,8 +21,8 @@
<!-- Import fancy-type plugin for the sample page. -->
<link rel="stylesheet" href="res/blueprint/plugins/fancy-type/screen.css" type="text/css" media="screen, projection">
- <link rel="stylesheet" href="custom.css" type="text/css" media="screen, projection">
- <link rel="stylesheet" href="tabs-slideshow.css" type="text/css" media="screen, projection">
+ <link rel="stylesheet" href="res/css/custom.css" type="text/css" media="screen, projection">
+ <link rel="stylesheet" href="res/css/tabs-slideshow.css" type="text/css" media="screen, projection">
<link rel="stylesheet" type="text/css" href="res/jquery.fancybox/fancybox/jquery.fancybox-1.3.4.css" media="screen">
<link rel="stylesheet" type="text/css" href="res/niceforms/niceforms-custom.css" media="screen" >
@@ -53,16 +53,6 @@
//$(this).css({'backgroundColor':'#f6f6f6'});
$(this).css({'backgroundColor':'#f2f2f2'});
});
-
- <!-- SLIDER -->
- $(".slidetabs").tabs(".images > div", {
- effect: 'fade',
- rotate: false,
- interval: 4000,
- clickable:false
- }).slideshow();
-
- $(".slidetabs").data("slideshow").play();
});
--- a/web/client.php Tue Apr 26 10:53:35 2011 +0200
+++ b/web/client.php Tue Apr 26 13:57:29 2011 +0200
@@ -57,7 +57,7 @@
<link rel="stylesheet" href="res/blueprint/print.css" type="text/css" media="print">
<!--[if lt IE 8]><link rel="stylesheet" href="blueprint/ie.css" type="text/css" media="screen, projection"><![endif]-->
<link rel="stylesheet" href="res/blueprint/plugins/fancy-type/screen.css" type="text/css" media="screen, projection">
- <link rel="stylesheet" href="custom.css" type="text/css" media="screen, projection">
+ <link rel="stylesheet" href="res/css/custom.css" type="text/css" media="screen, projection">
<link rel="stylesheet" type="text/css" href="res/jquery.fancybox/fancybox/jquery.fancybox-1.3.4.css" media="screen">
<link rel="stylesheet" type="text/css" href="res/niceforms/niceforms-custom.css" media="screen" >
--- a/web/custom.css Tue Apr 26 10:53:35 2011 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,118 +0,0 @@
-/* -----------------------------------------------------------------------
-
-
- IRI - Live tweet annotation CSS
- http://www.iri.centrepompidou.fr
-
- * Copyright (c) 2010-Present. See LICENSE for more info. (cecill-C)
- * Contributor : Samuel Huron
-
------------------------------------------------------------------------ */
-
-body {background-image:url(images/bgd.jpg);background-repeat:repeat-x;background-color:#f7f6f6;font-family: 'PT Sans', arial, serif; }
-textarea {margin-left:3px;height: 60px;width: 330px;padding:5px;background-image:url(images/tweetWriterBgdTxtArea.gif);background-repeat:no-repeat;border: none;}
-.loginbutton{margin-left:3px;height: 60px;width: 330px;padding:5px;background-image:url(images/tweetWriterBgdUnconnect.gif);background-repeat:no-repeat;border: none;margin-bottom:10px;color:#fff;}
-.loginlink{text-decoration:none;color:#fff;}
-.menuLink:active {text-decoration:none;}
-.menuLink:visited {text-decoration:none;}
-h3{font-size: 1.5em;line-height: 1;margin-bottom: 0.3em;}
-
-#Aboutbox{background-image:url(images/about_bgd.jpg);background-repeat:no-repeat;width:600px;height:360px;overflow:auto; border:1px solid #fff;}
-.lightBorder{padding:20px;}
-.lightTitle{font-size: 48px;font-weight:900;color:#e6e6e6;font-family: 'Geo', arial, serif;line-height:80%}
-.lightSubTitle{font-size: 24px;font-weight:bold;color:#262626; width:250px;line-height:80%}
-.lightDescription{font-size: 12px;color:#000; width:288px;text-align:justify;margin-top:15px;}
-.lightButton{width:134px;height:22px;background-image:url(images/bt_bgd_grey.jpg);background-repeat:no-repeat;}
-.lightButton:active{width:134px;height:22px;background-image:url(images/bt_bgd_grey.jpg);background-repeat:no-repeat;}
-.lightButton:over{text-decoration:none;background-image:url(images/bt_bgd_grey.jpg);background-repeat:no-repeat;}
-
-
-.logo{padding-right:10px;float:left;}
-.menu{float:left;height:62px;border-left:1px solid #c3c3c3;list-style-type:none;padding:0px;margin:0px;}
-.menuUnderline{margin-left:0px;padding-left:0px;background-image:url(images/menu_underline.gif);background-repeat:no-repeat;background-position:left bottom; width:100px;margin-top:3px;}
-.menuLink{text-decoration:none; margin:5px; color:#000}
-.menuLink:active {text-decoration:none;}
-.menuLink:visited {text-decoration:none;}
-.lang{margin-left:500px;}
-
-.tweetContainer{position:absolute; margin-top:70px;}
-.tweetWriter{background-image:url(images/tweetWriterBgd.gif);width:359px;height:136px;padding:10px;position:absolute; margin-top:70px;}
-.tweetWriterTitle{color:4b4b4b;font-family: 'PT Sans Narrow', arial, serif;}
-.tweetExplain{background-image:url(images/tweetExplainBgd.gif);width:359px;height:510px;padding:10px;position:absolute; margin-top:70px;}
-
-.tweetReader{width:377px;height:450px;position:absolute; margin-top:225px;border:1px solid #c3c3c3;background:#ffffff;}
-.tweetButton{float:right;margin-right:5px;}
-
-.timelinePlayer{border:1px solid #c3c3c3;width:650px;height:650px;}
-.videoLivePlayer{border:1px solid #c3c3c3;width:500px;height:375px;}
-.videoLive{width:500px;height:378px;background:#fff;float:left;margin-top:20px;padding:5px;}
-.videoLiveProgram{width:500px;margin-top:425px;margin-left:392px;position:absolute;}
-.videoLiveProgram2{width:500px;margin-top:470px;margin-left:392px;position:absolute;}
-
-.videoLiveProgramTitle{color:#4b4b4b;font-family: 'PT Sans Narrow', arial, serif;font-size: 1.5em;padding:5px;border:1px solid #c3c3c3;background-color:#efefef;background-image:url(images/bgdTitle.jpg);background-repeat:no-repeat;}
-.videoLiveProgramDescription{padding:5px;border:1px solid #c3c3c3;padding:5px;border-top:none;background-color:#fff;background-image:url(images/bgdDescription.jpg);background-repeat:no-repeat;height:193px;overflow:scroll;}
-
-
-.footer{margin-top:770px;width:900px;height:20px;position:absolute;text-align:center;}
-.footerLink{text-decoration:none; margin:5px; color:#000;font-family: 'PT Sans Narrow', arial, serif;font-size: 1.1em;}
-.footerLink:active {text-decoration:none;}
-.footerLink:visited {text-decoration:none;}
-
-.tooltip {display:none;background:transparent url(images/white_arrow.png);font-size:12px;height:70px;width:160px;padding:25px;color:#000;}
-
-.timeline{height:28px;border: 1px solid #ccc;}
-.timeFragment {float:left;position:relative;float:left;}
-.timeFrame {border-left: 1px solid #AAA;border-right: 1px solid #AAA;height:10px;float:left;position:relative;}
-.bigTimeFrame {border-right: 1px solid #ccc;float:left;position:relative;}
-
-.arrowContainer{height:10px;width:100%;}
-
-.cleaner {clear:both;}
-.txt{visibility:hidden;}
-
-
-.clear { /* generic container (i.e. div) for floating buttons */
- overflow: hidden;
- width: 100%;
-}
-
-a.button_w { background: transparent url('images/bg_button_a_w.png') no-repeat scroll top right; color: #444;display: block;float: left;font: normal 12px arial, sans-serif;height: 24px;margin-right: 6px;padding-right: 18px; text-decoration: none;}
-a.button_w span { background: transparent url('images/bg_button_span_w.png') no-repeat; display: block;line-height: 14px; padding: 5px 0 5px 18px;}
-
-a.button_b { background: transparent url('images/bg_button_a_b.png') no-repeat scroll top right; color: #fff;display: block;float: left;font: bold 12px arial, sans-serif;height: 24px;margin-right: 6px;padding-right: 18px; text-decoration: none;}
-a.button_b span { background: transparent url('images/bg_button_span_b.png') no-repeat; display: block;line-height: 14px; padding: 5px 0 5px 18px;}
-
-#question{background: transparent url('images/bt_blue.png') no-repeat; width:32px;height:20px;text-decoration: none;font: normal 12px;color: #444;text-align:center; }
-#question:active {text-decoration:none;}
-#question:visited {text-decoration:none;}
-#reference{background: transparent url('images/bt_yellow.png') no-repeat;width:32px;height:20px;text-decoration: none;font: normal 12px;color: #444;text-align:center; }
-#reference:active {text-decoration:none;}
-#reference:visited {text-decoration:none;}
-#positive{background: transparent url('images/bt_green.png') no-repeat;width:32px;height:20px;text-decoration: none;font: normal 12px;color: #444;text-align:center; }
-#positive:active {text-decoration:none;}
-#positive:visited {text-decoration:none;}
-#negative{background: transparent url('images/bt_red.png') no-repeat;width:32px;height:20px;text-decoration: none;font: normal 12px;color: #444;text-align:center; }
-#negative:active {text-decoration:none;}
-#negative:visited {text-decoration:none;}
-
-.introBox{width:880px;height:280px;padding:10px;position:absolute; margin-top:70px;}
-.aboutBox{background-image:url(images/archivesBoxBody.gif);width:900px;position:absolute; margin-top:70px;}
-.archivesBox{background-image:url(images/archivesBoxBody.gif);width:900px;position:absolute; margin-top:450px;}
-.archivesBoxContainer{padding:10px;width:880px;padding-bottom:0px;display:block; }
-.archivesBoxClear { /* generic container (i.e. div) for floating buttons */
- overflow: hidden;
- width: 100%;
- background-image:url(images/archivesBoxBody.gif);
- height:10px;
-}
-.archivesBoxFooter{background-repeat:no-repeat;background-position:left bottom;background-image:url(images/archivesBoxFooter.gif);width:100%;height:3px;}
-.archivesBoxHeader{background-repeat:no-repeat;background-position:left top;background-image:url(images/archivesBoxHeader.gif);width:100%;height:3px;}
-
-.archivesTitle{color:4b4b4b;font-family: 'PT Sans Narrow', arial, serif;font-size:24px;}
-.archivesVideoBox{margin:5px;padding:5px;position:relative;display:inline-block;float:left;border: solid 1px #ccc;background:#f2f2f2;cursor:pointer;}
-.AVBtitle{font-weight:bold;font-family: 'PT Sans Narrow', arial, serif; font-size:18px;}
-
-.slideTitle{font-size:20px;}
-.slideText{font-size:15px;}
-.slides{background-repeat:no-repeat;background-position:right top;}
-#minilogo{background-repeat:no-repeat;background-position:left top;background-image:url(images/pol_color.gif);width:46px;height:10px;margin-top:50px;z-index:9;position:absolute;margin-left:100px;}}
\ No newline at end of file
--- a/web/enmi/index.php Tue Apr 26 10:53:35 2011 +0200
+++ b/web/enmi/index.php Tue Apr 26 13:57:29 2011 +0200
@@ -41,7 +41,7 @@
<!-- Import fancy-type plugin for the sample page. -->
<link rel="stylesheet" href="res/blueprint/plugins/fancy-type/screen.css" type="text/css" media="screen, projection">
- <link rel="stylesheet" href="custom.css" type="text/css" media="screen, projection">
+ <link rel="stylesheet" href="res/css/custom.css" type="text/css" media="screen, projection">
<link rel="stylesheet" type="text/css" href="res/jquery.fancybox/fancybox/jquery.fancybox-1.3.4.css" media="screen">
<link rel="stylesheet" type="text/css" href="res/niceforms/niceforms-custom.css" media="screen" >
Binary file web/images/Logo-thdculture.png has changed
Binary file web/images/flag_en.gif has changed
Binary file web/images/flag_fr.gif has changed
Binary file web/images/flag_jp.gif has changed
--- a/web/index.php Tue Apr 26 10:53:35 2011 +0200
+++ b/web/index.php Tue Apr 26 13:57:29 2011 +0200
@@ -40,8 +40,8 @@
<!-- Import fancy-type plugin for the sample page. -->
<link rel="stylesheet" href="res/blueprint/plugins/fancy-type/screen.css" type="text/css" media="screen, projection">
- <link rel="stylesheet" href="custom.css" type="text/css" media="screen, projection">
- <link rel="stylesheet" href="tabs-slideshow.css" type="text/css" media="screen, projection">
+ <link rel="stylesheet" href="res/css/custom.css" type="text/css" media="screen, projection">
+ <link rel="stylesheet" href="res/css/tabs-slideshow.css" type="text/css" media="screen, projection">
<link rel="stylesheet" type="text/css" href="res/jquery.fancybox/fancybox/jquery.fancybox-1.3.4.css" media="screen">
<link rel="stylesheet" type="text/css" href="res/niceforms/niceforms-custom.css" media="screen" >
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/web/res/css/custom.css Tue Apr 26 13:57:29 2011 +0200
@@ -0,0 +1,118 @@
+/* -----------------------------------------------------------------------
+
+
+ IRI - Live tweet annotation CSS
+ http://www.iri.centrepompidou.fr
+
+ * Copyright (c) 2010-Present. See LICENSE for more info. (cecill-C)
+ * Contributor : Samuel Huron
+
+----------------------------------------------------------------------- */
+
+body {background-image:url(../../images/bgd.jpg);background-repeat:repeat-x;background-color:#f7f6f6;font-family: 'PT Sans', arial, serif; }
+textarea {margin-left:3px;height: 60px;width: 330px;padding:5px;background-image:url(../../images/tweetWriterBgdTxtArea.gif);background-repeat:no-repeat;border: none;}
+.loginbutton{margin-left:3px;height: 60px;width: 330px;padding:5px;background-image:url(../../images/tweetWriterBgdUnconnect.gif);background-repeat:no-repeat;border: none;margin-bottom:10px;color:#fff;}
+.loginlink{text-decoration:none;color:#fff;}
+.menuLink:active {text-decoration:none;}
+.menuLink:visited {text-decoration:none;}
+h3{font-size: 1.5em;line-height: 1;margin-bottom: 0.3em;}
+
+#Aboutbox{background-image:url(../../images/about_bgd.jpg);background-repeat:no-repeat;width:600px;height:360px;overflow:auto; border:1px solid #fff;}
+.lightBorder{padding:20px;}
+.lightTitle{font-size: 48px;font-weight:900;color:#e6e6e6;font-family: 'Geo', arial, serif;line-height:80%}
+.lightSubTitle{font-size: 24px;font-weight:bold;color:#262626; width:250px;line-height:80%}
+.lightDescription{font-size: 12px;color:#000; width:288px;text-align:justify;margin-top:15px;}
+.lightButton{width:134px;height:22px;background-image:url(../../images/bt_bgd_grey.jpg);background-repeat:no-repeat;}
+.lightButton:active{width:134px;height:22px;background-image:url(../../images/bt_bgd_grey.jpg);background-repeat:no-repeat;}
+.lightButton:over{text-decoration:none;background-image:url(../../images/bt_bgd_grey.jpg);background-repeat:no-repeat;}
+
+
+.logo{padding-right:10px;float:left;}
+.menu{float:left;height:62px;border-left:1px solid #c3c3c3;list-style-type:none;padding:0px;margin:0px;}
+.menuUnderline{margin-left:0px;padding-left:0px;background-image:url(../../images/menu_underline.gif);background-repeat:no-repeat;background-position:left bottom; width:100px;margin-top:3px;}
+.menuLink{text-decoration:none; margin:5px; color:#000}
+.menuLink:active {text-decoration:none;}
+.menuLink:visited {text-decoration:none;}
+.lang{margin-left:500px;}
+
+.tweetContainer{position:absolute; margin-top:70px;}
+.tweetWriter{background-image:url(../../images/tweetWriterBgd.gif);width:359px;height:136px;padding:10px;position:absolute; margin-top:70px;}
+.tweetWriterTitle{color:4b4b4b;font-family: 'PT Sans Narrow', arial, serif;}
+.tweetExplain{background-image:url(../../images/tweetExplainBgd.gif);width:359px;height:510px;padding:10px;position:absolute; margin-top:70px;}
+
+.tweetReader{width:377px;height:450px;position:absolute; margin-top:225px;border:1px solid #c3c3c3;background:#ffffff;}
+.tweetButton{float:right;margin-right:5px;}
+
+.timelinePlayer{border:1px solid #c3c3c3;width:650px;height:650px;}
+.videoLivePlayer{border:1px solid #c3c3c3;width:500px;height:375px;}
+.videoLive{width:500px;height:378px;background:#fff;float:left;margin-top:20px;padding:5px;}
+.videoLiveProgram{width:500px;margin-top:425px;margin-left:392px;position:absolute;}
+.videoLiveProgram2{width:500px;margin-top:470px;margin-left:392px;position:absolute;}
+
+.videoLiveProgramTitle{color:#4b4b4b;font-family: 'PT Sans Narrow', arial, serif;font-size: 1.5em;padding:5px;border:1px solid #c3c3c3;background-color:#efefef;background-image:url(../../images/bgdTitle.jpg);background-repeat:no-repeat;}
+.videoLiveProgramDescription{padding:5px;border:1px solid #c3c3c3;padding:5px;border-top:none;background-color:#fff;background-image:url(../../images/bgdDescription.jpg);background-repeat:no-repeat;height:193px;overflow:scroll;}
+
+
+.footer{margin-top:770px;width:900px;height:20px;position:absolute;text-align:center;}
+.footerLink{text-decoration:none; margin:5px; color:#000;font-family: 'PT Sans Narrow', arial, serif;font-size: 1.1em;}
+.footerLink:active {text-decoration:none;}
+.footerLink:visited {text-decoration:none;}
+
+.tooltip {display:none;background:transparent url(../../images/white_arrow.png);font-size:12px;height:70px;width:160px;padding:25px;color:#000;}
+
+.timeline{height:28px;border: 1px solid #ccc;}
+.timeFragment {float:left;position:relative;float:left;}
+.timeFrame {border-left: 1px solid #AAA;border-right: 1px solid #AAA;height:10px;float:left;position:relative;}
+.bigTimeFrame {border-right: 1px solid #ccc;float:left;position:relative;}
+
+.arrowContainer{height:10px;width:100%;}
+
+.cleaner {clear:both;}
+.txt{visibility:hidden;}
+
+
+.clear { /* generic container (i.e. div) for floating buttons */
+ overflow: hidden;
+ width: 100%;
+}
+
+a.button_w { background: transparent url('../../images/bg_button_a_w.png') no-repeat scroll top right; color: #444;display: block;float: left;font: normal 12px arial, sans-serif;height: 24px;margin-right: 6px;padding-right: 18px; text-decoration: none;}
+a.button_w span { background: transparent url('../../images/bg_button_span_w.png') no-repeat; display: block;line-height: 14px; padding: 5px 0 5px 18px;}
+
+a.button_b { background: transparent url('../../images/bg_button_a_b.png') no-repeat scroll top right; color: #fff;display: block;float: left;font: bold 12px arial, sans-serif;height: 24px;margin-right: 6px;padding-right: 18px; text-decoration: none;}
+a.button_b span { background: transparent url('../../images/bg_button_span_b.png') no-repeat; display: block;line-height: 14px; padding: 5px 0 5px 18px;}
+
+#question{background: transparent url('../../images/bt_blue.png') no-repeat; width:32px;height:20px;text-decoration: none;font: normal 12px;color: #444;text-align:center; }
+#question:active {text-decoration:none;}
+#question:visited {text-decoration:none;}
+#reference{background: transparent url('../../images/bt_yellow.png') no-repeat;width:32px;height:20px;text-decoration: none;font: normal 12px;color: #444;text-align:center; }
+#reference:active {text-decoration:none;}
+#reference:visited {text-decoration:none;}
+#positive{background: transparent url('../../images/bt_green.png') no-repeat;width:32px;height:20px;text-decoration: none;font: normal 12px;color: #444;text-align:center; }
+#positive:active {text-decoration:none;}
+#positive:visited {text-decoration:none;}
+#negative{background: transparent url('../../images/bt_red.png') no-repeat;width:32px;height:20px;text-decoration: none;font: normal 12px;color: #444;text-align:center; }
+#negative:active {text-decoration:none;}
+#negative:visited {text-decoration:none;}
+
+.introBox{width:880px;height:280px;padding:10px;position:absolute; margin-top:70px;}
+.aboutBox{background-image:url(../../images/archivesBoxBody.gif);width:900px;position:absolute; margin-top:70px;}
+.archivesBox{background-image:url(../../images/archivesBoxBody.gif);width:900px;position:absolute; margin-top:450px;}
+.archivesBoxContainer{padding:10px;width:880px;padding-bottom:0px;display:block; }
+.archivesBoxClear { /* generic container (i.e. div) for floating buttons */
+ overflow: hidden;
+ width: 100%;
+ background-image:url(../../images/archivesBoxBody.gif);
+ height:10px;
+}
+.archivesBoxFooter{background-repeat:no-repeat;background-position:left bottom;background-image:url(../../images/archivesBoxFooter.gif);width:100%;height:3px;}
+.archivesBoxHeader{background-repeat:no-repeat;background-position:left top;background-image:url(../../images/archivesBoxHeader.gif);width:100%;height:3px;}
+
+.archivesTitle{color:4b4b4b;font-family: 'PT Sans Narrow', arial, serif;font-size:24px;}
+.archivesVideoBox{margin:5px;padding:5px;position:relative;display:inline-block;float:left;border: solid 1px #ccc;background:#f2f2f2;cursor:pointer;}
+.AVBtitle{font-weight:bold;font-family: 'PT Sans Narrow', arial, serif; font-size:18px;}
+
+.slideTitle{font-size:20px;}
+.slideText{font-size:15px;}
+.slides{background-repeat:no-repeat;background-position:right top;}
+#minilogo{background-repeat:no-repeat;background-position:left top;background-image:url(../../images/pol_color.gif);width:46px;height:10px;margin-top:50px;z-index:9;position:absolute;margin-left:100px;}}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/web/res/css/tabs-slideshow.css Tue Apr 26 13:57:29 2011 +0200
@@ -0,0 +1,96 @@
+
+/* container for slides */
+.images {
+ /*background:#fff url(images/h300.png) repeat-x;*/
+ background:#fff;
+ border:1px solid #ccc;
+ position:relative;
+ height:300px;
+
+ width:860px;
+ float:left;
+ margin:15px;
+ cursor:pointer;
+
+ /* CSS3 tweaks for modern browsers */
+ -moz-border-radius:5px;
+ -webkit-border-radius:5px;
+ -moz-box-shadow:0 0 25px #666;
+ -webkit-box-shadow:0 0 25px #666;
+}
+
+/* single slide */
+.images div {
+ display:none;
+ position:absolute;
+ top:0;
+ left:0;
+ margin:7px;
+ padding:15px 30px 15px 15px;
+ height:256px;
+ font-size:12px;
+}
+
+/* header */
+.images h3 {
+ font-size:22px;
+ font-weight:normal;
+ margin:0 0 20px 0;
+ color:#456;
+}
+
+/* tabs (those little circles below slides) */
+.slidetabs {
+ clear:both;
+ margin-left:430px;
+}
+
+/* single tab */
+.slidetabs a {
+ width:8px;
+ height:8px;
+ float:left;
+ margin:3px;
+ background:url(../../images/navigator.png) 0 0 no-repeat;
+ display:block;
+ font-size:1px;
+}
+
+/* mouseover state */
+.slidetabs a:hover {
+ background-position:0 -8px;
+}
+
+/* active state (current page state) */
+.slidetabs a.current {
+ background-position:0 -16px;
+}
+
+
+/* prev and next buttons */
+.forward, .backward {
+ float:left;
+ margin-top:140px;
+ background:#fff /*url(/tools/img/scrollable/arrow/hori_large.png)*/ no-repeat;
+ display:block;
+ width:30px;
+ height:30px;
+ cursor:pointer;
+ font-size:1px;
+ text-indent:-9999em;
+}
+
+/* next */
+.forward { background-position: 0 -30px; clear:right; }
+.forward:hover { background-position:-30px -30px; }
+.forward:active { background-position:-60px -30px; }
+
+
+/* prev */
+.backward:hover { background-position:-30px 0; }
+.backward:active { background-position:-60px 0; }
+
+/* disabled navigational button. is not needed when tabs are configured with rotate: true */
+.disabled {
+ visibility:hidden !important;
+}
--- a/web/res/metadataplayer.polemic/src/js/polemic.js Tue Apr 26 10:53:35 2011 +0200
+++ b/web/res/metadataplayer.polemic/src/js/polemic.js Tue Apr 26 13:57:29 2011 +0200
@@ -62,11 +62,11 @@
// ou Frame vide
};
Frames.prototype.draw = function(){
- }
+ };
Frames.prototype.zoom = function(){
- }
+ };
Frames.prototype.inside = function(){
- }
+ };
var Clusters = function(){
var Object;
var yDist;
@@ -79,7 +79,7 @@
// make my object
};
var Tweet = function(){
- }
+ };
// Classes =======================================================================
// trace function
@@ -130,7 +130,7 @@
yframe:Myframe,
title:item.content['title'],
timeframe:item.begin
- }
+ };
numberOfTweet+=1;
}
}else{
@@ -142,7 +142,7 @@
yframe:Myframe,
title:item.content['title'],
timeframe:item.begin
- }
+ };
numberOfTweet+=1;
}
@@ -198,7 +198,7 @@
for (var j=0; j<6; j++){
if (frames[i]!=undefined){
if (frames[i].qualifVol[j]!=undefined){
- moy += frames[i].qualifVol[j]
+ moy += frames[i].qualifVol[j];
}
}
}
@@ -235,12 +235,12 @@
}).mouseout(function () {
//this.attr({stroke:"#00","stroke-width":0.1});
}).mousedown(function () {
- __IriSP.MyApiPlayer.seek(this.time/1000)
+ __IriSP.MyApiPlayer.seek(this.time/1000);
});
__IriSP.jQuery(e.node).attr('id', 't'+k+'');
__IriSP.jQuery(e.node).attr('title', frames[i].mytweetsID[k].title);
__IriSP.jQuery(e.node).attr('begin', frames[i].mytweetsID[k].timeframe);
- var tempPosition = {x:i*frameSize,y:config.heightmax-addEheight}
+ var tempPosition = {x:i*frameSize,y:config.heightmax-addEheight};
addTip(e.node, frames[i].mytweetsID[k].title,colors[j],tempPosition);
//frames[i].mytweetsID.pop();
}
@@ -262,14 +262,17 @@
PaperSlider.toFront();
PaperBackground.toBack();
}
- PaperSlider.toFront();
+
+ if(typeof(PaperSlider) !== 'undefined' ) {
+ PaperSlider.toFront();
+ }
}
$(document).mousemove(function(e){
if (over){
__IriSP.jQuery("#tip").css("left", e.pageX-106).css("top", e.pageY-160);
- __IriSP.jQuery("#tipcolor").css("background-color", tipColor)
+ __IriSP.jQuery("#tipcolor").css("background-color", tipColor);
__IriSP.jQuery("#tiptext").text(tipText);
__IriSP.jQuery("#tip").show();
}else{
--- a/web/rsln-opendata/embed_form.php Tue Apr 26 10:53:35 2011 +0200
+++ b/web/rsln-opendata/embed_form.php Tue Apr 26 13:57:29 2011 +0200
@@ -19,7 +19,7 @@
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/jquery-ui.min.js"></script>
<script type="text/javascript" src="res/raphael/raphael-min.js"></script>
- <link rel="stylesheet" href="../custom.css" type="text/css" media="screen, projection">
+ <link rel="stylesheet" href="../res/css/custom.css" type="text/css" media="screen, projection">
<!-- FONT -->
<link href='http://fonts.googleapis.com/css?family=PT+Sans+Narrow&subset=latin' rel='stylesheet' type='text/css'>
--- a/web/rsln-opendata/polemicaltimeline.old.php Tue Apr 26 10:53:35 2011 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,532 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html lang="en">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>RSLN - Live Video and Annotation</title>
-
-
- <!-- JAVASCRIPT -->
- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
- <script type="text/javascript" src="../res/raphael/raphael-min.js"></script>
-
- <!-- Framework CSS -->
- <link rel="stylesheet" href="../res/blueprint/screen.css" type="text/css" media="screen, projection">
- <link rel="stylesheet" href="../res/blueprint/print.css" type="text/css" media="print">
- <link rel="stylesheet" href="../res/blueprint/plugins/fancy-type/screen.css" type="text/css" media="screen, projection">
- <link rel="stylesheet" href="../custom.css" type="text/css" media="screen, projection">
-
-
-
- <!-- FONT -->
- <link href='http://fonts.googleapis.com/css?family=PT+Sans+Narrow&subset=latin' rel='stylesheet' type='text/css'>
- <link href='http://fonts.googleapis.com/css?family=PT+Sans&subset=latin' rel='stylesheet' type='text/css'>
- <link href='http://fonts.googleapis.com/css?family=Geo&subset=latin' rel='stylesheet' type='text/css'>
- <style type="text/css">
- .tweetButton{float:left;margin-right:5px;}
- .videoLivePlayer{border:1px solid #c3c3c3;width:650px;height:698px;}
- .videoLive{width:650px;height:700px;background:#fff;float:right;margin-top:10px;padding:5px;}
- .tweetExplain{background-image:url(images/tweetExplainBgd.gif);width:250px;height:690px;padding:10px;position:absolute; margin-top:70px;}
- .footer{margin-top:790px;width:960px;height:20px;position:absolute;text-align:center;}
- .tooltip{
- z-index: 10000000000;
- }
- #tip{
- position : absolute;
- padding : 3px;
- z-index: 10000000000;
- max-width: 200px;
- }
- #tip {
- display: none;
- background: transparent url("images/white_arrow_long.png");
- font-size: 12px;
- height: 125px;
- width: 180px;
- padding: 10px;
- padding-left: 15px;
- padding-top: 15px;
- padding-right: 15px;
- color: black;
- z-index: 10000000000;
- font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif";
- overflow:hidden;
- }
- #chartTimeline{
- padding-top: 449px;
- z-index: 100000;
- position : absolute;
- }
-
- </style>
- <script type="text/javascript">
-
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-9955524-3']);
- _gaq.push(['_setDomainName', '.iri.centrepompidou.fr']);
- _gaq.push(['_trackPageview']);
-
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
-
- </script>
- </head>
-
- <script type="text/javascript">
- // CHART TIMELINE / VERSION PROTOTYPE ::
-
- // configuration
- var config = {
- target:"chartTimeline",
- x:8,
- y:418,
- width:650,
- height:110,
- heightmax:130
- }
- // Make and define the Raphael area
- //var paper = Raphael(document.getElementById(config.target),config.width, config.height);
-
- function ChartTimeLine (){
-
- //var paper = Raphael(config.x, config.y,config.width, config.height);
-
- //paper.rect(0,20,1,1).attr({fill:"#fff",stroke: "none"});
-
- // variable
-
- var yCoef = 2; // coef for height of 1 tweet
- var frameSize = 5; // frame size
- var margin = 1; // marge between frame
- var lineSize = 650; // timeline pixel width
- var nbrframes = lineSize/frameSize; // frame numbers
- var numberOfTweet = 0; // number of tweet overide later
- var duration = 11514500 ; // timescale width
- var frameLenght = lineSize/frameSize;// frame timescale
- var timeline;
- var colors = new Array("","#1D973D","#C5A62D","#CE0A15","#036AAE","#585858");
-
- // array
- var tweets = new Array();
- var element = new Array();
- var cluster = new Array();
- var frames = new Array(frameLenght);
- var slices = new Array();
-
-
- // Classes =======================================================================
- var Frames = function(){
-
- var Myclusters;
- var x;
- var y;
- var width;
- var height;
- };
- Frames = function(json){
- // make my clusters
- // ou Frame vide
- };
- Frames.prototype.draw = function(){
- }
- Frames.prototype.zoom = function(){
- }
- Frames.prototype.inside = function(){
- }
- var Clusters = function(){
- var Object;
- var yDist;
- var x;
- var y;
- var width;
- var height;
- };
- Clusters = function(json){
- // make my object
- };
- var Tweet = function(){
- }
- // Classes =======================================================================
-
- // trace function
- var traceNum = 0;
- function trace(msg,value){
- traceNum += 1;
- __IriSP.jQuery("<div>"+traceNum+" - "+msg+" : "+value+"</div>").appendTo("#output");
- }
-
- // Refactoring (parametere) ************************************************************
- // color translastion
- function colorTranslation(value){
- if(value == "Q"){
- return 2;
- }else if(value =="REF"){
- return 4;
- }else if(value =="OK"){
- return 1;
- }else if(value =="KO"){
- return 3;
- }else if(value ==""){
- return 5;
- }
- }
-
-
- // Refactoring (parametere) ************************************************************
- // load tweets send in parameters
- __IriSP.jQuery.ajax({
- dataType: "jsonp",
- url:"http://www.iri.centrepompidou.fr/dev/ldt/ldtplatform/ldt/cljson/id/f410655c-5a4d-11e0-a392-00145ea49a02",
- success : function(json){
- trace("load","");
- __IriSP.jQuery.each(json.annotations, function(i,item) {
-
- var MyTime = Math.floor(item.begin/duration*lineSize);
- var Myframe = Math.floor(MyTime/lineSize*frameLenght);
-
- if (item.content['polemics'] != undefined) {
- if (item.content['polemics'][0] != null) {
-
- for(var j=0; j<item.content['polemics'].length; j++){
-
- tweets[numberOfTweet] = {
- id:i,
- qualification:colorTranslation(item.content['polemics'][j]),
- yIndicator:MyTime,
- yframe:Myframe,
- title:item.content['title'],
- timeframe:item.begin
- }
- numberOfTweet+=1;
- }
- }else{
- //trace("k = ",i);
- tweets[numberOfTweet] = {
- id:i,
- qualification:colorTranslation(""),
- yIndicator:MyTime,
- yframe:Myframe,
- title:item.content['title'],
- timeframe:item.begin
- }
- numberOfTweet+=1;
- }
-
- } else {
- //trace("tweet qualification = ","null");
- }
- });
- trace("======= ",numberOfTweet);
- DrawTweets ();
-
- }
- });
-
-
- // tweet Drawing (in raphael)
- function DrawTweets (){
- // GROUPES TWEET ============================================
- // Count nbr of cluster and tweet in a frame an save int in "frames"
- numberOfTweet = tweets.length;
- for(var i=0; i<nbrframes; i++) {
- for(var j=0; j<numberOfTweet; j++) {
-
- if (i==tweets[j].yframe){
-
- var k = tweets[j].qualification;
-
- // make array for frame cluster
- if(frames[i]==undefined){
- frames[i] = {id:i,
- qualifVol:new Array(),
- mytweetsID:new Array()
- };
- }
- // add my tweet to frame
- frames[i].mytweetsID.push(tweets[j]);
-
- // count opinion by frame
- if( frames[i].qualifVol[k] == undefined){
- frames[i].qualifVol[k] = 1;
- }else{
- frames[i].qualifVol[k] += 1;
- }
-
- }
- }
- }
-
- // GROUPES TWEET ============================================
- // max of tweet by Frame
- var max = 0;
- for(var i=0; i<nbrframes; i++) {
- var moy = 0;
- for (var j=0; j<6; j++){
- if (frames[i]!=undefined){
- if (frames[i].qualifVol[j]!=undefined){
- moy += frames[i].qualifVol[j]
- }
- }
- }
- //trace("frame "+i,moy);
- if (moy>max){max=moy;}
- }
-
- var tweetDrawed = new Array();
- var TweetHeight = 5;
- // DRAW TWEETS ============================================
- for(var i=0; i<nbrframes;i++) {
- var addEheight = 5;
- if (frames[i]!=undefined){
- trace (i+" k=",frames[i].mytweetsID.length);
- // by type
- for (var j=6; j>-1; j--){
- if (frames[i].qualifVol[j]!=undefined){
- // show tweet by type
- for (var k=0; k<frames[i].mytweetsID.length; k++){
- if (frames[i].mytweetsID[k].qualification==j){
- e = paper.rect( i*frameSize, // x
- config.heightmax-addEheight, // y
- frameSize-margin, // width
- TweetHeight // height
- ).attr({stroke:"#00","stroke-width":0.1, fill: colors[j]});
- addEheight +=TweetHeight;
- e.time= frames[i].mytweetsID[k].timeframe;
- e.title= frames[i].mytweetsID[k].title;
- e.mouseover(function () {
- //this.attr({stroke:"#fff","stroke-width":5});
- //this.toFront();
- }).mouseout(function () {
- //this.attr({stroke:"#00","stroke-width":0.1});
- }).mousedown(function () {
- __IriSP.MyApiPlayer.seek(this.time/1000)
- });
- __IriSP.jQuery(e.node).attr('id', 't'+k+'');
- __IriSP.jQuery(e.node).attr('title', frames[i].mytweetsID[k].title);
- __IriSP.jQuery(e.node).attr('begin', frames[i].mytweetsID[k].timeframe);
- var tempPosition = {x:i*frameSize,y:config.heightmax-addEheight}
- addTip(e.node, frames[i].mytweetsID[k].title,colors[j],tempPosition);
- //frames[i].mytweetsID.pop();
- }
- }
- }
- }
- }
- PaperSlider.toFront();
- }
-
- }
- //
- PaperSlider.toFront();
- }
-
-
- $(document).mousemove(function(e){
- if (over){
- __IriSP.jQuery("#tip").css("left", e.pageX-106).css("top", e.pageY-160);
- __IriSP.jQuery("#tipcolor").css("background-color", tipColor)
- __IriSP.jQuery("#tiptext").text(tipText);
- __IriSP.jQuery("#tip").show();
- }else{
- __IriSP.jQuery("#tip").css("left", -10000).css("top", -100000);
- //tweetSelection.attr({x:-100,y:-100});
- }
- });
-
- var over = false;
- var tipText = "";
- var tipColor = "#efefef";
- var tweetSelection;
- var PaperSlider;
-
- // AddTip ******************************************************************************
- function addTip(node, txt,color,tempPosition){
- __IriSP.jQuery(node).mouseover(function(){
- tipText = txt;
- //tip.hide();//fadeIn(0);
- tipColor = color;
- over = true;
- //tweetSelection.attr(tempPosition);
- //tweetSelection.toFront();
- }).mouseout(function(){
- //tip.show()//tip.fadeOut(0);
- over = false;
- });
-
-
- }
-
- $(document).ready(function() {
- var tip = __IriSP.jQuery("#tip").hide();
- //ChartTimeLine();
-
- });
- </script>
-
- <body>
-
-<!-- SCRIPT RAPHAEL -->
-
-
-
- <!-- tooltip -->
- <div id="tip">
- <div id="tipcolor" style="height:10px;width:10px"></div>
- <div id="tiptext"></div>
- </div>
-
-
-
-
-
-
- <div class="container">
-
-
-
- <img src="images/ENMI_2010_logo.gif" class="logo">
-
- <ul class="menu">
- <li class="menuUnderline"> </li>
- <li class="menuUnderline"><a href="../" class="menuLink" id="Accueil"> Accueil</a></li>
- <li ><a href="http://www.rslnmag.fr/blog/2011/3/13/_nous-en-sommes-2020_toutes-les-donnees-sont-liberees_/" class="menuLink" target="_blank"> Programme</a>
-
- </ul>
-<div id="minilogo" style="margin-left:85px;height:5px;top:5px;"></div>
-
-
-
-
-
- <div class="tweetExplain" >
- <h3 class="tweetWriterTitle">Annotations polémique : </h3><br/>
- l’Institut de recherche et d’innovation (Iri) vous a proposé une expérimentation et une démonstration d’un dispositif d’annotation polémique basé sur twitter.
-Cette qualification de vos tweets nous a permis de créer une timeline polemique représentant les positions de
-l'auditoire durant la conférence.
-<br/><br/>
-
- Cette syntaxe polémique vous a premis de prendre position relativement à l’intervenant ou aux autres participants au débat :
- <table>
- <tr>
- <td>
- <a
-
- id="positive"
- title="accord"
- class="tweetButton">++</a> </td><td>correspond à un tweet d’assentiment</td>
- </tr>
- <tr>
- <td>
-
- <a
-
- id="negative"
- title="désaccord"
- class="tweetButton">--</a></td><td> à un tweet de désaccord,</td>
- </tr>
- <tr>
- <td>
- <a
-
- id="reference"
- title="reference"
- class="tweetButton">==</a></td><td> à un tweet de référence</td>
- </tr>
- <tr>
- <td>
- <a
-
- id="question"
- title="question"
- class="tweetButton"> ??</a></td><td> à une question</td>
- </tr>
- </table>
-
- Suite a cette phase d’annotation, vous trouverez à droite de ce texte <b>la version alpha</b> de l'interface de navigation et de représentation de la polémique durant la conférence.
-
- <br/><br/>
-Ce dispositif, outre qu’il approfondit la dimension critique de la discussion avec la salle et les auditeurs présents ou distants, permet ainsi également de pérenniser et de valoriser les commentaires produits en les rendant accessibles en temps différé lors de tout visionnage ultérieur de la vidéo
- <br/>
- <br/>Merci a RSLN pour cette expérimentation !
- </div>
-
-
-
-
-
- <div class="videoLive" >
- <div class="videoLivePlayer">
-
- <div id="chartTimeline"> </div>
- <script type="text/javascript">
-var paper = Raphael(document.getElementById("chartTimeline"),config.width, config.height);
- paper.rect(0,20,config.width,config.heightmax-20).attr({fill:"#fff","stroke-width":0.1,opacity: 0.1});
- paper.rect(0,20,config.width,2).attr({fill:"#fff",stroke: "none",opacity: 1});
- PaperSlider = paper.rect(0,20,1,100).attr({fill:"#fff",stroke: "none",opacity: 1});
- // decalage
- tweetSelection = paper.rect(-100,-100,5,5).attr({fill:"#fff",stroke: "none",opacity: 1});
- </script>
-
- <script type='text/javascript' src='../res/metadataplayer/src/js/LdtPlayer.js'></script>
- <script type="text/javascript">
- $.extend(__IriSP.lib,{jQueryToolTip:"../res/metadataplayer/res/js/jquery.tools.min.js"});
- </script>
- <div id="player_project_13b0aa52-336b-11e0-b233-00145ea49a02_embed" class="iri_player_embed"> </div>
-
- <script type="text/javascript">
- var configMP = {
- /*metadata:{
- format:'cinelab',
- src:'metadata.json',
- load:'json'},*/
- metadata:{
- format:'cinelab',
- src:'http://www.iri.centrepompidou.fr/dev/ldt/ldtplatform/ldt/cljson/id/f410655c-5a4d-11e0-a392-00145ea49a02',
- load:'jsonp'},
- gui:{
- width:650,
- height:560,
- mode:'video',
- container:'player_project_13b0aa52-336b-11e0-b233-00145ea49a02_embed',
- debug:false,
- css:'http://amateur.iri.centrepompidou.fr/live/rsln/res/css/LdtPlayer.css'},
-
- player:{
- type:'jwplayer',
- src:'http://www.iri.centrepompidou.fr/dev/ldt/static/ldt/swf/player.swf'}
- };
- __IriSP.init(configMP);
- </script>
-
- </div>
-
- </div>
-
-
-
-
-
- <div class="footer">
- <hr>
- <a href="http://www.iri.centrepompidou.fr/" class="footerLink" target="_blank">
- IRI </a>
- | <a href="http://www.rslnmag.fr/" class="footerLink" target="_blank" > RSLN </a>
- | <a href="http://wegf.org/" class="footerLink" target="_blank"> World e.gov Forum </a>
- | <a href="http://www.microsoft.fr/" class="footerLink" target="_blank"> MICROSOFT.fr </a>
- <?php
- if (isset($_SESSION['TWITTER_ACCESS_TOKEN'])){
- echo("| <a href='clear.php' class='footerLink'>Déconnexion</a>");
- }
- ?>
- </div>
-
- </div>
-
-
-
-
-
- </body>
-</html>
--- a/web/rsln-opendata/polemicaltimeline.php Tue Apr 26 10:53:35 2011 +0200
+++ b/web/rsln-opendata/polemicaltimeline.php Tue Apr 26 13:57:29 2011 +0200
@@ -5,7 +5,7 @@
* People still do this? ;)
*/
// configuration
-include $_SERVER['DOCUMENT_ROOT'].'/common.php';
+include 'common.php';
// objet actuel
include_once 'config.php';
@@ -31,7 +31,7 @@
<link rel="stylesheet" href="../res/blueprint/screen.css" type="text/css" media="screen, projection">
<link rel="stylesheet" href="../res/blueprint/print.css" type="text/css" media="print">
<link rel="stylesheet" href="../res/blueprint/plugins/fancy-type/screen.css" type="text/css" media="screen, projection">
- <link rel="stylesheet" href="../custom.css" type="text/css" media="screen, projection">
+ <link rel="stylesheet" href="../res/css/custom.css" type="text/css" media="screen, projection">
<link rel="stylesheet" href="../res/jquery.fancybox/fancybox/jquery.fancybox-1.3.4.css" media="screen">
<!-- FONT -->
@@ -44,7 +44,7 @@
.videoLivePlayer{border:1px solid #c3c3c3;width:650px;height:638px;}
.videoLive{width:650px;height:640px;background:#fff;float:right;margin-top:20px;padding:5px;}
- .tweetExplain{background-image:url(images/tweetExplainBgd.gif);width:250px;height:640px;padding:10px;position:absolute; margin-top:70px;}
+ .tweetExplain{background-image:url(../images/tweetExplainBgd.gif);width:250px;height:640px;padding:10px;position:absolute; margin-top:70px;}
.footer{margin-top:740px;width:960px;height:20px;position:absolute;text-align:center;}
.tooltip{
z-index: 10000000000;
@@ -132,7 +132,7 @@
</div>
<div class="container">
- <img src="images/ENMI_2010_logo.gif" class="logo">
+ <img src="../images/ENMI_2010_logo.gif" class="logo">
<ul class="menu">
<li class="menuUnderline"><a href="../" class="menuLink" id="Accueil">
<?php print $translate->_("Accueil"); ?></a></li>
@@ -141,7 +141,7 @@
<li > </li>
</ul>
- <ul class="menu" >
+ <ul class="menu lang" >
<li class="menuUnderline"><a href="<?php URL_ROOT ?>?lang=ja_JP" class="menuLink" >
<img src='../images/flag_jp.gif'<?php if($actual!="ja_JP"){echo("style='opacity: .5;'"); } ?> />
<?php print $translate->_("Japonais"); ?></a></li>
@@ -151,9 +151,7 @@
<li ><a href="<?php URL_ROOT ?>?lang=en" class="menuLink">
<img src='../images/flag_en.gif' <?php if($actual!="en"){echo("style='opacity: .5;'"); } ?> />
<?php print $translate->_("Anglais"); ?></a></li>
- </ul>
- <div id="minilogo" style="margin-left:85px;height:5px;top:5px;"></div>
-
+ </ul>
<!-- EXPLICATION -->
<div class="tweetExplain" >
--- a/web/rsln/embed_form.php Tue Apr 26 10:53:35 2011 +0200
+++ b/web/rsln/embed_form.php Tue Apr 26 13:57:29 2011 +0200
@@ -19,7 +19,7 @@
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/jquery-ui.min.js"></script>
<script type="text/javascript" src="res/raphael/raphael-min.js"></script>
- <link rel="stylesheet" href="../custom.css" type="text/css" media="screen, projection">
+ <link rel="stylesheet" href="../res/css/custom.css" type="text/css" media="screen, projection">
<!-- FONT -->
<link href='http://fonts.googleapis.com/css?family=PT+Sans+Narrow&subset=latin' rel='stylesheet' type='text/css'>
--- a/web/rsln/polemicaltimeline.php Tue Apr 26 10:53:35 2011 +0200
+++ b/web/rsln/polemicaltimeline.php Tue Apr 26 13:57:29 2011 +0200
@@ -5,7 +5,7 @@
* People still do this? ;)
*/
// configuration
-include $_SERVER['DOCUMENT_ROOT'].'/common.php';
+include 'common.php';
// objet actuel
include_once 'config.php';
@@ -31,7 +31,7 @@
<link rel="stylesheet" href="../res/blueprint/screen.css" type="text/css" media="screen, projection">
<link rel="stylesheet" href="../res/blueprint/print.css" type="text/css" media="print">
<link rel="stylesheet" href="../res/blueprint/plugins/fancy-type/screen.css" type="text/css" media="screen, projection">
- <link rel="stylesheet" href="../custom.css" type="text/css" media="screen, projection">
+ <link rel="stylesheet" href="../res/css/custom.css" type="text/css" media="screen, projection">
<link rel="stylesheet" href="../res/jquery.fancybox/fancybox/jquery.fancybox-1.3.4.css" media="screen">
<!-- FONT -->
@@ -44,7 +44,7 @@
.videoLivePlayer{border:1px solid #c3c3c3;width:650px;height:638px;}
.videoLive{width:650px;height:640px;background:#fff;float:right;margin-top:20px;padding:5px;}
- .tweetExplain{background-image:url(images/tweetExplainBgd.gif);width:250px;height:640px;padding:10px;position:absolute; margin-top:70px;}
+ .tweetExplain{background-image:url(../images/tweetExplainBgd.gif);width:250px;height:640px;padding:10px;position:absolute; margin-top:70px;}
.footer{margin-top:740px;width:960px;height:20px;position:absolute;text-align:center;}
.tooltip{
z-index: 10000000000;
@@ -132,7 +132,7 @@
</div>
<div class="container">
- <img src="images/ENMI_2010_logo.gif" class="logo">
+ <img src="../images/ENMI_2010_logo.gif" class="logo">
<ul class="menu">
<li class="menuUnderline"><a href="../" class="menuLink" id="Accueil">
<?php print $translate->_("Accueil"); ?></a></li>
@@ -141,7 +141,7 @@
<li > </li>
</ul>
- <ul class="menu" >
+ <ul class="menu lang" >
<li class="menuUnderline"><a href="<?php URL_ROOT ?>?lang=ja_JP" class="menuLink" >
<img src='../images/flag_jp.gif'<?php if($actual!="ja_JP"){echo("style='opacity: .5;'"); } ?> />
<?php print $translate->_("Japonais"); ?></a></li>
@@ -152,7 +152,6 @@
<img src='../images/flag_en.gif' <?php if($actual!="en"){echo("style='opacity: .5;'"); } ?> />
<?php print $translate->_("Anglais"); ?></a></li>
</ul>
- <div id="minilogo" style="margin-left:85px;height:5px;top:5px;"></div>
<!-- EXPLICATION -->
--- a/web/tabs-slideshow.css Tue Apr 26 10:53:35 2011 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-
-/* container for slides */
-.images {
- /*background:#fff url(images/h300.png) repeat-x;*/
- background:#fff;
- border:1px solid #ccc;
- position:relative;
- height:300px;
-
- width:860px;
- float:left;
- margin:15px;
- cursor:pointer;
-
- /* CSS3 tweaks for modern browsers */
- -moz-border-radius:5px;
- -webkit-border-radius:5px;
- -moz-box-shadow:0 0 25px #666;
- -webkit-box-shadow:0 0 25px #666;
-}
-
-/* single slide */
-.images div {
- display:none;
- position:absolute;
- top:0;
- left:0;
- margin:7px;
- padding:15px 30px 15px 15px;
- height:256px;
- font-size:12px;
-}
-
-/* header */
-.images h3 {
- font-size:22px;
- font-weight:normal;
- margin:0 0 20px 0;
- color:#456;
-}
-
-/* tabs (those little circles below slides) */
-.slidetabs {
- clear:both;
- margin-left:430px;
-}
-
-/* single tab */
-.slidetabs a {
- width:8px;
- height:8px;
- float:left;
- margin:3px;
- background:url(images/navigator.png) 0 0 no-repeat;
- display:block;
- font-size:1px;
-}
-
-/* mouseover state */
-.slidetabs a:hover {
- background-position:0 -8px;
-}
-
-/* active state (current page state) */
-.slidetabs a.current {
- background-position:0 -16px;
-}
-
-
-/* prev and next buttons */
-.forward, .backward {
- float:left;
- margin-top:140px;
- background:#fff url(/tools/img/scrollable/arrow/hori_large.png) no-repeat;
- display:block;
- width:30px;
- height:30px;
- cursor:pointer;
- font-size:1px;
- text-indent:-9999em;
-}
-
-/* next */
-.forward { background-position: 0 -30px; clear:right; }
-.forward:hover { background-position:-30px -30px; }
-.forward:active { background-position:-60px -30px; }
-
-
-/* prev */
-.backward:hover { background-position:-30px 0; }
-.backward:active { background-position:-60px 0; }
-
-/* disabled navigational button. is not needed when tabs are configured with rotate: true */
-.disabled {
- visibility:hidden !important;
-}
--- a/web/traduction.php Tue Apr 26 10:53:35 2011 +0200
+++ b/web/traduction.php Tue Apr 26 13:57:29 2011 +0200
@@ -123,7 +123,7 @@
// Embed #############
- "EmbedTitle" =>"Embarqué cette vidéo",
+ "EmbedTitle" =>"Embarquer cette vidéo",
"EmbedText" =>"Pour embarquer cette vidéo dans votre plateforme de publication de contenu copier colle le code suivant :",
// Polemicla Timeline #############