Nov 13

Ich habe gerade eine TYPO3-Installation von TYPO3 4.1.x auf 4.2.3 geupdated, was mir promt die ganze Seite zerschossen hat. PHP5 ist mit der Fehlermeldung abgebrochen, dass die Methode array_merge_recursive_overrule in der Klasse “t3lib_div” einen Parameter vom Typ “array” erwartet, jedoch “null” bekommen hat. Auslöser des Problems war bei mir die Extension “dam”. Wenn ich sie im BE deaktiviere läuft es wieder, natürlich mit eingeschränkter Funktionalität.

Ich habe aus diesem Grund die Parameterdefinition in t3lib_div in der Methode entfernt (das “array” bei $arr1 und $arr2 weglöschen) damit es wieder geht.

Liebe Core-Entwickler, bevor ihr solche tollen PHP5-Features in den Core integriert, solltet ihr das den Extension-Autoren sagen, damit die ggf. ein Update bereitstellen können!!!

DANKE!

UPDATE: Die Extension “date2cal” scheint mit 4.2.3 ebenfalls NICHT zu laufen!

Nov 07

Um die Absender eines Mailformulars im TYPO3 besser verfolgen zu können, ist es manchmal nötig deren IP-Adresse zu speichern. Da ich eine Weile für die Lösung gebraucht hab, möchte ich sie hier kurz vorstellen:

Die TYPO3-Extension th_mailformplus bietet bereits die Möglichkeit eigene Marker im Template zu definieren. Man kann sich also im Template in verstecktes Feld anlegen, und einen Marker in das value-Attribut setzen. Diesen kann man nun mit folgenden TypoScript befüllen (###ip###):

plugin.tx_thmailformplus_pi1 {
fieldConf {

}
markers.ip = TEXT
markers.ip.data = getIndpEnv:REMOTE_ADDR
}

Über diese Methode lassen sich auch weitere Umgebugsvariablen auslesen und versenden. Für mehr Informationen sei hier auf die TSref verwiesen. Ich hoffe, dem einen oder anderen hilft das vielleicht.

Okt 27
  • english
  • german

I just had the task to render litte NEW icons after every new TYPO3 page in the main menu. You can edit this by changing the value “new until” in the page properties dialog. After some trying I found a solution:

NO.stdWrap.append = HTML
NO.stdWrap.append {
value = &nbsp;<img src=”fileadmin/img/new.png” alt=”NEW” style=”vertical-align: middle;”/>
value.if.value.data = date: U
value.if.isGreaterThan.field = newUntil
}

Okt 14
  • english
  • german

I am currently developing an application with Adobe AIR which works with a local database (SQLite). To kind of monitor all the changes in the database, I searched for a free tool which can display structure and data of the database. Optionally, it would also be nice to be able to change structure and data. Sadly, the search on my friend John’s website only responded a lot of applications built WITH AIR. As I am not a local admin on the pc at work, this was no solution.

Then I found the perfect solution for me, which works without installation and is even multilingual. Just one con: only for WIN! I will post a platform independet app if I find one in the future and I develop with AIR on my mac.

Okt 01
  • english
  • german

Sometimes, you might need to check whether a string has already been urlencoded with PHP or not. Sadly, PHP doesn’t offer such a function but because I recently needed it, I tried this one:

/**
 * Returns true if given string is url encoded
 *
 * @param string $string
 * @return boolean
 */
function is_urlencoded($string) {
	return $string === urlencode(urldecode($string));
}

This works fine for me (as far as I have tested), so maybe it is a litte help for anyone with the same problem

Sep 29
  • english
  • german

Today, I updated JSGallery and JSGallery2 on eSteak.net to fix two minor bugs. They made it impossible to use custom loading graphics, which works as supposed now. Thanks to Alex H. for the hint!

Aug 29
  • english
  • german

If you program PHP code with Eclipse PDT, you surely missed the auto generate getter and setter refactoring option which is known from the JDT. So you had to write hundreds of thousands of lines of code to create those methods for the uncountable amount of data objects you wrote until now.

To speed things up, here’s a solution with templates:

Click Window – Preferences – PHP – Templates and create a new template with the following content:

/**
*    Set the ${word_selection} value
*    @param unknown_type $$${word_selection}
*/
public function set${variable}($$${word_selection}) {
$$this->${word_selection} = $$${word_selection};
}

/**
*    Returns the ${word_selection} value.
*    @return unknown_type
*/
public function get${variable}() {
return $$this->${word_selection};
}
${cursor}

To use this template, type the template shortcut you have chosen in a PHP file of your choice (e.g. “getset”), followed by a variable name of your class (z.B. getsetcolor). Now highlight the word “color” (or yours, if different) and then press ctrl+space. Voila, there you have the desired methods. The cursor is on the right position for the variable type in the javadoc comment. Type “string” (or your type) and then jump to the method names with tab. You should type e.g. “Color” (starts with capital letter) and that’s it!

This method should save you at least 1-2 minutes per property – try it!

Aug 26
  • german

Wer im TYPO3 auch schon mal ein Modul im Extension Manager erstellt hat, wird das Problem kennen: Man hast nicht wirklich viel Einfluss auf die letztendliche Position im Backend. Man kann zwischen einem neuen Modul, dem File-, Web-, Help-, User- oder Tools-Menü wählen. Das klingt jetzt vielleicht viel und ausreichend, aber was wenn es zusätzlich ein anderes Modul im Backend gibt welches durch eine Extension angelegt wurde? Weiterlesen »

Aug 11
  • english
  • german

I just don’t get it! After putting some effort in a website, which was missing in a developer community, and getting almost no feedback, a lot of people are still downloading scriptsfrom eSteak.net – 6000 hits per month. So my contribution to the MooTools-Community was nonsense? Now I had to read this. Sorry, but I am a bit pissed about that. I think, I’ll open the platform for other js frameworks instead of more work for the  MooTools community which obviously doesn’t accept this website. Hopefully the other developer communities are not that exclusive…

Jul 07
  • english
  • german

I just uploaded a new version of the JSGallery script to eSteak which is now compatible with MooTools 1.2. The old version also got a few tweaks and fixes and works in IE7 now (again). Additionally, both versions of the JSGallery_simpleviewer work in Firefox 3 now. Enjoy!