New import
authorSebastian Kurfürst <sebastian.kurfuerst@typo3.org>
Mon, 11 Sep 2006 01:52:31 +0000 (01:52 +0000)
committerSebastian Kurfürst <sebastian.kurfuerst@typo3.org>
Mon, 11 Sep 2006 01:52:31 +0000 (01:52 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/dam_ttcontent/trunk@3699 735d13b6-9817-0410-8766-e36946ffe9aa

doc/manual.sxw [new file with mode: 0644]
ext_conf_template.txt [new file with mode: 0644]
ext_emconf.php [new file with mode: 0644]
ext_icon.gif [new file with mode: 0644]
ext_localconf.php [new file with mode: 0644]
ext_tables.php [new file with mode: 0644]
ext_tables.sql [new file with mode: 0644]

diff --git a/doc/manual.sxw b/doc/manual.sxw
new file mode 100644 (file)
index 0000000..71cf3d7
Binary files /dev/null and b/doc/manual.sxw differ
diff --git a/ext_conf_template.txt b/ext_conf_template.txt
new file mode 100644 (file)
index 0000000..afe0b57
--- /dev/null
@@ -0,0 +1,8 @@
+  # cat=basic/enable; type=boolean; label=CType Image: Enable DAM reference field for the content type "Image".
+ctype_image_add_ref = 1
+  # cat=basic/enable; type=boolean; label=CType Image: Enable original file field for the content type "Image" as second image field.
+ctype_image_add_orig_field = 1
+  # cat=basic/enable; type=boolean; label=CType Text w/image: Enable DAM reference field for the content type "Text w/image".
+ctype_textpic_add_ref = 1
+  # cat=basic/enable; type=boolean; label=CType Text w/image: Enable original file field for the content type "Text w/image" as second image field.
+ctype_textpic_add_orig_field = 1
diff --git a/ext_emconf.php b/ext_emconf.php
new file mode 100644 (file)
index 0000000..44fbaf8
--- /dev/null
@@ -0,0 +1,51 @@
+<?php
+
+########################################################################
+# Extension Manager/Repository config file for ext: "dam_ttcontent"
+#
+# Auto generated 31-08-2006 20:40
+#
+# Manual updates:
+# Only the data in the array - anything else is removed by next write.
+# "version" and "dependencies" must not be touched!
+########################################################################
+
+$EM_CONF[$_EXTKEY] = array(
+       'title' => 'Content/DAM reference usage',
+       'description' => 'Modify the content types "Image" and "Text/Image" for usage of the DAM.',
+       'category' => 'fe',
+       'shy' => 0,
+       'version' => '1.0.1',
+       'dependencies' => '',
+       'conflicts' => '',
+       'priority' => '',
+       'loadOrder' => '',
+       'module' => '',
+       'state' => 'experimental',
+       'uploadfolder' => 0,
+       'createDirs' => '',
+       'modify_tables' => 'tt_content',
+       'clearcacheonload' => 0,
+       'lockType' => '',
+       'author' => 'Rene Fritz',
+       'author_email' => 'r.fritz@colorcube.de',
+       'author_company' => 'Colorcube - digital media lab, www.colorcube.de',
+       'CGLcompliance' => '',
+       'CGLcompliance_note' => '',
+       'constraints' => array(
+               'depends' => array(
+                       'cms' => '',
+                       'dam' => '',
+                       'mmforeign' => '',
+                       'php' => '4.0.0-',
+                       'typo3' => '3.8.0-',
+               ),
+               'conflicts' => array(
+               ),
+               'suggests' => array(
+               ),
+       ),
+       '_md5_values_when_last_written' => 'a:6:{s:21:"ext_conf_template.txt";s:4:"f401";s:12:"ext_icon.gif";s:4:"999b";s:17:"ext_localconf.php";s:4:"ce88";s:14:"ext_tables.php";s:4:"0feb";s:14:"ext_tables.sql";s:4:"aa4c";s:14:"doc/manual.sxw";s:4:"6056";}',
+);
+
+?>
\ No newline at end of file
diff --git a/ext_icon.gif b/ext_icon.gif
new file mode 100644 (file)
index 0000000..68353e3
Binary files /dev/null and b/ext_icon.gif differ
diff --git a/ext_localconf.php b/ext_localconf.php
new file mode 100644 (file)
index 0000000..f0d4c53
--- /dev/null
@@ -0,0 +1,56 @@
+<?php
+
+$GLOBALS['T3_VAR']['ext']['dam_ttcontent']['setup'] = unserialize($_EXTCONF);
+
+
+if ($GLOBALS['T3_VAR']['ext']['dam_ttcontent']['setup']['ctype_image_add_ref']) {
+
+       t3lib_extMgm::addTypoScript($_EXTKEY,'setup','
+               includeLibs.tx_damttcontent = EXT:dam/lib/class.tx_dam_tsfe.php
+
+               temp.tx_dam.fileList < tt_content.image.20.imgList
+
+               tt_content.image.20.imgList >
+               tt_content.image.20.imgList.cObject = USER
+               tt_content.image.20.imgList.cObject {
+                       userFunc = tx_dam_tsfe->fetchFileList
+
+                       refField = tx_damttcontent_files
+                       refTable = tt_content
+
+                       additional.fileList < temp.tx_dam.fileList
+                       additional.filePath < tt_content.image.20.imgPath
+                       '.($GLOBALS['T3_VAR']['ext']['dam_ttcontent']['setup']['ctype_image_add_orig_field']?'':'additional >').'
+               }
+               tt_content.image.20.imgPath >
+               tt_content.image.20.imgPath =
+
+       ',43);
+}
+
+if ($GLOBALS['T3_VAR']['ext']['dam_ttcontent']['setup']['ctype_textpic_add_ref']) {
+
+       t3lib_extMgm::addTypoScript($_EXTKEY,'setup','
+               includeLibs.tx_damttcontent = EXT:dam/lib/class.tx_dam_tsfe.php
+
+               temp.tx_dam.fileList < tt_content.textpic.20.imgList
+
+               tt_content.textpic.20.imgList >
+               tt_content.textpic.20.imgList.cObject = USER
+               tt_content.textpic.20.imgList.cObject {
+                       userFunc = tx_dam_tsfe->fetchFileList
+
+                       refField = tx_damttcontent_files
+                       refTable = tt_content
+
+                       additional.fileList < temp.tx_dam.fileList
+                       additional.filePath < tt_content.textpic.20.imgPath
+                       '.($GLOBALS['T3_VAR']['ext']['dam_ttcontent']['setup']['ctype_textpic_add_orig_field']?'':'additional >').'
+               }
+               tt_content.textpic.20.imgPath >
+               tt_content.textpic.20.imgPath =
+
+       ',43);
+}
+
+?>
\ No newline at end of file
diff --git a/ext_tables.php b/ext_tables.php
new file mode 100644 (file)
index 0000000..59c36ac
--- /dev/null
@@ -0,0 +1,40 @@
+<?php
+if (!defined ('TYPO3_MODE'))   die ('Access denied.');
+
+//$tempColumns = array(
+//     'tx_damttcontent_files' => $GLOBALS['T3_VAR']['ext']['dam']['TCA']['image_field']
+//);
+$tempColumns = array(
+       'tx_damttcontent_files' => txdam_getMediaTCA('image_field', 'tx_damttcontent_files')
+);
+
+
+t3lib_div::loadTCA('tt_content');
+t3lib_extMgm::addTCAcolumns('tt_content',$tempColumns,1);
+
+
+$tempSetup = $GLOBALS['T3_VAR']['ext']['dam_ttcontent']['setup'];
+
+## CType image
+
+if ($tempSetup['ctype_image_add_ref']) {
+
+       if ($tempSetup['ctype_image_add_orig_field']) {
+               t3lib_extMgm::addToAllTCAtypes('tt_content','tx_damttcontent_files','image','after:image');
+       } else {
+               $TCA['tt_content']['types']['image']['showitem'] = str_replace(', image;', ', tx_damttcontent_files;', $TCA['tt_content']['types']['image']['showitem']);
+       }
+}
+
+## CType textpic
+
+if ($tempSetup['ctype_textpic_add_ref']) {
+
+       if ($tempSetup['ctype_textpic_add_orig_field']) {
+               t3lib_extMgm::addToAllTCAtypes('tt_content','tx_damttcontent_files','textpic','after:image');
+       } else {
+               $TCA['tt_content']['types']['textpic']['showitem'] = str_replace(', image;', ', tx_damttcontent_files;', $TCA['tt_content']['types']['textpic']['showitem']);
+       }
+}
+
+?>
\ No newline at end of file
diff --git a/ext_tables.sql b/ext_tables.sql
new file mode 100644 (file)
index 0000000..9b808e9
--- /dev/null
@@ -0,0 +1,6 @@
+#
+# Table structure for table 'tt_content'
+#
+CREATE TABLE tt_content (
+       tx_damttcontent_files int(11) unsigned DEFAULT '0' NOT NULL
+);
\ No newline at end of file