Changeset 578154
- Timestamp:
- 07/27/2012 04:50:07 PM (13 years ago)
- Location:
- tematres-thesaurus/trunk
- Files:
-
- 6 edited
-
lang/en.php (modified) (1 diff)
-
lang/es.php (modified) (1 diff)
-
lang/fr.php (modified) (1 diff)
-
readme.txt (modified) (4 diffs)
-
tematres.php (modified) (2 diffs)
-
vocabularyservices.php (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tematres-thesaurus/trunk/lang/en.php
r176243 r578154 47 47 $message['hieraquicalView'] = "" ; 48 48 $message['term_date'] ="date of creation"; 49 $message['home'] ="home"; 49 50 50 51 //messages -
tematres-thesaurus/trunk/lang/es.php
r176243 r578154 46 46 $message['hieraquicalView'] = "" ; 47 47 $message['term_date'] ="fecha"; 48 48 $message['home'] ="inicio"; 49 49 //messages 50 50 $message["tematres_uri_error"] ='La URL establecida en el campo persolizado "tematres_uri" es incorrecto, por favor revisela, la URL consignada es: '; -
tematres-thesaurus/trunk/lang/fr.php
r176243 r578154 48 48 $message['hieraquicalView'] = "" ; 49 49 $message['term_date'] ="date of creation"; 50 $message['home'] ="home"; 50 51 51 52 //messages -
tematres-thesaurus/trunk/readme.txt
r176243 r578154 3 3 Plugin URI: http://r020.com.ar/tematres/wiki/doku.php?id=tematres:wp-tematres 4 4 Description: WP-TemaTres is plug in for exploit controlled vocabularies or thesauri web services provided by TemaTres, web aplication for manage controlled vocabularies, thesauri and taxonomies 5 Author URI: http://www. r020.com.ar/tematres/5 Author URI: http://www.vocabularyserver.com/ 6 6 Contributors: Ferreyra, Diego 7 Tags: thesaurus, web services, tematres, controlled vocabularies, t axonomies7 Tags: thesaurus, web services, tematres, controlled vocabularies, thesauri, taxonomies 8 8 Requires at least: 2.8.1 9 Tested up to: 2.8.1 10 Stable tag: 1.0 9 Tested up to: 3.4.1 10 Stable tag: 1.1 11 License: GPLv2 or later 12 License URI: http://www.gnu.org/licenses/gpl-2.0.html 11 13 12 14 == Description == … … 14 16 This plugin allows you to exploit controlled vocabularies or thesauri web services provided by TemaTres, web aplication for manage controlled vocabularies, thesauri and taxonomies 15 17 16 <em>Now in spanish! == ¡Ahora en españo !</em>18 <em>Now in spanish! == ¡Ahora en español!</em> 17 19 18 20 Este plugin te permite consultar y explotar vocabularios o tesauros a través de los web services provistos por Tematres, herramienta web para la gestión de vocabularios controlados, tesauros y taxonomías. … … 28 30 29 31 30 <em>Now in spanish! == ¡Ahora en españo !</em>32 <em>Now in spanish! == ¡Ahora en español!</em> 31 33 Esta sección explica cómo instalar y utilizar el plugin. 32 34 … … 39 41 == Screenshots == 40 42 1. This screenshot shows how to complete the custom field to exploit TemaTres in your WordPress. 41 -
tematres-thesaurus/trunk/tematres.php
r176243 r578154 6 6 Author: diego ferreyra 7 7 Author URI: http://www.r020.com.ar/tematres/ 8 Version: 0. 38 Version: 0.5 9 9 10 10 * tematres.php … … 147 147 148 148 $array=arrayTerm2html($tematres_uri,$arrayTerm); 149 150 /* 151 fetch broader terms 152 */ 153 $arrayTG=xmlVocabulary2array($tematres_uri,'fetchUp',$arrayTerm[result][term][tema_id]); 154 155 if (count($arrayTG)) 156 { 157 $URL_post=get_permalink(); 158 $arrayRows["breadcrumb"]=array2html4Breadcrumb($arrayTG,$arrayTerm["result"]["term"]["tema_id"],get_permalink()); 159 } 160 161 162 $rows.=$arrayRows["breadcrumb"]; 149 163 150 164 //Term -
tematres-thesaurus/trunk/vocabularyservices.php
r176243 r578154 35 35 36 36 function simplexml2array($xml) { 37 37 /* 38 fix bug for php 5.04 39 */ 40 if(is_object($xml)) 41 { 38 42 if (get_class($xml) == 'SimpleXMLElement') { 39 43 $attributes = $xml->attributes(); … … 44 48 $xml = get_object_vars($xml); 45 49 } 50 } 51 52 46 53 if (is_array($xml)) { 47 54 if (count($xml) == 0) return (string) $x; // for CDATA … … 57 64 58 65 59 60 66 /* 61 67 Funciones de consulta de datos … … 96 102 if(is_array($v)){ 97 103 $rows.='<li>'; 98 $rows.='<a href="#TEMATRES_URL_BASE#task=fetchTerm&arg='.$v[ term_id].'#t3">'.FixEncoding($v[string]).'</a>';104 $rows.='<a href="#TEMATRES_URL_BASE#task=fetchTerm&arg='.$v["term_id"].'#t3">'.FixEncoding($v["string"]).'</a>'; 99 105 $rows.='</li>'; 100 106 … … 104 110 if(count($value)==$i){ 105 111 $rows.='<li>'; 106 $rows.='<a href="#TEMATRES_URL_BASE#task=fetchTerm&arg='.$value[ term_id].'#t3">'.FixEncoding($value[string]).'</a>';112 $rows.='<a href="#TEMATRES_URL_BASE#task=fetchTerm&arg='.$value["term_id"].'#t3">'.FixEncoding($value["string"]).'</a>'; 107 113 $rows.='</li>'; 108 114 } … … 177 183 if(is_array($v)){ 178 184 $rows.='<li>'; 179 $rows.= ($v[no_term_string]) ? '<em title="'.$message['UF'].' '.$message['USE'].' '.FixEncoding($v[ string]).'">'.FixEncoding($v[no_term_string]).'</em> '.$message['USE'].' ' : '';180 $rows.='<a href="#TEMATRES_URL_BASE#task=fetchTerm&arg='.$v[ term_id].'#t3" title="'.FixEncoding($v[string]).'">'.FixEncoding($v[string]).'</a>';185 $rows.= ($v[no_term_string]) ? '<em title="'.$message['UF'].' '.$message['USE'].' '.FixEncoding($v["string"]).'">'.FixEncoding($v[no_term_string]).'</em> '.$message['USE'].' ' : ''; 186 $rows.='<a href="#TEMATRES_URL_BASE#task=fetchTerm&arg='.$v["term_id"].'#t3" title="'.FixEncoding($v["string"]).'">'.FixEncoding($v["string"]).'</a>'; 181 187 $rows.='</li>'; 182 188 … … 186 192 if(count($value)==$i){ 187 193 $rows.='<li>'; 188 $rows.= ($value[no_term_string]) ? '<em title="'.$message['UF'].' '.$message['USE'].' '.FixEncoding($value[ string]).'">'.FixEncoding($value[no_term_string]).'</em> '.$message['USE'].' ' : '';189 $rows.='<a href="#TEMATRES_URL_BASE#task=fetchTerm&arg='.$value[ term_id].'#t3" title="'.FixEncoding($value[string]).'">'.FixEncoding($value[string]).'</a>';194 $rows.= ($value[no_term_string]) ? '<em title="'.$message['UF'].' '.$message['USE'].' '.FixEncoding($value["string"]).'">'.FixEncoding($value[no_term_string]).'</em> '.$message['USE'].' ' : ''; 195 $rows.='<a href="#TEMATRES_URL_BASE#task=fetchTerm&arg='.$value["term_id"].'#t3" title="'.FixEncoding($value["string"]).'">'.FixEncoding($value["string"]).'</a>'; 190 196 $rows.='</li>'; 191 197 } … … 228 234 $arrayRows["htmltermdata"].='<div class="termdata"><h2 class="title"><a title="Permanent Link to '.FixEncoding($array[result][term][string]).'" href="#TEMATRES_URL_BASE#task=fetchTerm&arg='.$array[result][term][tema_id].'#t3" rel="bookmark">'.FixEncoding($array[result][term][string]).'</a></h2>'; 229 235 230 //$arrayRows["htmltermdata"].='<p class="PostInfo">'.ucfirst($message["term_date"]).' '.date_format($date_term,"d-m-Y").'</p>';231 232 236 $arrayRows["htmltermdata"].='</div>'; 233 237 … … 309 313 if ($show_link=='1') 310 314 { 311 $rows.='<a href="#TEMATRES_URL_BASE#task=fetchTerm&arg='.$v[ term_id].'#t3" title="'.FixEncoding($v[string]).'">'.FixEncoding($v[string]).'</a>';315 $rows.='<a href="#TEMATRES_URL_BASE#task=fetchTerm&arg='.$v["term_id"].'#t3" title="'.FixEncoding($v["string"]).'">'.FixEncoding($v["string"]).'</a>'; 312 316 } 313 317 else 314 318 { 315 $rows.=FixEncoding($v[ string]);319 $rows.=FixEncoding($v["string"]); 316 320 } 317 321 $rows.='</li>'; … … 323 327 if ($show_link=='1') 324 328 { 325 $rows.='<a href="#TEMATRES_URL_BASE#task=fetchTerm&arg='.$value[ term_id].'#t3" title="'.FixEncoding($value[string]).'">'.FixEncoding($value[string]).'</a>';329 $rows.='<a href="#TEMATRES_URL_BASE#task=fetchTerm&arg='.$value["term_id"].'#t3" title="'.FixEncoding($value["string"]).'">'.FixEncoding($value["string"]).'</a>'; 326 330 } 327 331 else 328 332 { 329 $rows.=FixEncoding($value[ string]);333 $rows.=FixEncoding($value["string"]); 330 334 } 331 335 … … 344 348 345 349 350 function array2html4Breadcrumb($array,$tema_id="0",$URL_post){ 351 352 GLOBAL $URL_BASE; 353 GLOBAL $message; 354 355 if($array["resume"]["cant_result"]>"0") { 356 357 $rows='<div>'; 358 359 $rows.='<span typeof="v:Breadcrumb">'; 360 $rows.='<a rel="v:url" property="v:title" href="'.$URL_post.'#t3" title="'.ucfirst($message["home"]).'">'.ucfirst($message["home"]).'</a>'; 361 $rows.='</span> '; 362 363 $i=0; 364 foreach ($array["result"] as $key => $value){ 365 366 while (list( $k, $v ) = each( $value )){ 367 $i=++$i; 368 //Controlar que no sea un resultado unico 369 if(is_array($v)){ 370 if($v["term_id"]!==$tema_id) 371 { 372 373 $rows.='› <span typeof="v:Breadcrumb">'; 374 $rows.='<a rel="v:url" property="v:title" <a href="#TEMATRES_URL_BASE#task=fetchTerm&arg='.$v["term_id"].'#t3" title="'.FixEncoding($v["string"]).'">'.FixEncoding($v["string"]).'</a>'; 375 $rows.='</span> '; 376 } 377 378 } else { 379 //controlar que sea la ultima 380 if(count($value)==$i){ 381 //Que sea el mismo tema_id 382 if($value["term_id"]!==$tema_id) { 383 $rows.='› <span typeof="v:Breadcrumb">'; 384 $rows.='<a rel="v:url" property="v:title" <a href="#TEMATRES_URL_BASE#task=fetchTerm&arg='.$value["term_id"].'#t3" title="'.FixEncoding($value["string"]).'">'.FixEncoding($value["string"]).'</a>'; 385 $rows.='</span> '; 386 387 } 388 } 389 } 390 } 391 } 392 393 394 395 $rows.='</div>'; 396 } 397 398 return $rows; 399 } 400 401 346 402 function arrayVocabulary2htmlBTerms($array,$div_title,$tema_id="0"){ 347 403 … … 358 414 //Controlar que no sea un resultado unico 359 415 if(is_array($v)){ 360 if($v[ term_id]!==$tema_id)416 if($v["term_id"]!==$tema_id) 361 417 { 362 418 363 419 $rows.='<li>'; 364 $rows.='<a href="#TEMATRES_URL_BASE#task=fetchTerm&arg='.$v[ term_id].'#t3" title="'.FixEncoding($v[string]).'">'.FixEncoding($v[string]).'</a>';420 $rows.='<a href="#TEMATRES_URL_BASE#task=fetchTerm&arg='.$v["term_id"].'#t3" title="'.FixEncoding($v["string"]).'">'.FixEncoding($v["string"]).'</a>'; 365 421 $rows.='</li>'; 366 422 } … … 371 427 if(count($value)==$i){ 372 428 //Que sea el mismo tema_id 373 if($value[ term_id]==$tema_id)429 if($value["term_id"]==$tema_id) 374 430 { 375 431 $showBT='0'; … … 378 434 { 379 435 $rows.='<li>'; 380 $rows.='<a href="#TEMATRES_URL_BASE#task=fetchTerm&arg='.$value[ term_id].'#t3" title="'.FixEncoding($value[string]).'">'.FixEncoding($value[string]).'</a>';436 $rows.='<a href="#TEMATRES_URL_BASE#task=fetchTerm&arg='.$value["term_id"].'#t3" title="'.FixEncoding($value["string"]).'">'.FixEncoding($value["string"]).'</a>'; 381 437 $rows.='</li>'; 382 438 } … … 410 466 //Controlar que no sea un resultado unico 411 467 if(is_array($v)){ 412 if($v[ term_id]!==$tema_id)468 if($v["term_id"]!==$tema_id) 413 469 { 414 470 $rows.='<li>'; 415 471 if ($show_link=='1') 416 472 { 417 $rows.='<a href="#TEMATRES_URL_BASE#task=fetchTerm&arg='.$v[ term_id].'#t3" title="'.FixEncoding($v[string]).'">'.FixEncoding($v[string]).'</a>';473 $rows.='<a href="#TEMATRES_URL_BASE#task=fetchTerm&arg='.$v["term_id"].'#t3" title="'.FixEncoding($v["string"]).'">'.FixEncoding($v["string"]).'</a>'; 418 474 } 419 475 else 420 476 { 421 $rows.=FixEncoding($v[ string]);477 $rows.=FixEncoding($v["string"]); 422 478 } 423 479 $rows.='</li>'; … … 429 485 if(count($value)==$i){ 430 486 //Que sea el mismo tema_id 431 if($value[ term_id]!==$tema_id)487 if($value["term_id"]!==$tema_id) 432 488 { 433 489 $rows.='<li>'; 434 490 if ($show_link=='1') 435 491 { 436 $rows.='<a href="#TEMATRES_URL_BASE#task=fetchTerm&arg='.$value[ term_id].'#t3" title="'.FixEncoding($value[string]).'">'.FixEncoding($value[string]).'</a>';492 $rows.='<a href="#TEMATRES_URL_BASE#task=fetchTerm&arg='.$value["term_id"].'#t3" title="'.FixEncoding($value["string"]).'">'.FixEncoding($value["string"]).'</a>'; 437 493 } 438 494 else 439 495 { 440 $rows.=FixEncoding($value[ string]);496 $rows.=FixEncoding($value["string"]); 441 497 } 442 498
Note: See TracChangeset
for help on using the changeset viewer.