script

Tuesday, August 21, 2012

Get Typoscript setup variable in php

$GLOBALS["TSFE"]->tmpl->setup["plugin."]["tx_name_of_plugin."]["variable_name"]

Thursday, August 9, 2012

Encryption Key was empty!

Go to TYPO3 Install tool -> All Configurations

Enter anything in textfield of [encryptionKey] and save these settings.

An error will be removed.


Saturday, August 4, 2012

Import gmail contacts api link

http://lookmywebpage.com/api/google/import-gmail-or-google-contacts-using-php-and-oauth-2-0/

Wednesday, August 1, 2012

Sort by parameters given in IN clause

Use MySQL's FIELD() function:
SELECT name, description, ...
FROM ...
WHERE id IN([ids, any order])
ORDER BY FIELD(id, [ids in order])
FIELD() will return the index of the first parameter that is equal to the first parameter (other than the first parameter itself).
FIELD('a', 'a', 'b', 'c')
will return 1
FIELD('a', 'c', 'b', 'a')
will return 3

Load font in dompdf

Use http://eclecticgeek.com/dompdf/load_font.php