Wednesday, May 2, 2007

Sterilizing For Pregnant Dogs

RTE (HTMLArea): paragraph and text selection define

So, after a long time writing another entry ...
I have once again engaged in a Typo3 problem and found a solution ;-).
Problem: Customer wants to highlight the RTE text and make it turn red. The just use the Color Picker, but her knows that: Once you give the general editor, more options than necessary, everyone must obviously be a mess out somehow somewhere in the website. As a developer, you get gray hairs over relatively quickly, as it probably even six months gehießen even before "The page must correspond exactly to our Style Guide!" has and it is for the A * sch has opened ... well, for the solution ...
TSConfig In your Page must be in the pure:
 
RTE.config.tt_content.bodytext
proc.allowedClasses = {} redtext

RTE.default
{# just to be sure that all fields are #
da .. .
showButtons = *
}
RTE {
classes {
redtext {
name = Red
value = color: # AA0000;
}
important {
name = Important
value = color: # 00FF00;
}
} default
{
classesCharacter = = Redtext
classesParagraph important
contentCSS = fileadmin / _system / rte.css
}}


So now created her a CSS file with the abstract names rte.css.
In the states the following:
 
span.redtext
{color: # AA0000;}


p.important
{color: # 00FF00;}


Download the file in the directory files / _system (or wherever However - you must then just adjust the path above).
Flushes all caches have on the safety time and already you should select the part of the text in your text drop-down list, select \u0026lt;Rot> . Your clicks into a Paragraph, should see \u0026lt;Wichtig> .

The really was all in all, nothing heavy, but can still eat time.

Tuesday, January 16, 2007

Hyundai Camera Driver

Custom character sets in the backend

So after I've spent a good five hours to find out why the website of a customer shot so Sun has been shown (only in Japanese language version), you get the solution of quasi served on a silver platter.
First off my problem description: Our client supplied
Japanese texts (web site exists in German [Standard], English and Chinese [Simplified]). After our intern entered the majority of Japanese texts is then had noticed that for some sign of HTML code will be destroyed.
have for eternal back and forth, I then found that the Japanese character ( csh_jp [yes, the TYPO3 version is not 4.0]) set for the Japanese language pack with shift_jis not compatible with the customer-supplied Word documents was (who were in the character set euc-jp encoded ).
Now one could argue, "Why did not you forceCharset in the Install Tool to set UTF-8 Then the problem would not exist ...?"
My answer: "Sure - absolutely thoughtful response, but no one was so real keen on the customer his German texts explain why all must be entered again. And ... oh yeah I had mentioned - since even a Chinese version was ... "
Conclusion: We have to somehow convert the BE in euc-jp (yes the VU is relatively simple to switch)

The bad news first. except forceCharset the encoding in the backend can not override
Now the good. too hard it still is not - if you know where you even need ...

solution:

You open the file typo3 . / t3lib/class.t3lib_cs.php
approximately in line 356 is the following code:
 var $ lang_to_charset_unix = array (
'west_european' => 'iso-8859-1',
'estonian' => 'iso-8859-1',
[...]
'chinese' => 'gb2312' / / = euc-cn
'japanese' => 'euc-jp '
'korean' => 'euc-kr',
[...]
);

The next array is the same for Windows, just that there is a charset for Japanese shift_jis . This has to be euc-jp be replaced. Last you need in the next array ($ charSetArray ), ticker jp euc-jp also be registered. Now you have to
only upload the file and voila - your back shines with new coding.

Oh, and for front-end's in your TypoScript template you must insert the following line:
 config.renderCharset = euc-jp 

I hope you saved a lot of time.

Monday, January 15, 2007

Can Tendonitis Get You A Weed License

Section Header Install

If you want to install so-called section headers, you can use for the following TypoScript:
 temp.CurrentPage 
temp.CurrentPage = HMENU special = {
rootline
special.range = 1 Protected area

>>
Downloads
to display the label for section headers still
Customer
.
So, I hope this was somewhat understandable ;-)