Giter Site home page Giter Site logo

tematres / tematres-vocabulary-server Goto Github PK

View Code? Open in Web Editor NEW
117.0 23.0 52.0 14.63 MB

Web application for management formal representations of knowledge, like controlled vocabularies, taxonomies, thesauri and glossaries

Home Page: https://vocabularyserver.com

JavaScript 26.26% PHP 70.13% CSS 0.99% XSLT 0.40% HTML 2.08% SCSS 0.14%
vocabularies knowledge thesaurus taxonomies classification glossary

tematres-vocabulary-server's People

Contributors

a-roussos avatar alannfreitas avatar bfavaretto avatar clifflandis avatar eugebib avatar gautiermichelin avatar horus68 avatar ricpiz avatar t1loc avatar tematres avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tematres-vocabulary-server's Issues

Trouble with language codes in v. 3.4

Hi,
After installing v3.4. the language tags for the main vocabulary comes out with region. Three issues:

  1. The region given for Norwegian bokmål is not correct. as far as I know, "NB" is no region, whereas "NO" is. See example below.
  2. Region are given only for terms in the main vocabulary, not for terms in the connected target vocabularies, nor for notes. (This has probably something to do with the fact that Norwegian is not included in language list in TemaTres, hence we've had to add Norwegian and Sami ourselves.
  3. We don't really want region info in the first place. Our vocabularies are published in another platform (using the skos export from TemaTres), and right now it is not convenient for us to start using language tags with regions.

Example: The concept "Sudoku" as TemaTres exports it to SKOS:

<skos:Concept rdf:about="http://tematres.nb.no/vocab/887"> <skos:prefLabel xml:lang="nb-NB">Sudoku</skos:prefLabel> <skos:scopeNote xml:lang="nb">Brukt til bøker med sudoku-oppgaver. </skos:scopeNote> <skos:definition xml:lang="nb">Sudoku, også kalt su doku, er et tallspill som går ut på å plassere sifre i rutemønstre. Det klassiske og opprinnelige rutemønsteret består av 9×9 ruter som igjen er delt inn i ni mindre bokser på 3×3 ruter [Wikipedia]. </skos:definition> <skos:inScheme rdf:resource="http://tematres.nb.no/vocab"/> <skos:broader rdf:resource="http://tematres.nb.no/vocab/479"/> <skos:exactMatch> <skos:Concept rdf:about="http://tematres.nb.no/vocab/888"> <skos:prefLabel xml:lang="nn">Sudoku</skos:prefLabel> </skos:Concept> </skos:exactMatch> <dct:created>2020-06-18 11:05:39</dct:created> <dct:modified>2021-04-30 12:13:49</dct:modified> </skos:Concept>

In our installation, we use:
$CFG["ISO639-1"]=array( "no"=>array("no","Norwegian"), "nb"=>array("nb","Norwegian (bokmål)"), "nn"=>array("nn","Norwegian (nynorsk)"), "se"=>array("se","Northern Sami"), "ab-AB"=>array("ab-AB", "Abkhazian"), ...

So, where does the tag 'nb-NB' come from? I'm hoping for your help on this.

Adding a language

Hi, thank you for this software, I am a new user.

We are creating a multilingual thesaurus in the different Philippine languages. However, when adding a scope note to a term, in the Language dropdown, we do not have the languages we are using (which is what we expected). How can we add languages in the dropdown?
Screenshot 2022-04-22 010359

I checked the wiki and was also looking for user manuals in English but I may have missed them, if this is already addressed in those, I would appreciate anyone pointing me in that direction. Thanks again!

After importing a skos-core file, the front page hierarchy is not displaying in alphabetical order

I am trying to move a vocabulary from a TemaTres installation hosted on my work laptop to one hosted on a web server.

Here is what I did:

  1. Export entire vocabulary from my laptop TemaTres in skos-core format
  2. Import skos-core file into the cloud-hosted TemaTres

Result:
The hierarchy on the front page of my taxonomy at my web host is not displaying in alphabetical order.
See it at https://ohsu-library.000webhostapp.com/ohsu-research/index.php

Expected Result:
The hierarchy on the front page should be in alphabetical order, just like on my laptop.

Request: custom meta tags into to vocab head

Wish there was an easy way to include more metatags in the vocab head.
Now its auto populated.
Couldn't find a way to hard code my custom tags (I did it in the old version).
Is there an easy way now?

Would love to include Google Analytics or custom tags as in:

Manifest for app like usage with Android devices

	<!-- Favicon Android -->
	<link rel="manifest" href="../manifest.json" />
	<meta name="theme-color" content="#77959e" />

IEconfig file with icons for Windows10

	<!-- Favicon Windows IE -->
	<meta name="msapplication-config" content="../IEconfig.xml" />
	<meta name="application-name" content="XPTO Vocab" />
	<meta name="msapplication-TileColor" content="#afa782" />

iOS and Opera icons

	<!-- Favicon iOS -->
	<link rel="apple-touch-icon-precomposed" href="../common/images/app/apple-touch-icon-precomposed.png" />
	<link rel="mask-icon" href="../common/images/app/safari-pinned-tab.svg" color="#5bbad5" />

OpenGraph custom thumbnail image for social sharing

	<!-- OpenGraph Facebook -->
	<meta property="og:image" content="../common/images/custom_image.jpg" />
	<meta property="og:image:height" content="363" />
	<meta property="og:image:width" content="694" />

Password recovery sent multiple new passwords

I have a fresh install of Tematres and I think I found a bug: I requested a new password but received 3 new ones in 8 hours.

URL: /vocab/login.php?task=recovery

Details:

  • I received a new password right after requesting it, I changed it to a new one and continued using Tematres (that's the expected).
  • After like 5,5 hours I received another new password in the email.
  • After another 2 hours I received another one.

These 3 messages were all with different passwords and I received them duplicated (2 emails at each time).

image

Tematres with PHP 7

just for a report on PHP compatibility

  • Termatres vocab works fine with PHP 7.0.3 and 7.0.11

  • Many errors with PHP 7.2.14 (debug on)
    2019-05-07 20_54_01-INDEXA RBE - Tesauro geral - Opera

Import format with code

Hi,

I need a new format to import hierarchical vocabulary with code. I need an format like Tabulated text, but using an character to insert a code. Like:

South America|SA
Argentina|AR
Buenos Aires = Bs As
Brazil|BR
Uruguay|UY

Is possible?

Thanks

Language codes when using TinyMCE

Using Tematres 3 with language pt-PT, error from tinymce shows when editing a term note:

Failed to load plugin url: http://localhost/indexa11/common/tinymce/langs/pt-PT.js

Folder has the proper language file but its using the name after code with underscore: pt_PT.js
When renaming to pt-PT.js the error goes away but for the translation to be used had to change the first line of the file for
tinymce.addI18n('pt-PT'

Strange: There is also another folder with language files at:
common/tiny_mce4/langs

Tematres sholud also update the tinyMCE from source http://www.tinymce.com/
Translators can improve their language files here https://www.transifex.com/projects/p/tinymce/

Reports based on modification date

Currently, it is possible to filter reports and Advanced search according to the creation month of the terms ("Created on or after"). It would be great if the same could be offered for modification. That is, we would like to be able to take out reports on terms "Modified on or after".

Lang file names for en-GB and en-US

Lang files for en-GB and en-US has been changed, but files in common/tinymce/langs were not updated.
en_GB.js should be renamed to en-GB.js, en-US does not exist in the folder.

Failed to load plugin url: http://.../common/tinymce/langs/en-GB.js
Failed to load plugin url: http://.../common/tinymce/langs/en-US.js

Labels missing -Vocab Config

There is some language values missing in Vocab config menu
Using version 3 (from Git). It doesn't look to be a problem caused by language file missing keys.

See:
CFG_PUBLISH
2019-05-06 14_07_14-

The table:
2019-05-06 15_06_47-localhost _ mysql wampserver _ indexa11 _ lc_values _ phpMyAdmin 4 1 14

Terms with no subordinates are not displayed in tree

I have a hierarchical vocabulary in which some of the terms have no relationship to any other terms.
With parameter _SHOW_TREE=Yes, the unrelated terms do not show up in the hierarchy on the Home page. For all intents and purposes unrelated terms are top terms, and should as such be displayed in the hierarchy up front.
As it is now, only top terms with subordinates are shown. Is there something we can do to correct this?

Expanding/collapsing nested terms is broken under certain conditions

When viewing the details page of a term (e.g. vocab/index.php?tema=123) that has one or more narrower terms under it, TemaTres groups the blocks of narrower terms under HTML <ul> tags. These are used when clicking on the blue arrow buttons next to a term, in order to expand or collapse the hierarchy.

We recently came across a case where this does not work as intended.

When the same term appears more than once in the page, the aforementioned <ul> tags do not have unique identifiers (HTML id property) across the DOM. In such a scenario, only the first expand/collapse button (blue arrow) for the term that appears multiple times will operate normally; the remaining expand/collapse buttons (for the same term) will misbehave, since clicking on them causes the first instance of the term to expand/collapse. Here's a screen capture showing this in action (the problematic term is "theodicy"):

capture

To fix this issue, I modified the HTMLverTE() function so that the depth level of the current term ($i) is appended to the term's id ($tema_id):

--- fun.html.php.2022-02-23.AR 2022-02-08 11:39:25.455402512 +0200
+++ fun.html.php               2022-02-24 17:07:58.957357996 +0200
@@ -1109,7 +1109,7 @@ function HTMLverTE($tema_id, $i_profundi

     global $CFG;
     $sql=SQLverTerminosE($tema_id);
-    $rows='<ul id="masTE'.$tema_id.'"  style="list-style:none; display: none">';
+    $rows='<ul id="masTE'.$tema_id.$i.'"  style="list-style:none; display: none">';
     //Contador de profundidad de TE desde la raíz
     $i_profundidad=($i_profundidad==0) ? 1 : $i_profundidad;
     $i_profundidad=++$i_profundidad;
@@ -1119,7 +1119,7 @@ function HTMLverTE($tema_id, $i_profundi
     while ($array=$sql->FetchRow()) {
         if ($array["id_te"]) {
             if ($i<CFG_MAX_TREE_DEEP) {
-                $link_next='  <a href="javascript:expand(\''.$array["id_tema"].'\')" title="'.LABEL_verDetalle.' '.$array["tema"].' ('.TE_termino.')" ><span id ="expandTE'.$array["id_tema"].'">&#x25ba;</span><span id ="contraeTE'.$array["id_tema"].'" style="display: none">&#x25bc;</span></a> ';
+                $link_next='  <a href="javascript:expand(\''.$array["id_tema"].$i.'\')" title="'.LABEL_verDetalle.' '.$array["tema"].' ('.TE_termino.')" ><span id ="expandTE'.$array["id_tema"].$i.'">&#x25ba;</span><span id ="contraeTE'.$array["id_tema"].$i.'" style="display: none">&#x25bc;</span></a> ';
                 $link_next.=HTMLverTE($array["id_tema"], $i_profundidad, $i);
             } else {
                 $link_next='&nbsp; <a title="'.LABEL_verDetalle.TE_termino.' '.$array["tema"].'" href="'.URL_BASE.'index.php?tema='.$array["id_tema"].'">&#x25ba;</a>';

This resulted in <ul> identifiers that seemed unique, and for a moment I thought the issue was solved.
However, I then realised that if the same term appears more than once under the same depth level, the <ul> ids will not be unique and the problem re-appears. See, for example, what happens when I try to expand the second instance of the term "meditation":

capture2

So, given that my initial approach was not working 100%, I reverted the changes I'd made in the HTMLverTE() function and decided to re-work the internals of the JavaScript expand() function. Here's what I've come up with:

--- js.php.2022-02-24.AR 2021-12-06 14:14:03.000000000 +0200
+++ js.php               2022-02-25 08:41:06.060776783 +0200
@@ -152,9 +152,10 @@ if ($_SESSION[$_SESSION["CFGURL"]]["ssus
 ?>

 function expand( id ) {
-    var details = document.getElementById('masTE' + id );
-    var enlaceMas= document.getElementById( 'expandTE' + id );
-    var enlaceMenos= document.getElementById( 'contraeTE' + id );
+    var current = document.activeElement;
+    var details = current.nextElementSibling;
+    var enlaceMas= current.childNodes[0];
+    var enlaceMenos= current.childNodes[1];
     details.style.display = ( details.style.display == 'block' ) ? 'none' : 'block';
     enlaceMas.style.display = ( details.style.display == 'block' ) ? 'none' : 'inline';
     enlaceMenos.style.display = ( details.style.display == 'block' ) ? 'inline' : 'none';

This seems to have done the trick -- I can now expand and collapse the "theodicy" and "meditation" terms and it works fine.

I'm a bit hesitant to raise a PR, though, because in the long term my JS fix may not be enough (e.g. if the HTML layout of the details page changes in the future).

@tematres: I'd value your opinion on this!
Do you think the JS fix is the best way forward?
Do you have any ideas about how to produce 100% unique ids across the page?

Thank you! 👍

Inconsistent behavior in Term editor vs. Add to target vocabulary

I have a multilingual vocabulary configured not to accept duplicate terms. Multilingualism is managed using internal target vocabularies.
Sometimes preferred terms are identical across languages. This has caused no problem, as the function Relations between vocabularies does allow the addition of a term, even when it is identical to the corresponding term in some other language. This is as it should be: The no-duplicates setting should only restrict terms within each separate language.

However, if for some reason the term in some language becomes identical to its corresponding term in another language through trying to use the term editor, an error is thrown.

Example case: The genre Festschrift has the same preferred term in both languages nb and nn: Festskrift

  • During registration, the nn term is misspelled 'Festsskrift', and saved.
  • Later, the error is discovered, and the user tries to correct the nn term in the Term editor. This is denied with reference to duplicate terms.

This is in my opinion a bug in the Term editor.

Chinese Sinicization?

Not find messages_zh-CN
/tematres/common/forms/localization/messages_zh-CN.js net::ERR_ABORTED 404 (Not Found)

Term hyperlinks are styled differently depending on PHP version

Click here to read some background information (aka the TL;DR section!) We have a local TemaTres installation accessible only from hosts in our Intranet, which we use as an ever-growing thesaurus of theological terms (we call it "ReligTres" 😲).

This is also where development takes place, as we have customised parts of the code to suit our needs (for example the addition of a modal login form, which eventually found its way upstream in #44 thanks to Diego/@tematres 😉).
A dump of the local TemaTres database is uploaded daily to a public-facing instance of the same thesaurus which you can see here.
The local source code tree is also synced (though less frequently) with that of the remote server (usually after any changes have been tested and found to be working OK).
Earlier this week I upgraded the O/S that hosts our local TemaTres instance from Debian 11.7.0 to 12.1.0.
This involved an update of PHP as well (now running version 8.2.7).
I also upgraded our local TemaTres from v3.4 to v3.4.3.
After this, we noticed that the "About.." page was broken, with a PHP Fatal error being written in the Apache log files.
To fix this, I cherry-picked all remaining commits to master since v3.4.3 (on top of our local Git branch) (991dec2 being the crucial commit) -- the "About..." page issue was gone.
So, basically, we were happily running the bleeding edge of the source code (plus any local changes we've made, of course).
Since no other major issue was observed in our testing, I rsync'd the local source tree with the remote server.

And now, for the actual issue 😛:

We noticed that the hyperlinks for Accepted Terms (estado_id = 13) shown in the "Recent changes" page (vocab/index.php?s=n) are styled differently (green colour vs. blue) between two TemaTres installations that we administer.
Both installations are running off the same source code tree (essentially the upstream TemaTres master plus some changes we've made), but are on different servers.
Server 1 is a Debian 12.1.0 system with PHP 8.2.7.
Server 2 is a Debian 10.13.0 system with PHP 7.3.31 -- this is where the issue was observed.
In server 1, the hyperlinks are green (correct), but in server 2 the links are blue (incorrect).

Here's a couple of screenshots to illustrate what's happening (click to expand this section):

screenshotOK

screenshotBAD

As you can see above, in server 2 the estado_termino13 class is missing from the a elements.
Therefore, the styling applied to the hyperlinks (CSS color property) comes from the default Bootstrap v3.3.7 theme instead of being overriden by TemaTres's own CSS.

The commit that introduced the green styling is 190c826.

The HTMLlistaTerminosFecha function is responsible for building the table of Terms in the "Recent changes" page.
Inside the while loop, HTMLlinkTerm is called for each Term fetched from the database with SQLlastTerms:

function HTMLlistaTerminosFecha($limite = "")
{
//Descripcion de estados
$arrayEstados=array("12"=>LABEL_Candidatos,"13"=>LABEL_Aceptados,"14"=>LABEL_Rechazados);
$sql=SQLlastTerms($limite);
$rows='<div><h3>'.ucfirst(LABEL_newsTerm).'</h3>' ;
if (SQLcount($sql)>0) {
$rows.='<div class="table-responsive"> ' ;
$rows.='<table id="termaudit" class="table table-striped table-bordered table-condensed table-hover">
<thead>
<tr>
<th>'.ucfirst(LABEL_Termino).'</th>
<th>'.ucfirst(LABEL_lastChangeDate).'</th>
</tr>
</thead>
<tbody>' ;
while ($array = $sql->FetchRow()) {
$css_class_MT=($array["isMetaTerm"]==1) ? ' class="metaTerm" ' : '' ;
$styleTerm='estado_termino'.$array["estado_id"];
$fecha=(@$array["cuando_final"]) ? $array["cuando_final"] : $array["cuando"];
$rows.= '<tr>' ;
$rows.= ' <td>'.HTMLlinkTerm($array, array("style"=>$styleTerm,"modal"=>1)).'</td>' ;
$rows.= ' <td>'.$fecha.'</td>' ;
$rows.= ' </tr>' ;
};
$rows.=' </tbody> </table>' ;
$rows.=' </div>' ;
}
$rows.='</div>' ;
return $rows;
};

function HTMLlinkTerm($arrayTerm, $arg = array())
{
$class=(strlen(array2value("style", $arg)>0)) ? $arg["style"] : '' ;
$class.=(array2value("isMetaTerm",$arrayTerm)==1) ? ' metaTerm' : '' ;
$url_parts=parse_url($_SESSION["CFGURL"]);
//if is modal link
if ($arg["modal"]==1) {
return '<a href="'.$url_parts['scheme'] . '://' . $url_parts['host'] . ':' . @$url_parts['port'] . @$url_parts['path'].'modal.php?tema='.$arrayTerm["tema_id"].'" class="modalTrigger '.$class.'">'.$arrayTerm["tema"].'</a>' ;
}
$urlTerm=$url_parts['scheme'] . '://' . $url_parts['host'] . ':' . $url_parts['port'] . $url_parts['path'].'index.php?tema='.$arrayTerm["tema_id"].'&amp;/'.string2url($arrayTerm["tema"]);
return '<a class="'.$class.'" href="'.$urlTerm.'" title="'.LABEL_verDetalle.$arrayTerm["tema"].'" lang="'.$arrayTerm["lang"].'">'.$arrayTerm["tema"].'</a>' ;
}

function array2value($key,$array=array())
{
$array=(is_array($array)) ? $array : array();
return (isset($array["$key"])) ? $array["$key"] : null;
}

The important change from 190c826 is this:

@@ -1884,7 +1942,8 @@ function HTMLlinkTerm($arrayTerm, $arg = array())
 {

-    $class=(@$arg["style"]) ? $arg["style"] : '';
+    $class=(strlen(array2value("style", $arg)>0)) ? $arg["style"] : '' ;
+
+    $class.=(array2value("isMetaTerm",$arrayTerm)==1) ? ' metaTerm' : '' ;

-    $class.=($arrayTerm["isMetaTerm"]==1) ? ' metaTerm' : '';

     $url_parts=parse_url($_SESSION["CFGURL"]);

The culprit is this line:

$class=(strlen(array2value("style", $arg)>0)) ? $arg["style"] : '' ;

Notice how the argument to strlen is array2value("style", $arg)>0 but I'm guessing that @tematres meant to write this as:

$class=(strlen(array2value("style", $arg))>0) ? $arg["style"] : '' ;

In fact, if I move the closing parenthesis for the strlen call two characters to the left, I get green hyperlinks on both servers!

In case anyone's interested, I've set up a small code sample here to investigate why we get different behaviour based on the PHP version.

Spanish word in master language

From the commit 7b0c149

It was
define('LABEL_order','order');

now
define('LABEL_order','orden');

but "orden" is Spanish word for "Order" in english, so it should be fixed

Unable to import file

Hi, I deployed the project.I want to use the menu -> System Management -> import function.But there was a problem. Could you help me.
I used docker to install the Httpd + PHP environment, I tried twice.

first:

Installing PHP7.1.33 can start the project,but error message while importing skos-core file.

sudo docker exec httpd rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
PHP Fatal error:  Uncaught Error: Class 'DOMDocument' not found in /var/www/html/tematres/common/include/inc.importSkos.php:284\nStack trace:\n#0 /var/www/html/tematres/vocab/admin.php(166): include_once()\n#1 {main}\n  thrown in /var/www/html/tematres/common/include/inc.importSkos.php on line 284, referer: http://xxx:9003/tematres/vocab/admin.php?doAdmin=import

Then I use yum to install php-xml, prompted no software package.

php -m |grep xml only libxml

Tabulated text:

 Uncaught Error: Call to undefined function utf8_decode() in /var/www/html/tematres/common/include/inc.import.php:96\nStack trace:\n#0 /var/www/html/tematres/vocab/admin.php(156): include_once()\n#1 {main}\n  thrown in /var/www/html/tematres/common/include/inc.import.php on line 96, referer: http://xxx:9003/tematres/vocab/admin.php?doAdmin=import

second

Php5.4.16 installed, cannot start project.

 PHP Parse error:  syntax error, unexpected 'finally' (T_STRING), expecting catch (T_CATCH) in /var/www/html/tematres/common/include/adodb5/adodb.inc.php on line 1684

but

but  php -m |grep xml   

libxml
xml
xmlreader
xmlrpc
xmlwriter

Better support for multilingual SKOS

Uservoice post : https://tematres.uservoice.com/forums/35866-general/suggestions/6291119-better-support-for-multilingual-skos
[ (but I find it easier to tag a comment, a commit or anything on github if I do here a issue report. ]

Hi Diego,

we're here building an entire new specification for a subset of TEI (Text Encoding Initiative) XML files, for the european research EuRED project (see eured.univ-lemans.fr). We're aiming our efforts to publish skos versions of our translated vocabulary (a dozen).
To be perfectly compatible to TEI recommandations, each used term should be defined either through direct definition, inside the XML, or through external reference, and there goes Tematres.

Having xml:lang title version would fulfill these requirements, whereas skos:exact match emplies to consider we have different external thesaurus versions (and not a single URL for a term).
That's a challenge for us.

Do you have any idea on how to implement xml:lang ? May I be of some help ?

The installation content is not displayed after selecting the language

Hi,

I'm installing TemaTres according to the tutorial, but when I start php:7.4-apache and run vocab/install.php, the installation content is not displayed, and this page is still displayed when I select the language:

95606dd1bc4b2067977f9974c1cb1be

Did I do something wrong?

Here's my environment:

TemaTres:latest from github
mysql:5.7.27 - InnoDB
php:7.4-apache

Here's my db.tematres.php:

<?php
/*
 *  db.tematres.php
 *
 *  Copyright 2011-2020 diego ferreyra <[email protected]>
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 *  MA 02110-1301, USA.
 */

/*
    Configuarcion de base de datos - Database Configuration
    Select driver to use
    Default: MySQLi , can be mysqli,postgres, oci8, mssql, and more: http://phplens.com/adodb/supported.databases.html
    To default value, leave empty eg: $DBCFG["DBdriver"] ="";
*/

$DBCFG["DBdriver"] ="";

/** Dirección IP o nombre del servidor - IP Address of the database server */
$DBCFG["Server"]      = "10.0.90.117";

/** Nombre de la base de datos Database name */
$DBCFG["DBName"]     = "tematres";

/** Nombre de usuario - login */
$DBCFG["DBLogin"]    = "root";

/** Passwords */
$DBCFG["DBPass"] = "mypass";

/** Prefijo para tablas # Prefix for tables */
$DBCFG["DBprefix"] = "lc_";

/**
 *  In almost cases, you don't need to touch nothing here!!
 */

 /** Default charset for the database */
$DBCFG["DBcharset"] ="utf8";

/** Modo debug = 1 // debug mode = 1 */
$DBCFG["debugMode"] = "0";

/** Persist connection to DB. TRUE = 1 // FALSE mode = 0. Default: TRUE */
$DBCFG["DBpersist"] = "1";

/** Use or not DSN. Default: DSN */
$DBCFG["DBmodeConnect"] = "DSN";

/** Config MySql engine type:  MyISAM / InnoDB  (default MyISAM to maintain back compatibility)*/
$DBCFG["DBengine"] = "InnoDB";


/** Define if storage hashed passwords or not  (1 = Yes, 0 = No: default: 0) */
define('CFG_HASH_PASS', '0');



/** Change to whatever timezone you want */
if (date_default_timezone_get()!=ini_get('date.timezone')) {
    date_default_timezone_set('Etc/UTC');
}

/**  Absolute path to the directory where are located /common/include. */

if (!defined('T3_ABSPATH')) {
/** Use this for version of PHP < 5.3 */
    //define('T3_ABSPATH', dirname(__FILE__) . '/../');

    /**
*
 * Use this for version of PHP >= 5.3
*/
    define('T3_ABSPATH', dirname(__DIR__) . '/');

    /**
*
 * Use to define specific local path for common/include directory
*/
    //define('T3_ABSPATH', '/var/www/html/');
};

Best Regards

Incorrect datetime value

Working with from an empty database, TemaTres 3.0 (from git repo), Windows wamp server, PHP 7.03, MySQL 5.7.17, with Debug on.

When importing a file (labeled file) an error is displayed when the process ends:
Incorrect datetime value: '0000-00-00' for column 'cuando_final' at row 1Incorrect datetime value: '0000-00-00' for column 'cuando' at row 1
The import process concludes fine. Should the error be avoided or is it safe to be ignored?

2019-05-06 16_18_42-localhost _ mysql wampserver _ indexa11 _ lc_tema _ phpMyAdmin 4 1 14

2019-05-06 16_17_18-localhost _ mysql wampserver _ indexa11 _ lc_tema _ phpMyAdmin 4 1 14

Duplicated lines - ES language

Those lines are duplicated in the ES language file

define('LABEL_Replace','reemplazar');
define('LABEL_Preview','vista previa');
define('LABEL_Replace','reemplazar');
define('LABEL_Preview','vista previa');

define('LABEL_Replace','reemplazar');
define('LABEL_Preview','vista previa');
define('LABEL_Replace','reemplazar');
define('LABEL_Preview','vista previa');

Errors in v. 3.4

Hi, We just tried to install version 3.4., but the GUI doesn't come up, only text.
It appears that all CSS comes with "httpss" in stead of "https". Could you please correct this as soon as possible?

Vocabular URI and broken links

Using a vocubulary URI (as entered in the Vocabulary configuration form) other than the actual host/path URL of our tematres instance causes a problem with certain links.

E.g. our tematres instance is to be found at http://myhost.mysite.no/tematres/vocab/
but we want the vocabulary URI to be independant of this, e.g. http://my.id.no/vocab

In two cases the vocabulary URI occurs in (invalid) links within the application:
• The hierarchical representation of the vocabulary on the home page. (Navigation arrows works, but all concept links are dead.)
• On successful login, there is a redirect to the vocabulary URI, not to tematres.

All other links seems to works perfectly, e.g. using search or alphabetic navigation.

We have found minimal ad hoc fixes for the two cases, by making the relevant link URLs relative:

In common/include/fun.html.php (1949)

  •      -  $urlTerm=$url_parts['scheme'] . '://' . $url_parts['host'] . ':' . $url_parts['port'] . $url_parts['path'].'index.php?tema='.$arrayTerm["tema_id"].'&amp;/'.string2url($arrayTerm["tema"]);
    
  •      +  $urlTerm='index.php?tema='.$arrayTerm["tema_id"].'&amp;/'.string2url($arrayTerm["tema"]);
    

In common/include/session.php (106)

  •      -  header("Location: " . $_SESSION["CFGURL"].$add_param);
    
  •      +  header("Location: " .$add_param);
    

This mends the observed issues, but we have not done extensive testing, and we are not certain whether this is a sustainable solution.

Adding two exports : multicolumn CSV output (for easy import to other tools) ; one list label for translation process

Hi again,

I've hacked Tematres to add under the export menu two new options :

  • simple CSV export (code of the parent term, label of the parent term, code of the actual term, label, notes) intended to allow easy import for non ready skos tools
  • export with only one label per row for translation process

Are you ok for such a pull request ?
Do you want me to separate those ?

Bye,

Gautier

The terms were deleted or not? [Language]

There is an issue with a language value in the file: /common/lang/en-utf-8.inc.php
The English versions says "the terms were deleted" but the Spanish version says "the terms were NOT deleted". Some languages translated it from the English and some from the Spanish, ending up with opposite translations.
So I'm requesting @tematres for a clarification on this!

English:
define('MSG_termsNoDeleted','the terms were deleted');
https://github.com/tematres/TemaTres-Vocabulary-Server/blob/master/common/lang/en-utf-8.inc.php#L436

Spanish
define('MSG_termsNoDeleted','términos no fueron eliminados');
https://github.com/tematres/TemaTres-Vocabulary-Server/blob/master/common/lang/es-utf-8.inc.php#L436

Note: The string was introduced in v2.0, see b87fef9#diff-29b0d3bfb89baa1606661df8f76ad8b1

Language code format

In /common/lang/en-utf-8.inc.php
https://github.com/tematres/TemaTres-Vocabulary-Server/blob/master/common/lang/en-utf-8.inc.php

What is the usage for this string?
define("LANG","en");

Does it need to be the same as used in $CFG["ISO639-1"]=array(
and $idiomas_disponibles = array(
https://github.com/tematres/TemaTres-Vocabulary-Server/blob/master/common/include/config.tematres.php#L71

Can we use a 4 letters format in language code or does it accept just the 2 letters format?
I don't know if the language code acts as a key for the interface language file or any editor language file.

Some languages need to use the 4 letter code (xx-XX) as Portuguese and Chinese (or english US and GB) and any other regional variant in the future)

Note that Crwodin saves files automatically using the 4 letter code standard so it would be better to normalize this to xx-XX format.

If you want, I can make the change to the language files!

The multilingual editor

I have a vocabulary with several target vocabularies (labels in several languages).
Since there is no import facilities for target vocabularies, I wanted to use the multilingual (bulk) editor. That worked fine for the first target voc. However, when trying to use the editor to insert the terms in the next target vocabulary, there was no possibility to add terms in the latter vocab. See attached figure: Here I have opened the target vocab Løøv nynorsk (NN), as shown in the column heading. However, all the red terms belong to another target vocab (Løøv samisk (se)), which I have already inserted using the multilingual editor.
How can I now add terms to the target vocabulary shown in the column heading (Løøv nynorsk (NN))?
I am aware of the Relations between vocabularies facility connected to individual terms, but that is extremely cumbersome, seeing that I have 4 different target libraries to insert.
Any suggestions?
multiling
?

SKOS export contains property not defined in SKOS

Hi,
When exporting a multilingual vocabulary, in which 2 terms are declared partially equivalent, - this is exported to SKOS as
-<skos:partialMatch> -<skos:Concept rdf:about="https://id.nb.no/vocabulary/ntsf/992"> <skos:prefLabel xml:lang="en">Additional term</skos:prefLabel> </skos:Concept> </skos:partialMatch>

However, there is no such thing as "partialMatch" in SKOS. skos:closeMatch should be used here.
Also, this behaviour doesn't really match with the Link type editor, in which all the SKOS mapping relations are listed (exactMatch, closeMatch, narrowMatch, broadMatch and relatedMatch). It seems TemaTres doesn't take these into account at all....

Cannot modify / change the status of candiate terms

Dear @tematres I have been using TemaTres with my students. We have approached the problem with candidate terms. When the term is added and the "candidate term" status is selected, we cannot edit the term and change its status for a valid one.

There are no candidate terms on the alphabetical list of all terms. Candidate terms are presented only through show/candidate terms but the link is dead.

We are using TemaTres TemaTres 3.1. Any solutions will be helpful because we have many candidate terms in our projects. Best regards, Marcin

Add option to enforce https

Hello,

Since I use tematres with docker, behind an ingress controller (Nginx Loadbalancer) the function getURLBase is not working as expected because the protocal between my loadbalancer and the docker image is http.

So we have now some mixt-content blocked by browsers.

What do you think about adding an entry into the config.tematres.php ?
Like : CFG["https_enforce"] = true | default to false

And then adapt this piece of code :

function getURLbase()
{
        // The line below need to be adapted.
        $s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : ""; 

	$protocol = substr(strtolower($_SERVER["SERVER_PROTOCOL"]), 0, strpos(strtolower($_SERVER["SERVER_PROTOCOL"]), "/")) . $s;
	$port = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]);
	$uri = $protocol . "://" . $_SERVER['SERVER_NAME'] . $port . $_SERVER['REQUEST_URI'];
	$segments = explode('?', $uri, 2);
	$url = $segments[0];

	$url_base=substr($url,0,strripos($url,"/")+1);

	return $url_base;
}

Feature Request - MARC 21 XML Import - Additional Elements

Hello,

As far as I can tell, "Import thesaurus from file" using the format "MARC 21 XML" will import the following Topical Term elements:

  • Term
  • BT
  • NT
  • UF
  • USE (?)

That is; MARC tags 150 and 550 (subfield w).

If it does import other elements, I cannot find them; please let me know if I am doing something wrong, and just missing them.

If it is correct that other elements are not being imported, can some more be added please?

It would, for example, be very beneficial to include "Field Definition and Scope" with the MARC XML import.
That comes under MARC 68X (See: https://www.loc.gov/marc/authority/ad66768x.html).
Here is a sample:

<datafield tag="150" ind1=" " ind2="0">
<subfield code="a">Firedamp</marcxml:subfield>
</datafield>
[...]
<datafield tag="680" ind1=" " ind2=" ">
<subfield code="i">
Here are entered works on methane as a combustible gas formed in coal mines. Works on methane present in a stratum of coal are entered under
</subfield>
<subfield code="a">Coalbed methane.</subfield>
</datafield>
<datafield tag="681" ind1=" " ind2=" ">
<subfield code="i">Note under</subfield>
<subfield code="a">Coalbed methane</subfield>
</datafield>

(Derived from: https://id.loc.gov/authorities/subjects/sh85048469.marcxml.xml)

With thanks,
Clifford.

The Termatres API redirects to the login page

We want to query the Termatres API from the web interface of another application.

It works correctly if we are logged on Termatres on the same browser.

But, if we are not logged in, the request on the API fails because it returns to the login page.

Where could this problem come from ?

Thank you.

Importing Skoscore

I have a Tematres instance setup in a Kubernetes environment.

I try to import a skoscore file but after I click import, Tematres takes me to home and does not show succeed or failure and my terms are not imported. Can you help me with this please?

Master language and collaborative online translation [RFC]

This is a request for comment/new feature: @tematres
In TemaTres what is the language file to be considered as the "source/master language"? English or Spanish?

This because I would like to setup a collaborative translation platform to translate files online.
Its faster and makes any file fully synchronized with the original.
In any translation software English should be the source for the others but I don't know if the english file from Tematres is fully updated with the spanish as there are some little differences.

Collaborative online translation

I would like to use a translation platform like Transifex or Crowdin (both free for opensource). I can setup it myself or better yet ask Diego to create it and then allow us to translate.
Note: Those platforms allow language team managers (approval rights) and plain translators for each language, so things will not be deleted by a new member! Actual translators would be invited as team languages managers.
The updated translations could be submitted to GITHUB by each translator or by the Tematres author.
Download from the system is free too (using web interface or using their CLI tools)

Warning: implode(): Invalid arguments passed - fun.xml.php

Just FYI:

Warning: implode(): Invalid arguments passed in 
..\common\include\fun.xml.php on line 1013

2019-05-06 19_51_38-INDEXA RBE - Lista geral

Setup:
TemaTres 3.0 (from git repo), clean database,
Windows wamp server,
PHP 5.6.18 (also display if using 7.03), MySQL 5.7.17, with Debug on.

International characters (character encoding)

TemaTres doesn't seem to be able to distinguish between certain international characters, and therefore complains about duplicate terms when they are not.
Example: The characters 'å' and 'a' are considered identical in TemaTres. However, in Norwegian these are 2 different characters. That is, terms between which the å/a is the only difference must be allowed to coexist. E.g., 'Gård' and 'Gard' are different terms.

I assume this problem has to with the character encoding scheme used in TemaTres?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.