Typo3 Extensions – Bar54 http://www.bar54.de Software Engineering, Web Technologies, eCommerce and some more Wed, 29 Oct 2014 16:13:14 +0000 en-US hourly 1 https://wordpress.org/?v=5.9.4 Typo3: Filelist context menu does not work http://www.bar54.de/2014/03/typo3-filelist-context-menu-work/ Tue, 04 Mar 2014 18:54:33 +0000 http://www.bar54.de/?p=670 If the context menu of your typo3 file list does not work anymore and you use templavoilá, you might hit a known bug in one of templavoilá’s functions.
http://forge.typo3.org/issues/43554

To check if this is the case:

  • Use a browser developer tool such as chrome developer console (hit F12 in your browser), and check for an 500 internal error response for a url similar to …./alt_clickmenu.php?…
  • Next, check your templavoila version. If this is 1.8.0: there you go

There is already a patch provided for this issue:
http://forge.typo3.org/attachments/23132/

To fix this manually, edit the file typo3conf/ext/templavoila/classes/class.tx_templavoila_file.php

In the method public static function is_xmlFile($filename), adapt the following lines:

public static function is_xmlFile($filename) {
  if (!self::includesFal()) {
    // fix file list context menu according to http://forge.typo3.org/attachments/23132/43554.patch
    // return self::is_xmlFile($filename);
    return self::is_xmlFile_finfo($filename);
}
]]>
Powermail Datepicker Date Format Fix http://www.bar54.de/2013/10/powermail-datepicker-date-format-fix/ http://www.bar54.de/2013/10/powermail-datepicker-date-format-fix/#respond Wed, 02 Oct 2013 13:38:00 +0000 http://www.bar54.de/blog/?p=476 The powermail Typo3 extension provides a feature to have a date picker for your date input field. With the jquery option of powermail this is generated using the jquery ui date picker plugin.

Depending on the language you use, you might run into the problem of an invalid date format produced by the date picker. For example, with a German locale you might get a 02.10.YY instead of 02.10.2013.

wrong-dateformat

The reason for this is the powermail extension’s language file. It specifies the date format with a capital YY, not supported by the jQuery UI date picker.

To fix this issue, you must modify the language specific translation setting of the date format to use lower case letters: “dd.mm.yy”. You can do this by modifying the extension translation file.
However, a much easier way is to add the language setting as typo script to the setup section of your template. The example above shows the fix for the German language (‘de’). For other languages use the according language id.

# POWERMAIL
# Datumsformat im Datepixker
plugin.tx_powermail_pi1._LOCAL_LANG {
  de {
    datepicker_dateformat = dd.mm.yy
  }
}
]]>
http://www.bar54.de/2013/10/powermail-datepicker-date-format-fix/feed/ 0
Typo3: RTE in Backend not loading for Non-Admin-Users http://www.bar54.de/2013/04/typo3-rte-in-backend-not-loading-for-non-admin-users/ http://www.bar54.de/2013/04/typo3-rte-in-backend-not-loading-for-non-admin-users/#respond Thu, 04 Apr 2013 14:30:51 +0000 http://www.bar54.de/blog/?p=362 Recently I found a nasty problem with Typo3’s richt text editor (RTE) when a non-admin user was logged in. (Typo3 version 4.5.25)

Trying to open a content element with a rich text editor field, presented only the message “editor is being loaded” without any further information or progress.
When logging into the backend as an admin user, everything worked fine.

Checking with the firefox javacript console, the following error was provided:

ReferenceError: invalid assignment left-hand side
Line: 414, Row: 60
3);return('#'+hex(r)+hexHTMLArea.Editor.prototype.isEditable=function(){return(this._doc.designMode==="on");};HTMLArea.E

typo3-rte-javascript-error

Finally, the solution I found was to disable the javascript compression for the richt text editor scripts in the extensions overall configuration using the Extension Manager:
disable-compression

However, this was the first time I saw this problem and I was not able to reproduce it on any other of our typo3 installations.

]]>
http://www.bar54.de/2013/04/typo3-rte-in-backend-not-loading-for-non-admin-users/feed/ 0
Powermail 2.0.x: Enable Dynamic Sender Fields http://www.bar54.de/2013/04/powermail-2-0-x-enable-dynamic-sender-fields/ http://www.bar54.de/2013/04/powermail-2-0-x-enable-dynamic-sender-fields/#respond Mon, 01 Apr 2013 20:22:40 +0000 http://www.bar54.de/blog/?p=355 Starting with version 2.0, the powermail extension has a new concept to configure the email address used to send a feedback mail to the user who has submited an online form.

The documentation recommends to activate the “This field contains the Email of the sender” checkbox for the form field the user should put his email adress in. With the powermail version 2.0.6, this setting seems to have no effect and the user does not receive any confirmation mail.
Email Form Field

According to the document, another way to configure the field to be used as the form sender’s email adress is to put in the according form field variable in the configuration field of the form:
http://typo3.org/extension-manuals/powermail/2.0.6/view/1/48/
Trying to put in the variable referencing the email field (e.g. {e_mail}):
Sender E-Mail Variable Input
ends up with an error message (“errorinemail@tryagain.com”) because of an invalid e-mail format:

errorinemail@tryagain.com
errorinemail@tryagain.com

As a result, this configuration will not work out. Even worse: The field can not be cleared again.

The only way I figured out to fix the configuration was to overwrite the sender’s email and name in an extension template for the page setting them to the fluid variable referencing the according form fields:

plugin.tx_powermail.settings.sender.overwrite.senderEmail={e_mail}
plugin.tx_powermail.settings.sender.overwrite.senderName={name}

Template Constants to override powermail sender

]]>
http://www.bar54.de/2013/04/powermail-2-0-x-enable-dynamic-sender-fields/feed/ 0
Typo3: Powermail Configuring JQuery Datepicker http://www.bar54.de/2013/03/typo3-powermail-configuring-jquery-datepicker/ http://www.bar54.de/2013/03/typo3-powermail-configuring-jquery-datepicker/#respond Mon, 18 Mar 2013 10:50:47 +0000 http://www.bar54.de/blog/?p=348 The powermail Typo3 extension for creating and managing forms provides a great integration with the jQuery JavaScript library. This includes the jQuery UI widgets especially the date picker widget.

However, this makes use of the default jQuery settings and for example for a German website the default date format (mm/dd/YY) is not satisfying.
To change the default behaviour, some JavaScript settings are necessary. The following JavaScript code can be integrated either in a seperate JS file or can be included in an already included one. Anyhow, it has to be loaded after the default powermail and jQuery JavaScript files.


$(function() {
$.datepicker.regional['de'] = {clearText: 'löschen', clearStatus: 'aktuelles Datum löschen',
closeText: 'schließen', closeStatus: 'ohne Änderungen schließen',
prevText: '', nextStatus: 'nächsten Monat zeigen',
currentText: 'heute', currentStatus: '',
monthNames: ['Januar','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember'],
monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun','Jul','Aug','Sep','Okt','Nov','Dez'],
monthStatus: 'anderen Monat anzeigen', yearStatus: 'anderes Jahr anzeigen',
weekHeader: 'Wo', weekStatus: 'Woche des Monats',
dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
dayStatus: 'Setze DD als ersten Wochentag', dateStatus: 'Wähle D, M d',
dateFormat: 'dd.mm.yy', firstDay: 1,
initStatus: 'Wähle ein Datum', isRTL: false};
$.datepicker.setDefaults($.datepicker.regional['de']);

$.datepicker.setDefaults( $.datepicker.regional[ "" ] );
$( ".powermail_date" ).datepicker( $.datepicker.regional[ "de" ] );
});

]]>
http://www.bar54.de/2013/03/typo3-powermail-configuring-jquery-datepicker/feed/ 0
Typo3 tt_news Pagination with CoolURI http://www.bar54.de/2013/02/typo3-tt_news-pagination-with-cooluri/ http://www.bar54.de/2013/02/typo3-tt_news-pagination-with-cooluri/#respond Tue, 19 Feb 2013 06:29:30 +0000 http://www.bar54.de/blog/?p=340 CoolUri is a nice typo3 extension for getting searchengine friendly URLs. It is configured by an xml file defining how to generate links and process incoming requests.

If you use the tt_news extension to publish news on you site, cooluri provides you with a default configuration to generate nice urls for your news articles.

tx_ttnews[tt_news]
SELECT title FROM tt_news WHERE uid=$1


1

However, this default snippet is not complete if you have news lists with more news items than the maximum to be displayed on a single page. In such a case, you tt_news provides a pagination below the news list to switch to further pages listing more news. This pagination is not supported by the default CoolURI configuration. If you click on a pagination link, you will stuck on the first page.

To fix this issue, you need to teach CoolURI about the pointer parameter of cooluri. Just search the xml snippet presented above in your CoolURI configuration (CoolUriConf.xml) and add the following lines:

tx_ttnews[pointer]

Refresh Typo3 cache and there you go.

As an example, you can check out the news archive on www.catering-guide-stuttgart.de : http://www.catering-guide-stuttgart.de/news/news-archiv.html

]]>
http://www.bar54.de/2013/02/typo3-tt_news-pagination-with-cooluri/feed/ 0
Typo3 6.0.2 Update Extension List http://www.bar54.de/2013/02/typo3-6-0-2-update-extension-list/ http://www.bar54.de/2013/02/typo3-6-0-2-update-extension-list/#respond Fri, 15 Feb 2013 07:24:55 +0000 http://www.bar54.de/blog/?p=332 Isn’t it a nice idea to hide an update button by changing it to link which isn’t even underlined?
Definitely not!

So if you have updated your Typo3 to version 6.x and miss the update button for your extension list, just move your mouse over the “last update” info in the upper right corner of your “Get Extensions” tab. You will notice your cursor changes to a finger and your able to click it for an update… not comments …

]]>
http://www.bar54.de/2013/02/typo3-6-0-2-update-extension-list/feed/ 0
Powermail 1.6 – Custom JavaScript Validation http://www.bar54.de/2012/05/powermail-1-6-custom-javascript-validation/ http://www.bar54.de/2012/05/powermail-1-6-custom-javascript-validation/#respond Tue, 15 May 2012 07:25:49 +0000 http://www.bar54.de/blog/?p=232 Powermail is one of the most mature and recomendable Typo3 extensions for online forms. It is easy to use, extend and maintain. I used it in many different projects with different requirements such as spam protection, visitor registration, questionairs, and many more.

For the 1.6 generation of the extension, the JavaScript part was completly migrated to the jquery framework. In conjunction with this migration, the javascript-based client-side input validation was migrated to the jquery tools validator: http://www.jquerytools.org/documentation/validator/index.html
With this validator, it is still possible to customize the form validation. However, this is not included in the powermail documentation yet and I hope this post will help you to understand how this can be done. If not, just let me know!

The JavaScript Template File
So first, powermail uses a template file containing the frontend javascript validation. This file is imported and parsed by the extension to replace placeholders such as labels and others.
The original file can be found in the extension resources at

typo3conf/ext/powermail/templates/tmpl_frontend.js

You can customize this file, upload it and configure it in your website template either in the constant editor or directly in the constants using:

plugin.powermail.template.frontendJsTemplatePath = path/to/your/templatefile.js

Accessing the powermail Validator Object
In the template file, the powermail validator is created and accessible via the javascript object

powermail_validator.data('validator')

This object provides your access to the validator in your custom code. For example to reset the validation

powermail_validator.data('validator').reset()

Or to trigger the validation

powermail_validator.data('validator').checkValidity()

Register new Validators
Validators can be registered directly for the jquery tools validator in the default way: http://www.jquerytools.org/documentation/validator/index.html#custom

This can be done using the method

$.tools.validator.fn(...);

This method requires 3 parameters:
1. The css selector to register the validator for (e.g. ‘select’ for all select tags or ‘.powermail_uid67’ to reference the powermail field with the id UID67.
2. Error messages for the validator (either a string for the default language or an associative array for multiple languages)
3. The validator function itself. The function get’s two parameters: the field element that is validated and the value to be validated. This function can have different return values: { true: the value is valid; false: The value is invalid; string: The value is invalid and this is the error message to display; object: value is invalid and the object contains localized error messages}

As an example this is the default validation for the select elements:

	// select validation
	$.tools.validator.fn('select', '',
		function(el, value) {
			(el.attr('multiple')) {
				return value != null ? true: '###VALIDATOR_LABEL_ONE_REQUIRED###';
			} else {
				return value.length > 0 ? true : '';
			}
		}
	);
]]>
http://www.bar54.de/2012/05/powermail-1-6-custom-javascript-validation/feed/ 0
Typo3: Powermail File Upload Size http://www.bar54.de/2012/03/typo3-powermail-file-upload-size/ http://www.bar54.de/2012/03/typo3-powermail-file-upload-size/#respond Sun, 25 Mar 2012 22:16:33 +0000 http://www.bar54.de/blog/?p=195 Powermail is a great typo3 extension to provide mature online forms, e.g. for contact forms, requests, or any other purpose requiring the user to send information through the website.

Powermail includes facilities to upload files through the website form. Various configuration parameters exist to customize the upload according to the individual needs.
However, the default values might not fit out-of-the-box. For example, the file upload allows many different file types – from image types up to pdfs – but the file upload size is limited to less than 1MB. This will result in an error message for any file exceeding this limit.


“Folgende Fehler sind aufgetreten:” / “Diese Datei ist zu groß:”

To solve this issue, you should add the following configuration to the setup of your page template:
plugin.tx_powermail_pi1.upload.filesize=4096

The assigned value is treated as kilobytes (kb) representing 4MB in the example. Make sure you refresh your site cache when changing this parameter. You can choose any other file size if you want to.

]]>
http://www.bar54.de/2012/03/typo3-powermail-file-upload-size/feed/ 0
Typo3: Google Maps Extension for API Version 3 http://www.bar54.de/2012/03/typo3-google-maps-extension-for-api-version-3/ http://www.bar54.de/2012/03/typo3-google-maps-extension-for-api-version-3/#respond Thu, 08 Mar 2012 22:03:25 +0000 http://www.bar54.de/blog/?p=188 Google Maps have become a common element on websites today. Private persons as well as webmasters are able to use them for free, at least if they do not have more page impressions than allowed by google.
If the website is build upon Typo3, one of the mature extension has been the wec_maps developed by the web empowered church team (http://typo3.org/extensions/repository/view/wec_map/current/).

In the meantime, google has released the new version 3 of their JavaScript API. Now, the last version number 2 has been deprecated and it is no longer possible to get a key to use it on a new website: http://code.google.com/intl/de-DE/apis/maps/signup.html.
Unfortunately, the WEC Team has not released a new version of their extension that is compatible with the google maps API version 3.

After some research and tests, I have found the Quick Google Maps extension (cbgooglemaps) developed by Christian Brinkert. Their have not been many downloads in the past, but our tests have been very sufficient and we are now using it in production. To find out more about this recomendable Typo3 extension for google maps integration already compatible with the google maps api version 3, just visit the extension webpage at http://typo3.org/extensions/repository/view/cbgooglemaps/current/.

Update 2012-03-10, 20:22

Thanks to Jan Bartels, who send me some infos about the current status of the wec_maps extension development. See below, what he wrote me on March 8th 2012:

In his opinion wec_map is also one of the best google maps extension for Typo3. So he has synchronized himself with Jeff Segars from the web empowered church team to work on an enhancement of the wec_map for the Google API V3 available on github at:
https://github.com/webempoweredchurch/wec_map/tree/googlemapsv3

He plans a new release of the extension in the next weeks.
The current status of his development is:

  • The basic map plugin with markers bubles and KML support
  • The geocoder is working
  • The TypoScript is backward compatible as much as possible
  • The PHP-API is almost backward compatible
  • The backward compatibility of the JS-API is still in progress
  • Additional support for OpenStreetMap and OpenCycleMap is available

From his point of view, the following points are sill missing:

  • Tabbed Info-Bubbles: They are not supported out-of-the-box by the new Google API
  • Directions from here/to here: Uses Tabs. And the JS-GoogleMaps-Integration for the Geocoder is still missing
  • Markergroups: Not supported out-of-the-box by the new Google-API

The missing points shell be completed during the next weeks.

Thanks again to Jan for his work and providing this information!

]]>
http://www.bar54.de/2012/03/typo3-google-maps-extension-for-api-version-3/feed/ 0