Category Archives: TYPO3

T3DD 2011 in Sursee Switzerland

photo by Markus Zuercher (photo by Markus Zuercher)

Photo by Nils Dehl (photo by Nils Dehl)

Read the complete article on t3n magazine, (in German)

http://t3n.de/news/t3dd11-typo3-geeks-lichten-euch-ab-320859/

Look at the photo shots, very funny! 🙂

http://www.flickr.com/photos/schlittengott/sets/72157627151845946/with/5918171970/

set by Thomas Hempel

http://www.flickr.com/photos/nils-dehl/sets/72157627152272924/

Set by Nils Dehl

Add custom fields in sr_feuser_register w/out TCA_INPUT marker error

In recent version of sr_feuser_register adding custom fields with classic procedure give a TCA_INPUT marker error like ###TCA_INPUT_MYCUSTOMFIELD### in front end.

There is a commented line 61 in class.tx_srfeuserregister_tca.php  

// $TSFE->includeTCA(); takes too much memory

Of course you can uncomment that line, but it takes too much memory, so instead use the complete input code:

<input id=”tx-srfeuserregister-pi1-myNewFieldName” type=”text” size=”40” maxlength=”50” title=”###TOOLTIP_MYNEWFIELDNAME###” name=”FE[fe_users][myNewFieldName]” class=”tx-srfeuserregister-pi1-text” />

Like written in the wiki wiki.typo3.org…sr_feuser_register

Add twice email to sr_feuser_register TYPO3 extension

Do you want to add a twice email field to sr_feuser_register like the password one?

It’s simple following these 4 steps 

  1. Read the documentation to add personal fields
  2. Add custom “email_again” field in the HTML template
  3. Add custom label in TypoScript
  4. Add eval rule in TypoScript

First: I assume you done this step before, if not read this

Second: add “email_again” field in the sr_feuser_register html template

<!— ###SUB_INCLUDED_FIELD_email### —>

<dt>

<label for=”tx-srfeuserregister-pi1-email”>###LABEL_EMAIL### ###REQUIRED_EMAIL###</label>

</dt>

<dd>

<!— ###SUB_ERROR_FIELD_email### —>

<p class=”tx-srfeuserregister-pi1-error”>###EVAL_ERROR_FIELD_email###</p>

<!— ###SUB_ERROR_FIELD_email### —>

<!— ###SUB_REQUIRED_FIELD_email### —>

<p class=”tx-srfeuserregister-pi1-error”>###MISSING_EMAIL###</p>

<!— ###SUB_REQUIRED_FIELD_email### —>

<input id=”tx-srfeuserregister-pi1-email” type=”text” class=”tx-srfeuserregister-pi1-text full” size=”40” maxlength=”255” title=”###TOOLTIP_EMAIL###” name=”###NAME_EMAIL###” />

</dd>

<dt>

<label for=”tx-srfeuserregister-pi1-email_again” class=”tx-srfeuserregister-pi1-text full”>###LABEL_EMAIL_AGAIN###</label>

</dt>

<dd>

<input id=”tx-srfeuserregister-pi1-email_again” type=”text” class=”tx-srfeuserregister-pi1-text full” size=”40” maxlength=”255” title=”” name=”FE[fe_users][email_again]” />

</dd>

<!— ###SUB_INCLUDED_FIELD_email### —>

Third: add custom labels in TypoScript:

plugin.tx_srfeuserregister_pi1.extraLabels (

    email_again,

    tooltip_email_again,

    missing_email_again,

    evalErrors_twice_email_again

)

plugin.tx_srfeuserregister_pi1._LOCAL_LANG.default {

       email_again = please repeat your email address

       tooltip_email_again = 

       missing_email_again = missing email

       evalErrors_twice_email_again = emails must be the same!

}

plugin.tx_srfeuserregister_pi1._LOCAL_LANG.it {

      email_again = ripeti la tua email 

      tooltip_email_again =  

      missing_email_again = manca la seconda email

      evalErrors_twice_email_again = devono essere uguali!

}

Fourth: add the right rule in TypoScript

plugin.tx_srfeuserregister_pi1 {

      # the new rule applied to email field, not email_again field.
      create.evalValues.email = required,email,twice,atMost[255]

}

Hints: to change the template file use

plugin.tx_srfeuserregister_pi1 {

# the new template file

       templateFile = fileadmin/template/tx_srfeuserregister_pi1_css_tmpl_01.html

}

strange behavior of TYPO3 doctype

 Using the usual XHTML configuration

config.doctype = xhtml_trans
config.xhtml_cleaning = all

in combination of sourceopt and extendedshop extensions i saw doctype without space between “html” and “PUBLIC”, so no xhtml validated

DOCTYPE htmlPUBLIC …

instead of

DOCTYPE html PUBLIC …

to have the right doctype I declare explicit doctype:

config.doctype = <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”“http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
config.xhtmlDoctype = xhtml_trans
config.xhtml_cleaning = all

in this way everything sounds good! 😀