[TYPO3-english] Re: Google Analytics - insert javascript with page.headerData

2017-11-10 Thread Christian Hackl

why you do this?

You can direkt in the headerdata include your JS Code

page {
headerData {
50 = TEXT
50.value (

// YOUR JS CODE

)
}
}
___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


[TYPO3-english] Typo3Script Form with multiple FileUploads and fileallowedtypes/filemaximumsize

2017-11-10 Thread Marc Grube

Hello,

i would like to have a form in typoscript, in which the user has the option to 
either upload up to six files, or no file. The files have to be in 
*.pdf-filetype with a maximum filesize of 5MB.

My code looks like this:

enctype = multipart/form-data
method = post
prefix = tx_form
confirmation = 
postProcessor {

1 = mail
1 {
recipientEmail = test (at) test.de
senderEmail = test (at) test.de
subject = Betreff
}
2 = redirect
2 {
destination = 250
}
}
10 = FIELDSET
10 {
legend {
value = Ihre Kontaktdaten
}
10 = TEXTLINE
10 {
type = text
name = Vorname
label {
value = Vorname
}
}
20 = TEXTLINE
20 {
type = text
name = Nachname
label {
value = Nachname
}
}
30 = TEXTLINE
30 {
type = text
name = E-Mail
label {
value = E-Mail Adresse
}
}
40 = TEXTLINE
40 {
type = text
name = Telefon
label {
value = Telefon
}
}
}
..
40 = FIELDSET
40 {
10 = HEADER
10 {
class = content-header
headingSize = h4
content = Überschrift
}
20 = FILEUPLOAD
20 {
type = file
name = datei1
label {
value = Anschreiben
}
}
30 = FILEUPLOAD
30 {
type = file
name = datei2
label {
value = Lebenslauf
}
}
..
}
60 = SUBMIT
60 {
type = submit
name = 15
value = Formular absenden
}
rules {
1 = required
1 {
showMessage = 
message = Benötigt

error = Dies ist ein Pflichtfeld
element = Vorname
}
2 = required
2 {
showMessage = 
message = Benötigt

error = Dies ist ein Pflichtfeld
element = Nachname
}
3 = email
3 {
showMessage = 
message = (max.muster (at) domain.com)

error = Dies ist keine gültige E-Mail-Adresse
element = E-Mail
}
4 = fileallowedtypes 
4 { 
breakOnError = 0 
showMessage = 
message = (%allowedTypes) 
error = Bitte hängen Sie nur Dokumente mit dem Dateityp *.pdf an.

types = application/pdf
element = datei1
} 
5 = filemaximumsize 
5 { 
breakOnError = 0 
showMessage = 
message = The file has to be smaller as %maximum 
error = Diese Datei ist zu groß (max 5MB).
maximum = 5242880 
element = datei1
} 
6 = fileallowedtypes 
6 { 
breakOnError = 0 
showMessage = 
message = (%allowedTypes) 
error = Bitte hängen Sie nur Dokumente mit dem Dateityp *.pdf an.

types = application/pdf
element = datei2
} 
7 = filemaximumsize 
7 { 
breakOnError = 0 
showMessage = 
message = The file has to be smaller as %maximum 
error = Diese Datei ist zu groß (max 5MB).
maximum = 5242880 
element = datei2
} 
..

}

Everything works so far, the only problem I have that the user cant send the form without 
uploading a file, I always get the "wrong filetype" error in that case. How can 
I adjust the form, so that the fileallowedtypes-function only gets called, when one or 
more fileuploads are made?

Best regards and thank you in advance!

___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english

[TYPO3-english] Re: Re: RealURL - shortcut to home

2017-11-10 Thread Dennis Hoffland

This realurlconf.php works for me:

 array(
'www.mydomain.com' => array(
/*
   'cache' => array(
   'disable' => true,
   ),
*/
   'init' =>
   array(
   'appendMissingSlash' => 'ifNotFile,redirect',
   'emptyUrlReturnValue' => '',
   ),
   'pagePath' =>
   array(
   'rootpage_id' => 1,
   ),
   'fileName' =>
   array(
   'defaultToHTMLsuffixOnPrev' => 1,
   'acceptHTMLsuffix' => 1,
   'index' =>
   array(
   'print' =>
   array(
   'keyValues' =>
   array(
   'type' 
=> 98,
   ),
   ),
   'robots.txt' => array(
   'keyValues' => array(
   'type' => 201
   )
   )
   ),
   ),
   'preVars' =>
   array(
   0 =>
   array(
   'GETvar' => 'L',
   'valueMap' =>
   array(
   'nl' => 0,
   'en' => 1,
   ),
   'valueDefault' => 'nl'
   ),
   ),
   'postVarSets' =>
   array(
   '_DEFAULT' =>
   array(
   'article' =>
   array(
   array(
   'GETvar' => 
'tx_news_pi1[action]',
   ),
   array(
   'GETvar' => 
'tx_news_pi1[controller]',
   ),
   array(
   'GETvar' => 
'tx_news_pi1[news]',
   'lookUpTable' 
=>
   
array(
   
'table' => 'tx_news_domain_model_news',
   
'id_field' => 'uid',
   
'alias_field' => 'title',
   
'useUniqueCache' => 1,
   
'useUniqueCache_conf' =>

   array(
   
'strtolower' => 1,
   
'spaceCharacter' => '-',

   ),
   ),
   ),
   ),
   ),
   ),
   ),
);
php?>


Mind you: the home page has no URL section (home.html). It simply gets the URL 
www.mydomain.com. Any suggestions to add the home.html to that are still 
welcome!
___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


[TYPO3-english] Google Analytics - insert javascript with page.headerData

2017-11-10 Thread Dennis Hoffland

Hello,

I have put the following code into the TS Setup of my root page:

# *
# Google Analytics
# *

temp.GoogleAnalytics = TEXT
temp.GoogleAnalytics.value (

https://www.googletagmanager.com/gtag/js?id=UA-xxx-x";>

 window.dataLayer = window.dataLayer || [];
 function gtag(){dataLayer.push(arguments);}
 gtag('js', new Date());
ga('set', 'anonymizeIp', true); // Toelichting AP: Hiermee zet u de 
IP-maskering aan
 gtag('config', 'UA-xxx-x');

)

page.headerData.50 = TEMPLATE
page.headerData.50.template < temp.GoogleAnalytics


The HTML output only contains:


https://www.googletagmanager.com/gtag/js?id=UA-xxx-x";>

The second section of the javascript is simply missing ...


If I try instead:

# *
# Google Analytics
# *

page.headerData.50 = TEXT
page.headerData.50.value ( 


https://www.googletagmanager.com/gtag/js?id=UA-xxx-x";>
)
page.headerData.60 = TEXT
page.headerData.60.value ( 

 window.dataLayer = window.dataLayer || [];
 function gtag(){dataLayer.push(arguments);}
 gtag('js', new Date());
ga('set', 'anonymizeIp', true); // Toelichting AP: Hiermee zet u de 
IP-maskering aan
 gtag('config', 'UA-xxx-x');

)

It produces the same result:


https://www.googletagmanager.com/gtag/js?id=UA-xxx-x";>

Is there something wrong with the syntax that prevents the second javascript 
section from being rendered?

Kind regards,

Dennis
___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english