web/common.php
author Raphael Velt <raph.velt@gmail.com>
Fri, 07 Jun 2013 11:50:02 +0200
changeset 918 0646fa4949fa
parent 911 9338858e6fa3
child 938 db42d0bc2e19
permissions -rwxr-xr-x
Merge with 9274ffa6c20ab647dce42d51c49440e149b306a5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
4eba9c11703f first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff changeset
     1
<?php
4eba9c11703f first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff changeset
     2
4eba9c11703f first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff changeset
     3
/**
4eba9c11703f first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff changeset
     4
 * If you haven't edited php.ini to add the Zend Framework and the
4eba9c11703f first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff changeset
     5
 * Zend Framework Incubator to the PHP include_path, then do so here.
4eba9c11703f first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff changeset
     6
 * Don't use mine!
4eba9c11703f first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff changeset
     7
 */
4eba9c11703f first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff changeset
     8
set_include_path(
99
6cb4d10f0b8b NEW WEBSITE WITH : HOME / ABOUT / CLIENT.PHP
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
diff changeset
     9
    'lib'
0
4eba9c11703f first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff changeset
    10
    . PATH_SEPARATOR . get_include_path()
4eba9c11703f first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff changeset
    11
);
4eba9c11703f first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff changeset
    12
233
10d6fd6ce9ab - put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 229
diff changeset
    13
/**
10d6fd6ce9ab - put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 229
diff changeset
    14
* Base configuration
10d6fd6ce9ab - put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 229
diff changeset
    15
*/
683
cd315f8c70e8 Put Platform URL in common.php. This allows me to access projects on local computer.
Raphael Velt <raph.velt@gmail.com>
parents: 659
diff changeset
    16
cd315f8c70e8 Put Platform URL in common.php. This allows me to access projects on local computer.
Raphael Velt <raph.velt@gmail.com>
parents: 659
diff changeset
    17
$ldt_platform = 'http://ldt.iri.centrepompidou.fr/';
cd315f8c70e8 Put Platform URL in common.php. This allows me to access projects on local computer.
Raphael Velt <raph.velt@gmail.com>
parents: 659
diff changeset
    18
$project_url_base = 'ldtplatform/ldt/cljson/id/';
cd315f8c70e8 Put Platform URL in common.php. This allows me to access projects on local computer.
Raphael Velt <raph.velt@gmail.com>
parents: 659
diff changeset
    19
918
0646fa4949fa Merge with 9274ffa6c20ab647dce42d51c49440e149b306a5
Raphael Velt <raph.velt@gmail.com>
parents: 911
diff changeset
    20
$C_default_rep = 'fens2013';
287
3efe34a87c37 correct feedback url
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 286
diff changeset
    21
$C_feedback_form_url = 'https://spreadsheets.google.com/spreadsheet/viewform?hl=en_US&formkey=dDZILVdXVHRzd0xhWGVZXzkweHN2RGc6MQ#gid=0';
233
10d6fd6ce9ab - put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 229
diff changeset
    22
294
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
    23
$archives_list = array(
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
    24
    "rsln", "rsln-opendata", "rsln-mercedes-bunz",
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
    25
	"enmi2011-technologie-confiance", "CPV", array("fens_FabLab_Design_Metadata","fablab"),
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
    26
array("fens_FabLab_Design_Metadata","designmd"), array("mashup","conference"), array("mashup","tableronde"),
330
1a77b44dfa7d publish todai and museo
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 328
diff changeset
    27
	"sig-chi-paris-2011", "rwd-meetup-patrimoine", "2011-2012-museo-ouverture"/*, "JaneMcGonigal-gameDesign"*/,
604
8b18368f5706 Added Museoweb 15/05/2012
Raphael Velt <raph.velt@gmail.com>
parents: 598
diff changeset
    28
	"iii-catastrophe", "edito-inaugurale", "enmi2011", "2011-2012-museo-structured-data",
597
07ab28bca482 Added metadata on enmi preparatoire 2012
Raphael Velt <raph.velt@gmail.com>
parents: 595
diff changeset
    29
	"edito-webdoc","edito-intelligence", "2011-2012-museo-contribution",
659
44c5c0a2b6d4 Added FENS events
Raphael Velt <raph.velt@gmail.com>
parents: 656
diff changeset
    30
	"2011-2012-museo-ingenierie", "edito-serious-games", "enmi2012-seminaire-1", "2011-2012-museo-audiovisuel", "edito-reseaux-sociaux",
825
1e01a59b9566 video for edito-arts-numeriques online
Raphael Velt <raph.velt@gmail.com>
parents: 811
diff changeset
    31
	"edito-arts-numeriques",
659
44c5c0a2b6d4 Added FENS events
Raphael Velt <raph.velt@gmail.com>
parents: 656
diff changeset
    32
    'fens2012-gamestudies',
44c5c0a2b6d4 Added FENS events
Raphael Velt <raph.velt@gmail.com>
parents: 656
diff changeset
    33
    'fens2012-designmetadata',
44c5c0a2b6d4 Added FENS events
Raphael Velt <raph.velt@gmail.com>
parents: 656
diff changeset
    34
    'fens2012-museo-culture-opendata',
44c5c0a2b6d4 Added FENS events
Raphael Velt <raph.velt@gmail.com>
parents: 656
diff changeset
    35
    'fens2012-vinyl-numerique',
44c5c0a2b6d4 Added FENS events
Raphael Velt <raph.velt@gmail.com>
parents: 656
diff changeset
    36
    'fens2012-edito-datajournalisme',
770
25c156d00de6 Next event is BPI Doudou
Raphael Velt <raph.velt@gmail.com>
parents: 768
diff changeset
    37
    'fens2012-wiid',
777
edbb8df3a091 Added Metadata for edito 1 and 2
Raphael Velt <raph.velt@gmail.com>
parents: 774
diff changeset
    38
    'edito-1213-01-contextes', 'edito-1213-02-collectifs-auteurs',
908
8d3096996732 Museo May 28 as current event
Raphael Velt <raph.velt@gmail.com>
parents: 876
diff changeset
    39
    "enmi12", "bpidoudou", 'edito-1213-04-lire-ecrire', 'eduinov-2013'
294
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
    40
);
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
    41
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
    42
233
10d6fd6ce9ab - put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 229
diff changeset
    43
$configuration = array(
807
877f952ae2bd update Zend and twitter oauth end point
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 804
diff changeset
    44
    'siteUrl'        => 'https://api.twitter.com/oauth',
233
10d6fd6ce9ab - put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 229
diff changeset
    45
    'consumerKey' 	 => '***REMOVED***',
10d6fd6ce9ab - put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 229
diff changeset
    46
    'consumerSecret' => '***REMOVED***'
10d6fd6ce9ab - put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 229
diff changeset
    47
);
10d6fd6ce9ab - put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 229
diff changeset
    48
10d6fd6ce9ab - put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 229
diff changeset
    49
10d6fd6ce9ab - put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 229
diff changeset
    50
$req_rep = $C_default_rep;
10d6fd6ce9ab - put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 229
diff changeset
    51
if(isset($config) && isset($config['rep'])) {
10d6fd6ce9ab - put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 229
diff changeset
    52
	$req_rep = $config['rep'];
10d6fd6ce9ab - put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 229
diff changeset
    53
}
119
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
    54
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
    55
include_once dirname(__FILE__).'/traduction.php';
233
10d6fd6ce9ab - put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 229
diff changeset
    56
if(file_exists(dirname(__FILE__)."/$req_rep/traduction.php")) {
10d6fd6ce9ab - put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 229
diff changeset
    57
	include_once dirname(__FILE__)."/$req_rep/traduction.php";
220
42aeb2bfc58e publish chi07 and fens Fablab
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 219
diff changeset
    58
}
119
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
    59
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
    60
0
4eba9c11703f first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff changeset
    61
/**
4eba9c11703f first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff changeset
    62
 * Make sure Zend_Oauth's Consumer is loaded
4eba9c11703f first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff changeset
    63
 */
119
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
    64
require_once dirname(__FILE__).'/lib/Zend/Oauth/Consumer.php';
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
    65
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
    66
/** Zend_Locale */
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
    67
require_once dirname(__FILE__).'/lib/Zend/Locale.php';
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
    68
 
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
    69
/** Zend_Translate_Adapter */
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
    70
require_once dirname(__FILE__).'/lib/Zend/Translate/Adapter.php';
0
4eba9c11703f first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff changeset
    71
4eba9c11703f first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff changeset
    72
/**
4eba9c11703f first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff changeset
    73
 * Start up the ol' session engine
4eba9c11703f first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff changeset
    74
 */
4eba9c11703f first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff changeset
    75
session_start();
4eba9c11703f first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff changeset
    76
4eba9c11703f first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff changeset
    77
/**
4eba9c11703f first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff changeset
    78
 * Include the configuration data for our OAuth Client (array $configuration)
4eba9c11703f first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff changeset
    79
 */
119
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
    80
include_once dirname(__FILE__).'/config.php';
233
10d6fd6ce9ab - put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 229
diff changeset
    81
 
10d6fd6ce9ab - put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 229
diff changeset
    82
10d6fd6ce9ab - put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 229
diff changeset
    83
$configuration['callbackUrl'] = URL_ROOT."$req_rep/callback.php";
10d6fd6ce9ab - put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 229
diff changeset
    84
0
4eba9c11703f first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff changeset
    85
4eba9c11703f first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff changeset
    86
/**
4eba9c11703f first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff changeset
    87
 * Setup an instance of the Consumer for use
4eba9c11703f first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff changeset
    88
 */
4eba9c11703f first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff changeset
    89
$consumer = new Zend_Oauth_Consumer($configuration);
119
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
    90
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
    91
/**
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
    92
 * TRADUCTION
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
    93
**/
294
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
    94
function get_config_translations($config) {
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
    95
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
    96
    $fr = array();
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
    97
    $en = array();
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
    98
    $jp = array();
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
    99
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   100
    $array_loop = array("fr"=>&$fr,"en"=>&$en,"jp"=>&$jp);
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   101
    /**
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   102
     * add all config key as translation.
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   103
     * translation key is "config__<config_key>"
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   104
     */
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   105
    foreach ($config as $key => $value) {
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   106
        $translation_key = "config__$key";
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   107
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   108
        foreach ($array_loop as $lang => &$lang_array) {
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   109
            if(is_array($value) && count(array_intersect_key($value,$array_loop)) > 0 ) {
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   110
                if (array_key_exists($lang, $value)) {
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   111
                    $lang_array[$translation_key] = $value[$lang];
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   112
                }
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   113
                elseif (array_key_exists('fr', $value)) {
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   114
                    $lang_array[$translation_key] = $value['fr'];
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   115
                }
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   116
            }
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   117
            else {
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   118
                $lang_array[$translation_key] = $value;
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   119
            }
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   120
        }
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   121
    }
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   122
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   123
    return $array_loop;
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   124
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   125
}
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   126
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   127
function set_config_translations(&$config, &$translate) {
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   128
    
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   129
    $config_translations = get_config_translations($config);
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   130
    
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   131
    // save the locale because it gets changed when adding translations
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   132
    $locale = $translate->getLocale();
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   133
    
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   134
    $translate->addTranslation($config_translations['en'], 'en');
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   135
    $translate->addTranslation($config_translations['jp'], 'ja_JP');
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   136
    $translate->addTranslation($config_translations['fr'], 'fr');
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   137
    
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   138
    // set the locale back
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   139
    $translate->setLocale($locale);
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   140
}
119
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   141
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   142
291
db1e6bfaa54e add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 287
diff changeset
   143
Zend_Loader::loadClass('Zend_Translate');
db1e6bfaa54e add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 287
diff changeset
   144
Zend_Loader::loadClass('Zend_Http_Cookie');
119
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   145
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   146
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   147
$client = new Zend_Http_Client();
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   148
$translate = new Zend_Translate('array', $init, 'fr');
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   149
291
db1e6bfaa54e add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 287
diff changeset
   150
119
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   151
$translate->addTranslation($english, 'en');
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   152
$translate->addTranslation($japan, 'ja_JP');
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   153
$translate->addTranslation($french, 'fr');
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   154
291
db1e6bfaa54e add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 287
diff changeset
   155
if(isset($config)) {
294
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   156
    
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   157
    set_config_translations($config, $translate);
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   158
//     $config_translations = get_config_translations($config);
291
db1e6bfaa54e add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 287
diff changeset
   159
    
db1e6bfaa54e add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 287
diff changeset
   160
    
294
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   161
//     $translate->addTranslation($config_translations['en'], 'en');
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   162
//     $translate->addTranslation($config_translations['jp'], 'ja_JP');
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   163
//     $translate->addTranslation($config_translations['fr'], 'fr');
291
db1e6bfaa54e add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 287
diff changeset
   164
}
db1e6bfaa54e add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 287
diff changeset
   165
    
119
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   166
$actual = $translate->getLocale();
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   167
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   168
//$translate->setLocale("en");
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   169
// $acceptCookie = $this->_request->getCookie('acceptCookie',0);
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   170
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   171
if(isset($_GET['lang'])==false and isset($_SESSION['lang'])==false){
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   172
	
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   173
	if($actual!='fr' and $actual!='en' and $actual!='ja_JP'){
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   174
		$translate->setLocale("fr");
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   175
		 $_SESSION['lang']="fr";
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   176
	}
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   177
	
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   178
} else if (isset($_GET['lang'])==true){
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   179
	$translate->setLocale($_GET['lang']);
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   180
    $_SESSION['lang'] = $_GET['lang'];
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   181
    $actual = $_SESSION['lang'];
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   182
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   183
} else if (isset($_SESSION['lang'])==true){
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   184
	$translate->setLocale( $_SESSION['lang']);
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   185
    $actual = $_SESSION['lang'];
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   186
	
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   187
}
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   188
229
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   189
$js_registry = array(
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   190
	'local' => array(
534
0a2505c3b547 New metadata player and big directory reorganization
Raphael Velt <raph.velt@gmail.com>
parents: 525
diff changeset
   191
	    'libdir'        => URL_ROOT.'res/js/',
259
bc17d1af15ab stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 258
diff changeset
   192
	    'jquery' 		=> URL_ROOT.'res/js/jquery-1.4.3.min.js',
598
d366aa22bd79 New Metadataplayer version
Raphael Velt <raph.velt@gmail.com>
parents: 597
diff changeset
   193
	    'raphael' 		=> URL_ROOT.'res/js/raphael-min.js',
259
bc17d1af15ab stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 258
diff changeset
   194
	    'jquery-ui' 	=> URL_ROOT.'res/js/jquery-ui-1.8.13.min.js',
534
0a2505c3b547 New metadata player and big directory reorganization
Raphael Velt <raph.velt@gmail.com>
parents: 525
diff changeset
   195
	    'niceforms' 	=> URL_ROOT.'res/js/niceforms.js',
259
bc17d1af15ab stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 258
diff changeset
   196
	    'jquery-url' 	=> URL_ROOT.'res/js/jquery.url.js',
bc17d1af15ab stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 258
diff changeset
   197
	    'ldtplayer' 	=> URL_ROOT.'res/metadataplayer/src/js/LdtPlayer.js',
534
0a2505c3b547 New metadata player and big directory reorganization
Raphael Velt <raph.velt@gmail.com>
parents: 525
diff changeset
   198
		'fancybox' 		=> URL_ROOT.'res/js/fancybox/jquery.fancybox-1.3.4.pack.js',
0a2505c3b547 New metadata player and big directory reorganization
Raphael Velt <raph.velt@gmail.com>
parents: 525
diff changeset
   199
		'jquery-tools' 	=> URL_ROOT.'res/js/jquery.tools.min.js',
259
bc17d1af15ab stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 258
diff changeset
   200
		'tw-widget' 	=> URL_ROOT.'res/js/tw_widget.js',
534
0a2505c3b547 New metadata player and big directory reorganization
Raphael Velt <raph.velt@gmail.com>
parents: 525
diff changeset
   201
		'jquery-mousewheel' => URL_ROOT.'res/js/jquery.mousewheel-3.0.4.pack.js',
0a2505c3b547 New metadata player and big directory reorganization
Raphael Velt <raph.velt@gmail.com>
parents: 525
diff changeset
   202
		'swfobject' 	=> URL_ROOT.'res/js/swfobject.js',
0a2505c3b547 New metadata player and big directory reorganization
Raphael Velt <raph.velt@gmail.com>
parents: 525
diff changeset
   203
		'json-js' 		=> URL_ROOT.'res/js/json2.js',
0a2505c3b547 New metadata player and big directory reorganization
Raphael Velt <raph.velt@gmail.com>
parents: 525
diff changeset
   204
		'underscore'    => URL_ROOT.'res/js/underscore-min.js' ,
0a2505c3b547 New metadata player and big directory reorganization
Raphael Velt <raph.velt@gmail.com>
parents: 525
diff changeset
   205
        'jquery-scrollto'=>URL_ROOT.'res/js/jquery.scrollTo-1.4.2-min.js' ,
0a2505c3b547 New metadata player and big directory reorganization
Raphael Velt <raph.velt@gmail.com>
parents: 525
diff changeset
   206
        'twcx-main'     => URL_ROOT.'res/js/live-polemic.js' ,
0a2505c3b547 New metadata player and big directory reorganization
Raphael Velt <raph.velt@gmail.com>
parents: 525
diff changeset
   207
        'semanticboard' => URL_ROOT.'res/js/semanticboard.js' ,
598
d366aa22bd79 New Metadataplayer version
Raphael Velt <raph.velt@gmail.com>
parents: 597
diff changeset
   208
        'metadataplayer'=> URL_ROOT.'res/metadataplayer/LdtPlayer-core.js' ,
d366aa22bd79 New Metadataplayer version
Raphael Velt <raph.velt@gmail.com>
parents: 597
diff changeset
   209
        'ldtwidgets'    => URL_ROOT.'res/metadataplayer/' ,
656
635a86f25fe7 First tests for PT Protocol implementation
Raphael Velt <raph.velt@gmail.com>
parents: 633
diff changeset
   210
        'tracemanager'  => URL_ROOT.'res/js/tracemanager.js' ,
229
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   211
	),
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   212
	'cdn' => array(
534
0a2505c3b547 New metadata player and big directory reorganization
Raphael Velt <raph.velt@gmail.com>
parents: 525
diff changeset
   213
        'libdir'        => URL_ROOT.'res/js/',
259
bc17d1af15ab stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 258
diff changeset
   214
	    'jquery' 		=> 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js',
598
d366aa22bd79 New Metadataplayer version
Raphael Velt <raph.velt@gmail.com>
parents: 597
diff changeset
   215
		'raphael' 		=> URL_ROOT.'res/js/raphael-min.js',
259
bc17d1af15ab stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 258
diff changeset
   216
		'jquery-ui' 	=> 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js',
534
0a2505c3b547 New metadata player and big directory reorganization
Raphael Velt <raph.velt@gmail.com>
parents: 525
diff changeset
   217
		'niceforms' 	=> URL_ROOT.'res/js/niceforms.js',
259
bc17d1af15ab stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 258
diff changeset
   218
		'jquery-url' 	=> URL_ROOT.'res/js/jquery.url.js',
bc17d1af15ab stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 258
diff changeset
   219
		'ldtplayer' 	=> URL_ROOT.'res/metadataplayer/src/js/LdtPlayer.js',
534
0a2505c3b547 New metadata player and big directory reorganization
Raphael Velt <raph.velt@gmail.com>
parents: 525
diff changeset
   220
		'fancybox' 		=> URL_ROOT.'res/js/fancybox/jquery.fancybox-1.3.4.pack.js',
259
bc17d1af15ab stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 258
diff changeset
   221
		'jquery-tools' 	=> 'http://cdn.jquerytools.org/1.2.4/all/jquery.tools.min.js',
bc17d1af15ab stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 258
diff changeset
   222
		'tw-widget' 	=> 'http://widgets.twimg.com/j/2/widget.js',
534
0a2505c3b547 New metadata player and big directory reorganization
Raphael Velt <raph.velt@gmail.com>
parents: 525
diff changeset
   223
        'jquery-mousewheel' => URL_ROOT.'res/js/jquery.mousewheel-3.0.4.pack.js',
259
bc17d1af15ab stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 258
diff changeset
   224
		'swfobject' 	=> 'http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js',
534
0a2505c3b547 New metadata player and big directory reorganization
Raphael Velt <raph.velt@gmail.com>
parents: 525
diff changeset
   225
        'json-js'       => URL_ROOT.'res/js/json2.js',
0a2505c3b547 New metadata player and big directory reorganization
Raphael Velt <raph.velt@gmail.com>
parents: 525
diff changeset
   226
        'underscore'    => URL_ROOT.'res/js/underscore-min.js' ,
0a2505c3b547 New metadata player and big directory reorganization
Raphael Velt <raph.velt@gmail.com>
parents: 525
diff changeset
   227
        'jquery-scrollto'=>URL_ROOT.'res/js/jquery.scrollTo-1.4.2-min.js' ,
0a2505c3b547 New metadata player and big directory reorganization
Raphael Velt <raph.velt@gmail.com>
parents: 525
diff changeset
   228
        'twcx-main'     => URL_ROOT.'res/js/live-polemic.js' ,
0a2505c3b547 New metadata player and big directory reorganization
Raphael Velt <raph.velt@gmail.com>
parents: 525
diff changeset
   229
        'semanticboard' => URL_ROOT.'res/js/semanticboard.js' ,
598
d366aa22bd79 New Metadataplayer version
Raphael Velt <raph.velt@gmail.com>
parents: 597
diff changeset
   230
        'metadataplayer'=> URL_ROOT.'res/metadataplayer/LdtPlayer-core.js' ,
d366aa22bd79 New Metadataplayer version
Raphael Velt <raph.velt@gmail.com>
parents: 597
diff changeset
   231
        'ldtwidgets'    => URL_ROOT.'res/metadataplayer/' ,
656
635a86f25fe7 First tests for PT Protocol implementation
Raphael Velt <raph.velt@gmail.com>
parents: 633
diff changeset
   232
        'tracemanager'  => URL_ROOT.'res/js/tracemanager.js' ,
229
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   233
	)
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   234
);
143
2a3599a4b0f7 add #enmi page and some litlle corrections
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 119
diff changeset
   235
229
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   236
$font_registry = array(
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   237
	'local' => array(
713
823c47d69550 Fonts Update
Raphael Velt <raph.velt@gmail.com>
parents: 709
diff changeset
   238
		'PT-Sans_Narrow' => URL_ROOT.'res/fonts/PTSansNarrow.css',
823c47d69550 Fonts Update
Raphael Velt <raph.velt@gmail.com>
parents: 709
diff changeset
   239
		'PT-Sans' 		 => URL_ROOT.'res/fonts/PTSans.css'
229
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   240
	),
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   241
	'cdn' => array(
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   242
		'PT-Sans_Narrow' => 'http://fonts.googleapis.com/css?family=PT+Sans+Narrow&subset=latin',
536
5dd170a735e9 new embed and share buttons
Raphael Velt <raph.velt@gmail.com>
parents: 534
diff changeset
   243
		'PT-Sans' 		 => 'http://fonts.googleapis.com/css?family=PT+Sans&subset=latin'
229
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   244
	)
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   245
);
216
d8c1b7e00533 sig chi paris 2011
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 207
diff changeset
   246
233
10d6fd6ce9ab - put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 229
diff changeset
   247
10d6fd6ce9ab - put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 229
diff changeset
   248
$css_registry = array(
10d6fd6ce9ab - put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 229
diff changeset
   249
	'local' => array(
534
0a2505c3b547 New metadata player and big directory reorganization
Raphael Velt <raph.velt@gmail.com>
parents: 525
diff changeset
   250
	   	'blueprint-screen' => URL_ROOT.'res/css/blueprint-screen.css',
0a2505c3b547 New metadata player and big directory reorganization
Raphael Velt <raph.velt@gmail.com>
parents: 525
diff changeset
   251
		'blueprint-print' => URL_ROOT.'res/css/blueprint-print.css',
0a2505c3b547 New metadata player and big directory reorganization
Raphael Velt <raph.velt@gmail.com>
parents: 525
diff changeset
   252
		'blueprint-ie' => URL_ROOT.'res/css/blueprint-ie.css',
0a2505c3b547 New metadata player and big directory reorganization
Raphael Velt <raph.velt@gmail.com>
parents: 525
diff changeset
   253
		'blueprint-plugins-fancy-type' => URL_ROOT.'res/css/blueprint-plugins/fancy-type/screen.css',
233
10d6fd6ce9ab - put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 229
diff changeset
   254
		'custom' => URL_ROOT.'res/css/custom.css',
534
0a2505c3b547 New metadata player and big directory reorganization
Raphael Velt <raph.velt@gmail.com>
parents: 525
diff changeset
   255
		'fancybox' => URL_ROOT.'res/js/fancybox/jquery.fancybox-1.3.4.css',
240
ee6305b4a7dc correct registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 235
diff changeset
   256
		'jquery-ui' => URL_ROOT.'res/metadataplayer/res/css/jq-css/themes/base/jquery-ui.css',
233
10d6fd6ce9ab - put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 229
diff changeset
   257
		'tabs-slideshow' => URL_ROOT.'res/css/tabs-slideshow.css',
469
99d105834315 Semantic board est maintenant dans les répertoires projets
Raphael Velt <raph.velt@gmail.com>
parents: 420
diff changeset
   258
		'tweetcast' => URL_ROOT.'res/css/tweetcast.css',
99d105834315 Semantic board est maintenant dans les répertoires projets
Raphael Velt <raph.velt@gmail.com>
parents: 420
diff changeset
   259
		'semanticboard' =>  URL_ROOT.'res/css/semanticboard.css',
495
34f92d5b2acf Added an archive embed for the IRI homepage
Raphael Velt <raph.velt@gmail.com>
parents: 491
diff changeset
   260
        'archives-iframe' => URL_ROOT.'res/css/archives-iframe.css',
598
d366aa22bd79 New Metadataplayer version
Raphael Velt <raph.velt@gmail.com>
parents: 597
diff changeset
   261
        'metadataplayer' => URL_ROOT.'res/metadataplayer/LdtPlayer-core.css',
233
10d6fd6ce9ab - put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 229
diff changeset
   262
	),
10d6fd6ce9ab - put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 229
diff changeset
   263
	'cdn' => array(
534
0a2505c3b547 New metadata player and big directory reorganization
Raphael Velt <raph.velt@gmail.com>
parents: 525
diff changeset
   264
		'blueprint-screen' => URL_ROOT.'res/css/blueprint-screen.css',
0a2505c3b547 New metadata player and big directory reorganization
Raphael Velt <raph.velt@gmail.com>
parents: 525
diff changeset
   265
		'blueprint-print' => URL_ROOT.'res/css/blueprint-print.css',
0a2505c3b547 New metadata player and big directory reorganization
Raphael Velt <raph.velt@gmail.com>
parents: 525
diff changeset
   266
		'blueprint-ie' => URL_ROOT.'res/css/blueprint-ie.css',
0a2505c3b547 New metadata player and big directory reorganization
Raphael Velt <raph.velt@gmail.com>
parents: 525
diff changeset
   267
		'blueprint-plugins-fancy-type' => URL_ROOT.'res/css/blueprint-plugins/fancy-type/screen.css',
233
10d6fd6ce9ab - put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 229
diff changeset
   268
		'custom' => URL_ROOT.'res/css/custom.css',
593
faaec96c4dc8 Changed language bug
Raphael Velt <raph.velt@gmail.com>
parents: 583
diff changeset
   269
		'fancybox' => URL_ROOT.'res/js/fancybox/jquery.fancybox-1.3.4.css',
233
10d6fd6ce9ab - put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 229
diff changeset
   270
		'jquery-ui' => "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/themes/base/jquery-ui.css",
10d6fd6ce9ab - put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 229
diff changeset
   271
		'tabs-slideshow' => URL_ROOT.'res/css/tabs-slideshow.css',
469
99d105834315 Semantic board est maintenant dans les répertoires projets
Raphael Velt <raph.velt@gmail.com>
parents: 420
diff changeset
   272
        'tweetcast' => URL_ROOT.'res/css/tweetcast.css',
99d105834315 Semantic board est maintenant dans les répertoires projets
Raphael Velt <raph.velt@gmail.com>
parents: 420
diff changeset
   273
        'semanticboard' =>  URL_ROOT.'res/css/semanticboard.css',
495
34f92d5b2acf Added an archive embed for the IRI homepage
Raphael Velt <raph.velt@gmail.com>
parents: 491
diff changeset
   274
        'archives-iframe' => URL_ROOT.'res/css/archives-iframe.css',
598
d366aa22bd79 New Metadataplayer version
Raphael Velt <raph.velt@gmail.com>
parents: 597
diff changeset
   275
        'metadataplayer' => URL_ROOT.'res/metadataplayer/LdtPlayer-core.css',
233
10d6fd6ce9ab - put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 229
diff changeset
   276
	)
10d6fd6ce9ab - put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 229
diff changeset
   277
);
10d6fd6ce9ab - put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 229
diff changeset
   278
229
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   279
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   280
function registry_url($key, $type, $registry_def=null) {
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   281
233
10d6fd6ce9ab - put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 229
diff changeset
   282
	global $js_registry, $font_registry, $css_registry, $C_default_registry;
143
2a3599a4b0f7 add #enmi page and some litlle corrections
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 119
diff changeset
   283
229
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   284
	if($registry_def != null) {
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   285
		$registry = $registry_def;
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   286
	}
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   287
	elseif(isset($C_default_registry)) {
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   288
		$registry = $C_default_registry;
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   289
	}
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   290
	else {
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   291
		$registry = 'local';
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   292
	}
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   293
	$registry_name = $type."_registry";
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   294
	return ${
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   295
		$registry_name}[$registry][$key];
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   296
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   297
}
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   298
291
db1e6bfaa54e add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 287
diff changeset
   299
function get_archive_box($rep, $metadata, $url_root, $basepath, &$translate) {
229
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   300
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   301
	include("$basepath$rep/config.php");
291
db1e6bfaa54e add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 287
diff changeset
   302
	
294
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   303
	set_config_translations($config, $translate);
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   304
/* 	$config_translations = get_config_translations($config);
291
db1e6bfaa54e add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 287
diff changeset
   305
	
294
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   306
// 	save the locale because it gets changed when adding translations
291
db1e6bfaa54e add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 287
diff changeset
   307
	$locale = $translate->getLocale();
db1e6bfaa54e add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 287
diff changeset
   308
	
db1e6bfaa54e add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 287
diff changeset
   309
	$translate->addTranslation($config_translations['en'], 'en');
db1e6bfaa54e add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 287
diff changeset
   310
	$translate->addTranslation($config_translations['jp'], 'ja_JP');
db1e6bfaa54e add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 287
diff changeset
   311
	$translate->addTranslation($config_translations['fr'], 'fr');
db1e6bfaa54e add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 287
diff changeset
   312
	
294
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   313
// 	set the locale back
291
db1e6bfaa54e add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 287
diff changeset
   314
	$translate->setLocale($locale);
294
106c4ec894aa new version for todai forum
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 291
diff changeset
   315
 */
229
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   316
	$id = "abox_$rep".(($metadata!=null)?"_$metadata":"");
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   317
	$hash = ($metadata!=null)?"#metadata=$metadata":"";
291
db1e6bfaa54e add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 287
diff changeset
   318
	$tail_img = $translate->_('config__archive_img');
229
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   319
	if(is_array($tail_img)) {
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   320
		$tail_img = $tail_img[$metadata];
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   321
	}
291
db1e6bfaa54e add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 287
diff changeset
   322
	$archive_title = $translate->_('config__archive_title');
229
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   323
	if(is_array($archive_title)) {
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   324
		$archive_title = $archive_title[$metadata];
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   325
	}
291
db1e6bfaa54e add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 287
diff changeset
   326
	$archive_description = $translate->_('config__archive_description');
229
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   327
	if(is_array($archive_description)) {
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   328
		$archive_description = $archive_description[$metadata];
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   329
	}
119
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   330
4c86151704e9 -TRADUCTION
Samuel Huron <samuel.huron@centrepompidou.fr>
parents: 99
diff changeset
   331
229
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   332
	$res  = "<div id=\"$id\" class=\"archivesVideoBox\">\n";
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   333
	$res .= "    <a href=\"$rep/polemicaltimeline.php$hash\">\n";
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   334
	$res .= "        <img src=\"$url_root$rep/$tail_img\" width=\"270\" height=\"150\"/>";
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   335
	$res .= "    </a>";
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   336
	$res .= "    <div class=\"AVBtitle\">$archive_title</div>\n";
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   337
	$res .= "    <div class=\"AVBtext\">\n";
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   338
	$res .= "        $archive_description\n";
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   339
	$res .= "    </div>\n";
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   340
	$res .= "</div>\n";
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   341
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   342
	return $res;
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   343
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   344
}
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   345
291
db1e6bfaa54e add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 287
diff changeset
   346
function display_archives_list($archives_list, $box_class, $url_root, $basepath, &$translate) {
db1e6bfaa54e add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 287
diff changeset
   347
    
db1e6bfaa54e add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 287
diff changeset
   348
    
229
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   349
	for($i=0;$i<count($archives_list);$i++) {
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   350
		if(($i % 3)==0) {
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   351
			print("			    <div class=\"$box_class\">\n");
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   352
		}
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   353
		$archive_ref = $archives_list[$i];
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   354
	
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   355
		$archive_name = $archive_ref;
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   356
		$metadata = null;
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   357
		if(is_array($archive_ref)) {
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   358
			$archive_name = $archive_ref[0];
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   359
			$metadata = $archive_ref[1];
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   360
		}
291
db1e6bfaa54e add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 287
diff changeset
   361
		print(get_archive_box($archive_name,$metadata, $url_root, $basepath, $translate));
229
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   362
		if(($i % 3)==2 || $i == (count($archives_list)-1)) {
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   363
			print("			    </div>\n");
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   364
		}
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   365
	}
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   366
}
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   367
684
f59daf0830d2 less naive implementation of common LDT platform URL
Raphael Velt <raph.velt@gmail.com>
parents: 683
diff changeset
   368
function get_metadata_url($metadata) {
f59daf0830d2 less naive implementation of common LDT platform URL
Raphael Velt <raph.velt@gmail.com>
parents: 683
diff changeset
   369
    global $ldt_platform, $project_url_base;
f59daf0830d2 less naive implementation of common LDT platform URL
Raphael Velt <raph.velt@gmail.com>
parents: 683
diff changeset
   370
    if (preg_match('/^https?:\/\//', $metadata)) {
f59daf0830d2 less naive implementation of common LDT platform URL
Raphael Velt <raph.velt@gmail.com>
parents: 683
diff changeset
   371
        return $metadata;
f59daf0830d2 less naive implementation of common LDT platform URL
Raphael Velt <raph.velt@gmail.com>
parents: 683
diff changeset
   372
    } else {
f59daf0830d2 less naive implementation of common LDT platform URL
Raphael Velt <raph.velt@gmail.com>
parents: 683
diff changeset
   373
        return $ldt_platform.$project_url_base.$metadata;
f59daf0830d2 less naive implementation of common LDT platform URL
Raphael Velt <raph.velt@gmail.com>
parents: 683
diff changeset
   374
    }
f59daf0830d2 less naive implementation of common LDT platform URL
Raphael Velt <raph.velt@gmail.com>
parents: 683
diff changeset
   375
}
229
74c9ddc3640b a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents: 227
diff changeset
   376
684
f59daf0830d2 less naive implementation of common LDT platform URL
Raphael Velt <raph.velt@gmail.com>
parents: 683
diff changeset
   377
function get_metadata_json_url($metadata) {
f59daf0830d2 less naive implementation of common LDT platform URL
Raphael Velt <raph.velt@gmail.com>
parents: 683
diff changeset
   378
    if (is_array($metadata)) {
f59daf0830d2 less naive implementation of common LDT platform URL
Raphael Velt <raph.velt@gmail.com>
parents: 683
diff changeset
   379
        $metadata["url"] = get_metadata_url($metadata["url"]);
f59daf0830d2 less naive implementation of common LDT platform URL
Raphael Velt <raph.velt@gmail.com>
parents: 683
diff changeset
   380
        return $metadata;
f59daf0830d2 less naive implementation of common LDT platform URL
Raphael Velt <raph.velt@gmail.com>
parents: 683
diff changeset
   381
    } else {
f59daf0830d2 less naive implementation of common LDT platform URL
Raphael Velt <raph.velt@gmail.com>
parents: 683
diff changeset
   382
        return get_metadata_url($metadata);
f59daf0830d2 less naive implementation of common LDT platform URL
Raphael Velt <raph.velt@gmail.com>
parents: 683
diff changeset
   383
    }
f59daf0830d2 less naive implementation of common LDT platform URL
Raphael Velt <raph.velt@gmail.com>
parents: 683
diff changeset
   384
}