[+FEATURE] Implemented reference, pronounciation, and media property.
authorjocrau <jocrau@735d13b6-9817-0410-8766-e36946ffe9aa>
Thu, 11 Nov 2010 14:13:58 +0000 (14:13 +0000)
committerBastian Bringenberg <spam@bastian-bringenberg.de>
Thu, 4 Dec 2014 23:56:08 +0000 (00:56 +0100)
* The reference property is a textual representation of the term source.
* The media property can store a reference to video and sound files. See the cObj MULTIMEDIA for documentation.

git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/contagged/trunk@40073 735d13b6-9817-0410-8766-e36946ffe9aa

ext_tables.sql
locallang_db.xml
pi1/class.tx_contagged_pi1.php
pi1/contagged.tmpl
pi1/locallang.xml
static/setup.txt
tca.php

index 1cda653..de9a0a0 100644 (file)
@@ -32,11 +32,14 @@ CREATE TABLE tx_contagged_terms (
        term_replace tinytext NOT NULL,
        desc_short tinytext NOT NULL,
        desc_long text NOT NULL,
+       reference text NOT NULL,
+       pronunciation tinytext NOT NULL,
        image text NOT NULL,
        dam_images int(11) DEFAULT '0' NOT NULL,
        imagecaption text NOT NULL,
        imagealt text NOT NULL,
        imagetitle text NOT NULL,
+       multimedia tinytext,
        related int(11) DEFAULT '0' NOT NULL,
        link tinytext NOT NULL,
        exclude tinyint(3) DEFAULT '0' NOT NULL,
index 63995e5..1fdf24b 100644 (file)
                        <label index="tx_contagged_terms.term_replace">Replacement</label>
                        <label index="tx_contagged_terms.desc_short">Short Description (e.g. Tool Tip Text)</label>
                        <label index="tx_contagged_terms.desc_long">Long Description</label>
+                       <label index="tx_contagged_terms.reference">Source</label>
+                       <label index="tx_contagged_terms.pronunciation">Pronunciation (IPA)</label>
                        <label index="tx_contagged_terms.imagecaption">Caption</label>
                        <label index="tx_contagged_terms.imagealt">ALT-Text</label>
                        <label index="tx_contagged_terms.imagetitle">TITLE-Text</label>
+                       <label index="tx_contagged_terms.multimedia">Media</label>
                        <label index="tx_contagged_terms.related">See also</label>
                        <label index="tx_contagged_terms.link">Link</label>
                        <label index="tx_contagged_terms.exclude">Exclude from front-end lists</label>
                        <label index="tx_contagged_terms.term_replace">Ersatz</label>
                        <label index="tx_contagged_terms.desc_short">Kurzbeschreibung (z.B. Tool-Tip-Text)</label>
                        <label index="tx_contagged_terms.desc_long">Ausführliche Beschreibung</label>
+                       <label index="tx_contagged_terms.reference">Quelle</label>
+                       <label index="tx_contagged_terms.pronunciation">Aussprache (IPA)</label>
                        <label index="tx_contagged_terms.imagecaption">Bildunterschrift</label>
                        <label index="tx_contagged_terms.imagealt">ALT-Text</label>
                        <label index="tx_contagged_terms.imagetitle">TITLE-Text</label>
+                       <label index="tx_contagged_terms.multimedia">Media</label>
                        <label index="tx_contagged_terms.related">Siehe auch</label>
                        <label index="tx_contagged_terms.link">Verweis</label>
                        <label index="tx_contagged_terms.exclude">Von Frontend-Listen ausschließen</label>
                        <label index="tx_contagged_terms.term_replace">Remplacement</label>
                        <label index="tx_contagged_terms.desc_short">Description courte (ex. Union Européenne)</label>
                        <label index="tx_contagged_terms.desc_long">Description longue</label>
+                       <label index="tx_contagged_terms.reference">Source</label>
+                       <label index="tx_contagged_terms.pronunciation">Prononciation (IPA)</label>
                        <label index="tx_contagged_terms.imagecaption">Légende(s) de(s) image(s)</label>
                        <label index="tx_contagged_terms.imagealt">Texte(s) alternatif(s) de(s) image(s)</label>
                        <label index="tx_contagged_terms.imagetitle">Titre(s) de(s) image(s)</label>
+                       <label index="tx_contagged_terms.multimedia">Media</label>
                        <label index="tx_contagged_terms.related">Voir aussi</label>
                        <label index="tx_contagged_terms.link">Lien</label>
                        <label index="tx_contagged_terms.exclude">Ne pas afficher dans le glossaire</label>
index 42ecb53..f64e385 100644 (file)
@@ -262,7 +262,7 @@ class tx_contagged_pi1 extends tslib_pibase {
                                $termArray[$fieldName] = $this->parser->parse($termArray[$fieldName], array('excludeTerms' => implode(',', $excludeTerms)));
                        }
                }
-               
+                               
                $markerArray['###TERM_TYPE###'] = $typeConfigArray['label'];
                $markerArray['###TERM###'] = $termArray['term'];
                $editIconsConf = array(
@@ -275,7 +275,12 @@ class tx_contagged_pi1 extends tslib_pibase {
                $markerArray['###TERM_REPLACE###'] = $termArray['term_replace']?$termArray['term_replace']:$this->pi_getLL('na');
                $markerArray['###DESC_SHORT###'] = $termArray['desc_short']?$termArray['desc_short']:$this->pi_getLL('na');
                $markerArray['###DESC_LONG###'] = $termArray['desc_long']?$termArray['desc_long']:$this->pi_getLL('na');
+               $markerArray['###REFERENCE###'] = $termArray['reference']?$termArray['reference']:$this->pi_getLL('na');
+               $markerArray['###PRONUNCIATION###'] = $termArray['pronunciation']?$termArray['pronunciation']:$this->pi_getLL('na');
                $markerArray['###IMAGES###'] = $this->renderImages($termArray);
+               $multimediaConfiguration = $this->conf['multimedia.'];
+               $multimediaConfiguration['file'] = $termArray['multimedia'];
+               $markerArray['###MULTIMEDIA###'] = $this->cObj->cObjGetSingle('MULTIMEDIA', $multimediaConfiguration);
                $markerArray['###RELATED###'] = $this->renderRelated($termArray);
                $markerArray['###TERM_LANG###'] = $this->pi_getLL('lang.'.$termArray['term_lang'])?$this->pi_getLL('lang.'.$termArray['term_lang']):$this->pi_getLL('na');
 
@@ -288,6 +293,9 @@ class tx_contagged_pi1 extends tslib_pibase {
                $markerArray['###TERM_REPLACE_LABEL###'] = $markerArray['###TERM_REPLACE###']?$this->local_cObj->stdWrap($this->pi_getLL('term_replace'),$labelWrap):'';
                $markerArray['###DESC_SHORT_LABEL###'] = $markerArray['###DESC_SHORT###']?$this->local_cObj->stdWrap($this->pi_getLL('desc_short'),$labelWrap):'';
                $markerArray['###DESC_LONG_LABEL###'] = $markerArray['###DESC_LONG###']?$this->local_cObj->stdWrap($this->pi_getLL('desc_long'),$labelWrap):'';
+               $markerArray['###REFERENCE_LABEL###'] = $markerArray['###REFERENCE###']?$this->local_cObj->stdWrap($this->pi_getLL('reference'),$labelWrap):'';
+               $markerArray['###PRONUNCIATION_LABEL###'] = $markerArray['###PRONUNCIATION###']?$this->local_cObj->stdWrap($this->pi_getLL('pronunciation'),$labelWrap):'';
+               $markerArray['###MULTIMEDIA_LABEL###'] = $markerArray['###MULTIMEDIA###']?$this->local_cObj->stdWrap($this->pi_getLL('multimedia'),$labelWrap):'';
                $markerArray['###RELATED_LABEL###'] = $markerArray['###RELATED###']?$this->local_cObj->stdWrap($this->pi_getLL('related'),$labelWrap):'';
                $markerArray['###IMAGES_LABEL###'] = $markerArray['###IMAGES###']?$this->local_cObj->stdWrap($this->pi_getLL('images'),$labelWrap):'';
                $markerArray['###TERM_LANG_LABEL###'] = $markerArray['###TERM_LANG###']?$this->local_cObj->stdWrap($this->pi_getLL('term_lang'),$labelWrap):'';
index b7ae5ac..10de50a 100644 (file)
                <dd>###TERM_REPLACE_LABEL######TERM_REPLACE###</dd>
                <dd>###DESC_SHORT_LABEL######DESC_SHORT###</dd>
                <dd>###DESC_LONG_LABEL######DESC_LONG###</dd>
+               <dd>###SOURCE_LABEL######SOURCE###</dd>
+               <dd>###PRONUNCIATION_LABEL######PRONUNCIATION###</dd>
                <dd>###IMAGES_LABEL######IMAGES###</dd>
+               <dd>###MULTIMEDIA_LABEL######MULTIMEDIA###</dd>
                <dd>###RELATED_LABEL######RELATED###</dd>
                <dd>###TERM_LANG_LABEL######TERM_LANG###</dd>
                <!-- ###ITEM### end-->
index 87d3a5f..ab25d04 100644 (file)
                        <label index="term_lang">Term Language</label>
                        <label index="desc_short">Short Description</label>
                        <label index="desc_long">Long Description</label>
+                       <label index="reference">Source</label>
+                       <label index="pronunciation">Pronunciation</label>
                        <label index="images">Images</label>
+                       <label index="multimedia">Media</label>
                        <label index="related">See also</label>
                        <label index="lang.en">en.</label>
                        <label index="lang.fr">fr.</label>
                        <label index="term_lang">Sprache</label>
                        <label index="desc_short">Kurzbeschreibung</label>
                        <label index="desc_long">Ausführliche Beschreibung</label>
+                       <label index="reference">Quelle</label>
+                       <label index="pronunciation">Aussprache</label>
                        <label index="images">Bilder</label>
+                       <label index="multimedia">Medien</label>
                        <label index="related">Siehe auch</label>
                        <label index="lang.en">engl.</label>
                        <label index="lang.fr">franz.</label>
                        <label index="backToPage">Retour à la page</label>
                        <label index="desc_long">Longue Description</label>
                        <label index="desc_short">Courte Description</label>
+                       <label index="reference">Source</label>
+                       <label index="pronunciation">Prononciation</label>
                        <label index="details">Plus de détails</label>
                        <label index="header">Glossaire</label>
                        <label index="indexChars">0-9|1|2|3|4|5|6|7|8|9|0,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z</label>
                        <label index="no_matches">Pas de résultat.</label>
                        <label index="pi_list_searchBox_search">Recherche</label>
+                       <label index="multimedia">Media</label>
                        <label index="related">Voir aussi</label>
                        <label index="term">Terme</label>
                        <label index="term_alt">Termes Alternatifs</label>
index 4477bf8..9f68c47 100644 (file)
@@ -102,6 +102,18 @@ plugin.tx_contagged {
                enable = {$contagged.enableSearchBox}
                fieldsToSearch = {$contagged.fieldsToSearch}
        }
+       
+       multimedia {
+               # see cObj MULTIMEDIA for reference
+               file.wrap = uploads/media/
+               params (
+                       width = 100
+                       height = 16
+                       autostart = false
+                       controller = true 
+                       loop = false
+               )        
+       }
                
        types {
 
@@ -162,10 +174,13 @@ plugin.tx_contagged {
                                term_lang.field = term_lang
                                desc_short.field = desc_short
                                desc_long.field = desc_long
+                               reference.field = reference
+                               pronunciation.field = pronunciation
                                image.field = image
                                imagecaption.field = imagecaption
                                imagealt.field = imagealt
                                imagetitle.field = imagetitle
+                               multimedia.field = multimedia
                                related.field = related
                                link.field = link
                                exclude.field = exclude
diff --git a/tca.php b/tca.php
index 124af3d..e75e724 100644 (file)
--- a/tca.php
+++ b/tca.php
@@ -5,7 +5,7 @@ if (!defined ('TYPO3_MODE'))    die ('Access denied.');
 $TCA["tx_contagged_terms"] = array (
        "ctrl" => $TCA["tx_contagged_terms"]["ctrl"],
        "interface" => array (
-               "showRecordFieldList" => "sys_language_uid,l18n_parent,l18n_diffsource,hidden,starttime,endtime,fe_group term_main, term_alt, term_type, term_lang, replacement, desc_short, desc_long, image, dam_images,imagecaption, imagealt, imagetitle, related, link, exclude"
+               "showRecordFieldList" => "sys_language_uid,l18n_parent,l18n_diffsource,hidden,starttime,endtime,fe_group term_main, term_alt, term_type, term_lang, replacement, desc_short, desc_long, reference, pronunciation, image, dam_images,imagecaption, imagealt, imagetitle, multimedia, related, link, exclude"
        ),
        "feInterface" => $TCA["tx_contagged_terms"]["feInterface"],
        "columns" => array (
@@ -171,6 +171,36 @@ $TCA["tx_contagged_terms"] = array (
                                        "rows" => "5",
                                )
                        ),
+                       "reference" => Array (
+                               "exclude" => 1,
+                               "label" => "LLL:EXT:contagged/locallang_db.xml:tx_contagged_terms.reference",
+                               "config" => Array (
+                                       "type" => "text",
+                                       "cols" => "30",
+                                       "rows" => "2",
+                               )
+                       ),
+                       "pronunciation" => Array (
+                               "exclude" => 1,
+                               "label" => "LLL:EXT:contagged/locallang_db.xml:tx_contagged_terms.pronunciation",
+                               "config" => Array (
+                                       "type" => "input",
+                                       "size" => "30",
+                               )
+                       ),
+                       'multimedia' => Array (
+                               'label' => 'LLL:EXT:contagged/locallang_db.xml:tx_contagged_terms.multimedia',
+                               'config' => Array (
+                                       'type' => 'group',
+                                       'internal_type' => 'file',
+                                       'allowed' => 'swf,swa,dcr,wav,avi,au,mov,asf,mpg,wmv,mp3,mp4,m4v',
+                                       'max_size' => $GLOBALS['TYPO3_CONF_VARS']['BE']['maxFileSize'],
+                                       'uploadfolder' => 'uploads/media',
+                                       'size' => '2',
+                                       'maxitems' => '1',
+                                       'minitems' => '0'
+                               )
+                       ),
                        'related' => Array (
                                'exclude' => 1,
                                'l10n_mode' => 'exclude',
@@ -217,7 +247,7 @@ $TCA["tx_contagged_terms"] = array (
                        ),
                ),
                "types" => array (
-                       "0" => array("showitem" => "sys_language_uid;;;;1-1-1, l18n_parent, l18n_diffsource, hidden;;1, term_main, term_alt, term_type, term_lang, term_replace, desc_short, desc_long;;;richtext[*]:rte_transform[mode=ts_css|imgpath=uploads/tx_contagged/rte/], image, dam_images, imagecaption, imagealt, imagetitle, related, link, exclude")
+                       "0" => array("showitem" => "sys_language_uid;;;;1-1-1, l18n_parent, l18n_diffsource, hidden;;1, term_main, term_alt, term_type, term_lang, term_replace, desc_short, desc_long;;;richtext[*]:rte_transform[mode=ts_css|imgpath=uploads/tx_contagged/rte/], reference, pronunciation, image, dam_images, imagecaption, imagealt, imagetitle, multimedia, related, link, exclude")
                ),
                "palettes" => array (
                        "1" => array("showitem" => "starttime, endtime, fe_group"),