| author | Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com> |
| Wed, 05 Oct 2011 18:11:31 +0200 | |
| changeset 291 | db1e6bfaa54e |
| parent 287 | 3efe34a87c37 |
| child 294 | 106c4ec894aa |
| permissions | -rwxr-xr-x |
|
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 |
|
|
291
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
13 |
function get_config_translations($config) { |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
14 |
|
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
15 |
$fr = array(); |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
16 |
$en = array(); |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
17 |
$jp = array(); |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
18 |
|
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
19 |
$array_loop = array("fr"=>&$fr,"en"=>&$en,"jp"=>&$jp); |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
20 |
/** |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
21 |
* add all config key as translation. |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
22 |
* translation key is "config__<config_key>" |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
23 |
*/ |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
24 |
foreach ($config as $key => $value) { |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
25 |
$translation_key = "config__$key"; |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
26 |
|
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
27 |
foreach ($array_loop as $lang => &$lang_array) { |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
28 |
if(is_array($value) && count(array_intersect_key($value,$array_loop)) > 0 ) { |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
29 |
if (array_key_exists($lang, $value)) { |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
30 |
$lang_array[$translation_key] = $value[$lang]; |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
31 |
} |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
32 |
elseif (array_key_exists('fr', $value)) { |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
33 |
$lang_array[$translation_key] = $value['fr']; |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
34 |
} |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
35 |
} |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
36 |
else { |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
37 |
$lang_array[$translation_key] = $value; |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
38 |
} |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
39 |
} |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
40 |
} |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
41 |
|
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
42 |
return $array_loop; |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
43 |
|
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
44 |
} |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
45 |
|
|
233
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
46 |
/** |
|
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
47 |
* Base configuration |
|
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
48 |
*/ |
|
270
58d8ab6a1252
Back to jane Mc Gonigal
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
268
diff
changeset
|
49 |
$C_default_rep = 'JaneMcGonigal-gameDesign'; |
|
287
3efe34a87c37
correct feedback url
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
286
diff
changeset
|
50 |
$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
|
51 |
|
|
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
52 |
$configuration = array( |
|
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
53 |
'siteUrl' => 'http://twitter.com/oauth', |
|
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
54 |
'consumerKey' => '***REMOVED***', |
|
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
55 |
'consumerSecret' => '***REMOVED***' |
|
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
56 |
); |
|
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
57 |
|
|
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
58 |
|
|
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
59 |
$req_rep = $C_default_rep; |
|
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
60 |
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
|
61 |
$req_rep = $config['rep']; |
|
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
62 |
} |
| 119 | 63 |
|
64 |
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
|
65 |
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
|
66 |
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
|
67 |
} |
| 119 | 68 |
|
69 |
||
|
0
4eba9c11703f
first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff
changeset
|
70 |
/** |
|
4eba9c11703f
first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff
changeset
|
71 |
* Make sure Zend_Oauth's Consumer is loaded |
|
4eba9c11703f
first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff
changeset
|
72 |
*/ |
| 119 | 73 |
require_once dirname(__FILE__).'/lib/Zend/Oauth/Consumer.php'; |
74 |
||
75 |
/** Zend_Locale */ |
|
76 |
require_once dirname(__FILE__).'/lib/Zend/Locale.php'; |
|
77 |
||
78 |
/** Zend_Translate_Adapter */ |
|
79 |
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
|
80 |
|
|
4eba9c11703f
first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff
changeset
|
81 |
/** |
|
4eba9c11703f
first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff
changeset
|
82 |
* Start up the ol' session engine |
|
4eba9c11703f
first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff
changeset
|
83 |
*/ |
|
4eba9c11703f
first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff
changeset
|
84 |
session_start(); |
|
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 |
* 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
|
88 |
*/ |
| 119 | 89 |
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
|
90 |
|
|
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
91 |
|
|
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
92 |
$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
|
93 |
|
|
0
4eba9c11703f
first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff
changeset
|
94 |
|
|
4eba9c11703f
first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff
changeset
|
95 |
/** |
|
4eba9c11703f
first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff
changeset
|
96 |
* Setup an instance of the Consumer for use |
|
4eba9c11703f
first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff
changeset
|
97 |
*/ |
|
4eba9c11703f
first import
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
diff
changeset
|
98 |
$consumer = new Zend_Oauth_Consumer($configuration); |
| 119 | 99 |
|
100 |
/** |
|
101 |
* TRADUCTION |
|
102 |
**/ |
|
103 |
||
104 |
||
|
291
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
105 |
Zend_Loader::loadClass('Zend_Translate'); |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
106 |
Zend_Loader::loadClass('Zend_Http_Cookie'); |
| 119 | 107 |
|
108 |
||
109 |
$client = new Zend_Http_Client(); |
|
110 |
$translate = new Zend_Translate('array', $init, 'fr'); |
|
111 |
||
|
291
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
112 |
|
| 119 | 113 |
$translate->addTranslation($english, 'en'); |
114 |
$translate->addTranslation($japan, 'ja_JP'); |
|
115 |
$translate->addTranslation($french, 'fr'); |
|
116 |
||
|
291
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
117 |
if(isset($config)) { |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
118 |
$config_translations = get_config_translations($config); |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
119 |
|
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
120 |
|
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
121 |
$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
|
122 |
$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
|
123 |
$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
|
124 |
} |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
125 |
|
| 119 | 126 |
$actual = $translate->getLocale(); |
127 |
||
128 |
//$translate->setLocale("en"); |
|
129 |
// $acceptCookie = $this->_request->getCookie('acceptCookie',0); |
|
130 |
||
131 |
if(isset($_GET['lang'])==false and isset($_SESSION['lang'])==false){ |
|
132 |
||
133 |
if($actual!='fr' and $actual!='en' and $actual!='ja_JP'){ |
|
134 |
$translate->setLocale("fr"); |
|
135 |
$_SESSION['lang']="fr"; |
|
136 |
} |
|
137 |
||
138 |
} else if (isset($_GET['lang'])==true){ |
|
139 |
$translate->setLocale($_GET['lang']); |
|
140 |
$_SESSION['lang'] = $_GET['lang']; |
|
141 |
$actual = $_SESSION['lang']; |
|
142 |
||
143 |
} else if (isset($_SESSION['lang'])==true){ |
|
144 |
$translate->setLocale( $_SESSION['lang']); |
|
145 |
$actual = $_SESSION['lang']; |
|
146 |
||
147 |
} |
|
148 |
||
|
229
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
227
diff
changeset
|
149 |
$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
|
150 |
'local' => array( |
|
259
bc17d1af15ab
stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
258
diff
changeset
|
151 |
'jquery' => URL_ROOT.'res/js/jquery-1.4.3.min.js', |
|
bc17d1af15ab
stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
258
diff
changeset
|
152 |
'raphael' => URL_ROOT.'res/raphael/raphael-min.js', |
|
bc17d1af15ab
stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
258
diff
changeset
|
153 |
'jquery-ui' => URL_ROOT.'res/js/jquery-ui-1.8.13.min.js', |
|
bc17d1af15ab
stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
258
diff
changeset
|
154 |
'niceforms' => URL_ROOT.'res/niceforms/niceforms.js', |
|
bc17d1af15ab
stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
258
diff
changeset
|
155 |
'jquery-url' => URL_ROOT.'res/js/jquery.url.js', |
|
bc17d1af15ab
stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
258
diff
changeset
|
156 |
'ldtplayer' => URL_ROOT.'res/metadataplayer/src/js/LdtPlayer.js', |
|
bc17d1af15ab
stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
258
diff
changeset
|
157 |
'fancybox' => URL_ROOT.'res/jquery.fancybox/fancybox/jquery.fancybox-1.3.4.pack.js', |
|
bc17d1af15ab
stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
258
diff
changeset
|
158 |
'jquery-tools' => URL_ROOT.'res/metadataplayer/res/js/jquery.tools.min.js', |
|
bc17d1af15ab
stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
258
diff
changeset
|
159 |
'tw-widget' => URL_ROOT.'res/js/tw_widget.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
|
160 |
'jquery-mousewheel' => URL_ROOT.'res/jquery.fancybox/fancybox/jquery.mousewheel-3.0.4.pack.js', |
|
259
bc17d1af15ab
stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
258
diff
changeset
|
161 |
'swfobject' => URL_ROOT.'res/metadataplayer/res/js/swfobject.js', |
|
bc17d1af15ab
stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
258
diff
changeset
|
162 |
'json-js' => URL_ROOT.'res/douglascrockford-JSON-js/json2.js', |
|
bc17d1af15ab
stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
258
diff
changeset
|
163 |
|
|
229
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
227
diff
changeset
|
164 |
), |
|
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
227
diff
changeset
|
165 |
'cdn' => array( |
|
259
bc17d1af15ab
stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
258
diff
changeset
|
166 |
'jquery' => 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js', |
|
bc17d1af15ab
stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
258
diff
changeset
|
167 |
'raphael' => URL_ROOT.'res/raphael/raphael-min.js', |
|
bc17d1af15ab
stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
258
diff
changeset
|
168 |
'jquery-ui' => 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js', |
|
bc17d1af15ab
stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
258
diff
changeset
|
169 |
'niceforms' => URL_ROOT.'res/niceforms/niceforms.js', |
|
bc17d1af15ab
stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
258
diff
changeset
|
170 |
'jquery-url' => URL_ROOT.'res/js/jquery.url.js', |
|
bc17d1af15ab
stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
258
diff
changeset
|
171 |
'ldtplayer' => URL_ROOT.'res/metadataplayer/src/js/LdtPlayer.js', |
|
bc17d1af15ab
stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
258
diff
changeset
|
172 |
'fancybox' => URL_ROOT.'res/jquery.fancybox/fancybox/jquery.fancybox-1.3.4.pack.js', |
|
bc17d1af15ab
stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
258
diff
changeset
|
173 |
'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
|
174 |
'tw-widget' => 'http://widgets.twimg.com/j/2/widget.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
|
175 |
'jquery-mousewheel' => URL_ROOT.'res/jquery.fancybox/fancybox/jquery.mousewheel-3.0.4.pack.js', |
|
259
bc17d1af15ab
stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
258
diff
changeset
|
176 |
'swfobject' => 'http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js', |
|
bc17d1af15ab
stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
258
diff
changeset
|
177 |
'json-js' => URL_ROOT.'res/douglascrockford-JSON-js/json2.js', |
|
bc17d1af15ab
stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
258
diff
changeset
|
178 |
|
|
229
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
227
diff
changeset
|
179 |
) |
|
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
227
diff
changeset
|
180 |
); |
|
143
2a3599a4b0f7
add #enmi page and some litlle corrections
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
119
diff
changeset
|
181 |
|
|
229
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
227
diff
changeset
|
182 |
$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
|
183 |
'local' => array( |
|
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
227
diff
changeset
|
184 |
'PT-Sans_Narrow' => URL_ROOT.'res/fonts/PT_Sans-Narrow-Web-Regular.css', |
|
259
bc17d1af15ab
stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
258
diff
changeset
|
185 |
'PT-Sans' => URL_ROOT.'res/fonts/PT_Sans-Web-Regular.css', |
|
bc17d1af15ab
stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
258
diff
changeset
|
186 |
'Geo' => URL_ROOT.'res/fonts/Geo-Regular.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
|
187 |
), |
|
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
227
diff
changeset
|
188 |
'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
|
189 |
'PT-Sans_Narrow' => 'http://fonts.googleapis.com/css?family=PT+Sans+Narrow&subset=latin', |
|
259
bc17d1af15ab
stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
258
diff
changeset
|
190 |
'PT-Sans' => 'http://fonts.googleapis.com/css?family=PT+Sans&subset=latin', |
|
bc17d1af15ab
stats paper chi 1
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
258
diff
changeset
|
191 |
'Geo' => 'http://fonts.googleapis.com/css?family=Geo&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
|
192 |
) |
|
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
227
diff
changeset
|
193 |
); |
|
216
d8c1b7e00533
sig chi paris 2011
Samuel Huron <samuel.huron@centrepompidou.fr>
parents:
207
diff
changeset
|
194 |
|
|
233
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
195 |
|
|
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
196 |
$css_registry = array( |
|
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
197 |
'local' => array( |
|
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
198 |
'blueprint-screen' => URL_ROOT.'res/blueprint/screen.css', |
|
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
199 |
'blueprint-print' => URL_ROOT.'res/blueprint/print.css', |
|
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
200 |
'blueprint-ie' => URL_ROOT.'res/blueprint/ie.css', |
|
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
201 |
'blueprint-plugins-fancy-type' => URL_ROOT.'res/blueprint/plugins/fancy-type/screen.css', |
|
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
202 |
'custom' => URL_ROOT.'res/css/custom.css', |
|
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
203 |
'fancybox' => URL_ROOT.'res/jquery.fancybox/fancybox/jquery.fancybox-1.3.4.css', |
|
240
ee6305b4a7dc
correct registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
235
diff
changeset
|
204 |
'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
|
205 |
'tabs-slideshow' => URL_ROOT.'res/css/tabs-slideshow.css', |
|
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
206 |
), |
|
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
207 |
'cdn' => array( |
|
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
208 |
'blueprint-screen' => URL_ROOT.'res/blueprint/screen.css', |
|
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
209 |
'blueprint-print' => URL_ROOT.'res/blueprint/print.css', |
|
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
210 |
'blueprint-ie' => URL_ROOT.'res/blueprint/ie.css', |
|
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
211 |
'blueprint-plugins-fancy-type' => URL_ROOT.'res/blueprint/plugins/fancy-type/screen.css', |
|
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
212 |
'custom' => URL_ROOT.'res/css/custom.css', |
|
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
213 |
'fancybox' => URL_ROOT.'res/jquery.fancybox/fancybox/jquery.fancybox-1.3.4.css', |
|
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
214 |
'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
|
215 |
'tabs-slideshow' => URL_ROOT.'res/css/tabs-slideshow.css', |
|
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
216 |
) |
|
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
217 |
); |
|
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
218 |
|
|
229
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
227
diff
changeset
|
219 |
$archives_list = array( |
|
233
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
220 |
"rsln", "rsln-opendata", "rsln-mercedes-bunz", |
|
251
d81cc587cc4d
add fablab and correction on feedback
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
240
diff
changeset
|
221 |
"enmi2011-technologie-confiance", "CPV", array("fens_FabLab_Design_Metadata","fablab"), |
|
d81cc587cc4d
add fablab and correction on feedback
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
240
diff
changeset
|
222 |
array("fens_FabLab_Design_Metadata","designmd"), array("mashup","conference"), array("mashup","tableronde"), |
|
286
6ac68295defe
remove Jane McGonigal (publication right problems) + correct synclive for limesurvey + small correction for tweet_user
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
285
diff
changeset
|
223 |
"sig-chi-paris-2011", "rwd-meetup-patrimoine"/*, "JaneMcGonigal-gameDesign"*/ |
|
229
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
227
diff
changeset
|
224 |
); |
|
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
227
diff
changeset
|
225 |
|
|
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
227
diff
changeset
|
226 |
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
|
227 |
|
|
233
10d6fd6ce9ab
- put all in a registry
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
229
diff
changeset
|
228 |
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
|
229 |
|
|
229
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
227
diff
changeset
|
230 |
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
|
231 |
$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
|
232 |
} |
|
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
227
diff
changeset
|
233 |
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
|
234 |
$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
|
235 |
} |
|
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
227
diff
changeset
|
236 |
else { |
|
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
227
diff
changeset
|
237 |
$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
|
238 |
} |
|
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
227
diff
changeset
|
239 |
$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
|
240 |
return ${ |
|
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
227
diff
changeset
|
241 |
$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
|
242 |
|
|
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
227
diff
changeset
|
243 |
} |
|
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
227
diff
changeset
|
244 |
|
|
291
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
245 |
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
|
246 |
|
|
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
227
diff
changeset
|
247 |
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
|
248 |
|
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
249 |
|
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
250 |
$config_translations = get_config_translations($config); |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
251 |
|
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
252 |
// save the locale because it gets changed when adding translations |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
253 |
$locale = $translate->getLocale(); |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
254 |
|
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
255 |
$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
|
256 |
$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
|
257 |
$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
|
258 |
|
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
259 |
// set the locale back |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
260 |
$translate->setLocale($locale); |
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
261 |
|
|
229
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
227
diff
changeset
|
262 |
$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
|
263 |
$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
|
264 |
$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
|
265 |
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
|
266 |
$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
|
267 |
} |
|
291
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
268 |
$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
|
269 |
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
|
270 |
$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
|
271 |
} |
|
291
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
272 |
$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
|
273 |
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
|
274 |
$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
|
275 |
} |
| 119 | 276 |
|
277 |
||
|
229
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
227
diff
changeset
|
278 |
$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
|
279 |
$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
|
280 |
$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
|
281 |
$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
|
282 |
$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
|
283 |
$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
|
284 |
$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
|
285 |
$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
|
286 |
$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
|
287 |
|
|
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
227
diff
changeset
|
288 |
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
|
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 |
} |
|
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
227
diff
changeset
|
291 |
|
|
291
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
292 |
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
|
293 |
|
|
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
294 |
|
|
229
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
227
diff
changeset
|
295 |
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
|
296 |
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
|
297 |
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
|
298 |
} |
|
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
227
diff
changeset
|
299 |
$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
|
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 |
$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
|
302 |
$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
|
303 |
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
|
304 |
$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
|
305 |
$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
|
306 |
} |
|
291
db1e6bfaa54e
add translation for config data
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
287
diff
changeset
|
307 |
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
|
308 |
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
|
309 |
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
|
310 |
} |
|
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
227
diff
changeset
|
311 |
} |
|
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
227
diff
changeset
|
312 |
} |
|
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
227
diff
changeset
|
313 |
|
|
74c9ddc3640b
a lot of changes in the web file organization.
Yves-Marie Haussonne <1218002+ymph@users.noreply.github.com>
parents:
227
diff
changeset
|
314 |