Typo3: Add string to headerData in Extension
April 22, 2011 Leave a comment
$GLOBALS[‘TSFE’]->additionalHeaderData[$extKey] = “<title>Page title</title>”;
Just a few lines of code.
April 22, 2011 Leave a comment
$GLOBALS[‘TSFE’]->additionalHeaderData[$extKey] = “<title>Page title</title>”;
April 22, 2011 Leave a comment
If we are on a tt_news detail view page, we want to display the tt_news title in the page title.
In this case, the page title is stored in page.headerData.100.
[globalVar = GP:tx_ttnews|tt_news > 0]
page.headerData.100.field =temp.newsTitel = COA
temp.newsTitel {
wrap =
5 = RECORDS
5 {
source = {GPvar:tx_ttnews|tt_news}
source.insertData = 1
tables = tt_news
conf.tt_news >
conf.tt_news = TEXT
conf.tt_news.field=title
}
}page.headerData.100 < temp.newsTitel
[global]
April 19, 2011 Leave a comment
Example: s.data is a BLOB field.
SELECT CAST(s.data AS CHAR(10000) CHARACTER SET utf8) as blabla FROM sync_transport s LIMIT 0,1000
or
SELECT CONVERT(s.data USING utf8) as blabla FROM sync_transport s LIMIT 0,1000
April 15, 2011 Leave a comment
I found this very interesting question at stackoverflow:
What are the diffrences between utf8_general_ci and utf8_unicode_ci?
utf8_general_ci is a very simple collation. What it does – it just – removes all accents – then converts to upper case
utf8_unicode_ci supports so called expansions and ligatures, for example: German letter ß (U+00DF LETTER SHARP S) is sorted near “ss” Letter Œ (U+0152 LATIN CAPITAL LIGATURE OE) is sorted near “OE”.
utf8_general_ci does not support expansions/ligatures, it sorts all these letters as single characters, and sometimes in a wrong order.utf8_unicode_ci is generally more accurate for all scripts. For example, on Cyrillic block: utf8_unicode_ci is fine for all these languages: Russian, Bulgarian, Belarusian, Macedonian, Serbian, and Ukrainian. While utf8_general_ci is fine only for Russian and Bulgarian subset of Cyrillic. Extra letters used in Belarusian, Macedonian, Serbian, and Ukrainian are sorted not well.
The disadvantage of utf8_unicode_ci is that it is a little bit slower than utf8_general_ci.So when you need better sorting order – use utf8_unicode_ci, and when you utterly interested in performance – use utf8_general_ci.
Source: http://forums.mysql.com/read.php?103,187048,188748#msg-188748
Additional I can say: utf8_bin is case-sensitive because it’s binary! 🙂
April 15, 2011 1 Comment
For instance, you would like to replace ‘abc’ with ‘def’ everywhere in your file, do the following:
cat file1.txt | sed -e ‘s/abc/def/’ > file2.txt
April 8, 2011 Leave a comment
apt-get install apache2 php5 libapache2-mod-php5 mysql-server libapache2-mod-auth-mysql php5-mysql phpmyadmin php-pear php5-dev imagemagick libmagickwand-dev