[TYPO3-dev] secure downloads - css_styled_content

Georg Schönweger georg.schoenweger at gmail.com
Wed Jul 6 09:01:50 CEST 2011


Hi,

i would like to use "secure downloads" feature provided by
css_styled_content with Media CE's. For this i set in TS-Constants:
styles.content.uploads.jumpurl_secure = 1

To secure now the downloadfolder i have to protect it with a .htaccess
file. If i add a file to the "Media" CE then this file is copied to
"uploads/media/". The filelink in FE goes to this directory;
"uploads/media/myfile.txt". But i don't want to deny access to this
folder because i think this could lead to problems. This folder is also
used by textpic CE ecc.

Now i looked in to source code of css_styled_content and saw that i can
define another upload field by using the TS-Code;
tt_content.uploads.20.field = my_field

So far, so good. I created an extension which adds a new field to
tt_content. And here is my problem; It seems that the TCA definitions
from my extension are loaded AFTER css_styled_content. So i can't make
use of my_field.

I changed "extList" and "extList_FE" in typo3conf/localconf.php and put
my extension at first position before css_styled_content, but this has
no effect.

In sr_feuser_register they have the same problem and solved it by
providing a Hook;
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['sr_feuser_register']['extendingTCA'][]
= 'mynewext'; (see
http://typo3.org/documentation/document-library/extension-manuals/sr_feuser_register/2.6.1/view/1/5/)

Anyone having an idea how to solve this? I thought about using another
hook in typo3 which gets executed BEFORE css_styled_content and
including there "my_field" TCA somehow... but this solution doesn't seem
nice to me.
Maybe css_styled_content should have the same "extendingTCA"
hook/functionality like in sr_feuser_register?

regards,
Georg




More information about the TYPO3-dev mailing list