Translations
Info
All page names need to be in English.
en da  de  fr  it  ja  km  nl  ru  zh

Sr feuser register

From TYPO3Wiki
Jump to: navigation, search
Draft Change the {{draft}} marker to {{review}} when you need a reviewer for text and TypoScript. info

sr_feuser_register


It enables (frontend) users to register themselves. It is very feature rich extension including things like confirmation emails, registration forms, invitation letters and more.


Contents

See also

Tips and Tricks

Next version

Maybe the latest version of sr_feuser_register in TER is a bit old for a new version of TYPO3. You should better use a newer code of sr_feuser_register with more bug fixes. Check it out from the subversion at http://forge.typo3.org. Or download sr_feuser_register as a t3x file from here and import it using your EM.

Adding a static template in initial configuration

In the extension manual, configuration step two, it says:

"Add one of the following static templates to your TypoScript template: 'FE User Registration CSS-styled' or 'FE User Registration Old Style'."

This is done (after installing the extension) by: - going to "Template" on the side bar - select your root folder - click "Click here to edit whole template record" at the bottom of the page - Select the "Includes" tab (TYPO3 v4.2). - In the section headed "Include static (from extensions):"" - and select the appropriate template from the right hand box

Preconfiguration of Country and Language

Put this to your TS Setup field (e.g. in your root page template):

 plugin.tx_srfeuserregister_pi1.create.defaultValues.static_info_country = DEU
 plugin.tx_srfeuserregister_pi1.create.defaultValues.language = DE
 plugin.tx_srfeuserregister_pi1.create.defaultValues.zone = BAY

If this doesn't work, one might configure static_info_tables directly:

 plugin.tx_staticinfotables_pi1.languageCode = DE

Moreover add this in TS Setup to limit to european countrys in the country dropdown (!!! e.g. Switzerland will be skiped out !!!):

 plugin.tx_srfeuserregister_pi1.where.static_countries = cn_eu_member = 1

Unfortunately the "old" way to write it like plugin.tx_staticinfotables_pi1.countryCode = DEU does not seems to work anymore.


Correction to use module_sys_dmail_category as a required field

Apparently Sr feuser register (v.2.5.15) does not check for required field module_sys_dmail_category. This patch corrects this problem.

Index: model/class.tx_srfeuserregister_data.php
===================================================================
--- model/class.tx_srfeuserregister_data.php	(revision 14)
+++ model/class.tx_srfeuserregister_data.php	(working copy)
@@ -311,7 +311,7 @@
 	* @return void  on return, the ControlData failure will contain the list of fields which were not ok
 	*/
 	function evalValues ($theTable, &$dataArray, &$origArray, &$markContentArray, $cmdKey, $requiredArray) {
-
+   
 		$displayFieldArray = t3lib_div::trimExplode(',', $this->conf[$cmdKey.'.']['fields'], 1);
 		if($this->controlData->useCaptcha())	{
 			$displayFieldArray[] = 'captcha_response';
@@ -395,8 +395,9 @@
 									$this->failureMsg[$theField][] = $this->getFailureText($theField, $theCmd, 'evalErrors_valid_email');
 								}
 							break;
-							case 'required':
-								if (!trim($dataArray[$theField])) {
+							case 'required': 
+							
+								if ((!is_array($dataArray[$theField]) && !trim($dataArray[$theField])) || (is_array($dataArray[$theField]) && !sizeof($dataArray[$theField]))) {
 									$failureArr[] = $theField;
 									$this->inError[$theField] = TRUE;
 									$this->failureMsg[$theField][] = $this->getFailureText($theField, $theCmd, 'evalErrors_required');


Functionality for where.languages (like where.static_countries)

diff -uriwbB sr_feuser_register.orig/marker/class.tx_srfeuserregister_marker.php sr_feuser_register/marker/class.tx_srfeuserregister_marker.php
--- sr_feuser_register.orig/marker/class.tx_srfeuserregister_marker.php	2009-03-04 14:49:41.000000000 +0100
+++ sr_feuser_register/marker/class.tx_srfeuserregister_marker.php	2009-03-18 12:02:20.000000000 +0100
@@ -469,7 +469,12 @@
 				}
 				$selected = (is_array($row) && isset($row['static_info_country']) ? $row['static_info_country'] : array());
 				if (isset($this->conf['where.']) && is_array($this->conf['where.']))	{
-					$where = $this->conf['where.']['static_countries'];
+					if (isset($this->conf['where.']['static_countries'])){
+						$whereCountries = $this->conf['where.']['static_countries'];
+					}
+					if (isset($this->conf['where.']['languages'])){
+						$whereLanguages = $this->conf['where.']['languages'];
+					}
 				}
 				$markerArray['###SELECTOR_STATIC_INFO_COUNTRY###'] = $this->staticInfo->buildStaticInfoSelector(
 					'COUNTRIES',
@@ -480,7 +485,7 @@
 					$this->conf['onChangeCountryAttribute'],
 					$idCountry,
 					$titleCountry,
-					$where
+					$whereCountries
 				);
 				$markerArray['###SELECTOR_ZONE###'] =
 					$this->staticInfo->buildStaticInfoSelector(
@@ -506,7 +511,8 @@
 					,
					,
					$idLanguage,
-					$titleLanguage
+					$titleLanguage,
+					$whereLanguages
				);
			}
		}


Discussion

Personal tools
Namespaces
Variants
Actions