source: trunk/spip/2.1/extensions/magusine-portage2.1/squelettes/blocs/webmaton_bloc_questions.html @ 756

Last change on this file since 756 was 756, checked in by guillermoacedo@…, 14 years ago

se agrego la correccion de magusine para 2.1 basica

  • Property svn:executable set to *
File size: 1.8 KB
Line 
1<?php
2#SET{lalangue,#SELF|chercheid{prefix}};
3?>
4<!-- dernieres video -->
5<div id="galerie" class="listagecloc">
6
7<BOUCLE_articles_rubrique(ARTICLES){id_rubrique=#ENV{id_rubrique}}>
8<BOUCLE_galerievideo(DOCUMENTS){id_article}{par date}{inverse}{extension==avi|mov|qt|mpg|rm|mp4}>
9<?php
10$fichiers["#FICHIER"] = <<<END
11
12<a href="javascript:void(0);" onclick="popup_page('spip.php?page=popup-webmaton&id_rubrique=#ID_RUBRIQUE&id_document=#ID_DOCUMENT',500,400);">
13[(#INCLURE{fond=formatage_vignette_webmaton}{id_document}{conteneur=#ENV{conteneur}})]
14</a>
15
16END;
17
18?>
19</BOUCLE_galerievideo>
20</BOUCLE_articles_rubrique>
21
22<BOUCLE_questions_webmaton(DOCUMENTS){id_rubrique=#ENV{id_rubrique}}{fichier==^.*questions(-[0-9]*)?\.xml$}{0,1}>
23<?php
24
25//print_r($fichiers);
26
27if (file_exists('#FICHIER')) {
28
29include_spip('inc/xml-parser');
30
31 $p =& new xmlParser();
32 $p->parse('#FICHIER');
33 //echo "<!--";
34 //print_r($p->output);
35 //echo "-->";
36 foreach($p->output[0]['child'] as $groupe) {
37  if (strtolower($groupe["attrs"]["PREFIX"]) == '#GET{lalangue}') {
38    foreach($groupe["child"] as $prop){
39      if ($prop["name"] == "TITRE"){
40      } else if ($prop["name"] == "QUESTIONS") {
41        foreach($prop["child"] as $question) {
42       
43          $totalvideo="";
44          foreach($fichiers as $nom => $video) {
45            if (eregi($groupe["attrs"]["PREFIX"]."-q".$question["attrs"]["ID"],$nom)){
46              $totalvideo .= $video;
47            }
48          }
49         
50          if ($totalvideo) {
51          echo "<h2>".$question["content"]."</h2>\n";
52          echo "<ul class=\"listageconteneur\"><li>\n";
53          echo $totalvideo;
54          echo "</li>\n";
55          echo "<li class=\"clearer\"></li>\n";
56          echo "</ul>\n";
57          }
58         
59        }
60      }
61    }
62  }
63 }
64}
65
66?>
67</BOUCLE_questions_webmaton>
68
69
70</div>
Note: See TracBrowser for help on using the repository browser.