Fröhling

Niels Fröhling about [X]HTML, JS and technical tidbits

  • Home
  • About
28. July 2009

RTE “demo-mode” TS-config

Ethatron in Fixes, TYPO3

It appears the “demo-mode” of the TYPO3 system-extension RTE-HTMLArea is broken. One may believe so because quite a bunch of tags which are not only valid but also offered (GUI-wise) will be HCSed. The reason is in the oversight to provide a acompanying TS-config for the “demo-mode” Page-TS setup. As not everyone may have the ability to step and debug through the code I provide the TS-config you should use for the “demo-mode” here:

lib.parseFunc_RTE {
    removeTags := removeFromList(dl, dt, dd, cite)
    allowTags := addToList(dl, dt, dd, cite)
    denyTags := removeFromList(dl, dt, dd, cite)

    nonTypoTagStdWrap.encapsLines.addAttributes >
    externalBlocks := addToList(dl)

    externalBlocks.blockquote.callRecursive.tagStdWrap.HTMLparser.tags.blockquote.overrideAttribs >
    externalBlocks.dl < .ol
}
Kein Kommentar
21. November 2008

TypoScript insane

Ethatron in Scripts, TYPO3

Today I had to create an easy maintainable link-list inside an FCE. As TYPO3 does not offer any native link-lists, you have to make it yourself. Well after some time and try-out I got something working, and a beer from Steffen (thank you very much). It works similar to the tt_content.bullets, just that in this case each line contains a text and where it links, like this:

Title | http://google.com - - Google
Title | http://wikipedia.org - - Wikipedia

You may recognize it’s just a text and a complete typolink-parameter. Easy enough - you think. Well take a look and decide if you’ve made the same.

Here is the code (public domain):

10 = TEXT
10.field = field_links
10.wrap =
|
10 { trim = 1 split { token.char = 10 cObjNum = 1 1.parseFunc > # the negative match has to be done first, because the # following split actually changes the current-value 1.1 = TEXT 1.1.current = 1 1.1.wrap =
|
1.1.if.value.current = 1 1.1.if.matches = /\|/ 1.1.if.negate = 1 # continue with destructive splitting 1.2 = TEXT 1.2.current = 1 1.2.wrap =
|
1.2.if.value.current = 1 1.2.if.matches = /\|/ 1.2.trim = 1 1.2.split { token = | cObjNum = |*|1||2|*| # we don’t put the string into value, so we would not need to delete it # if we would delete it with ‘>’, the LOAD_REGISTER will not work 1.parseFunc > 1.1 = LOAD_REGISTER 1.1.title.current = 1 # we don’t put the string into value, so we don’t overwrite 2.1 # if we would overwrite 2.1, the RESTORE_REGISTER will kill all data 2.parseFunc > 2.2 = RESTORE_REGISTER 2.trim = 1 # so this is it, first fragment into value, second directly into typolink # the order of execution is sorted, so don’t worry about the strange order here 2.1 = TEXT 2.1.data = register:title 2.typolink { parameter.current = 1 ATagParams = rel=”shadowbox” target = extTarget = } } } }
Kein Kommentar

Tags

  • Algorithms Assembler bash C++ Homemade Javascript MMX Optimization Rants TYPO3

Categories

    • Applications
      • TYPO3
    • TidBits
      • Algorithms
      • Approximations
      • Equivalence
      • Fixes
      • Javascript
      • Optimizations
      • Scripts
    • Uncategorized

Meta

    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org

Recent Posts

    • jQuery’s animate is short-thought
    • movntq alignment
    • OP-equivalent series (pavgd)
    • OP-equivalent series (psubq)
    • OP-equivalent series (paddq)

 

  • February 2012
    M T W T F S S
    « Aug    
     12345
    6789101112
    13141516171819
    20212223242526
    272829  

Archives

    • August 2010
    • April 2010
    • February 2010
    • January 2010
    • July 2009
    • February 2009
    • December 2008
    • November 2008
    • August 2008
    • July 2008
    • May 2008
© 2010 Wired by Fröhling
Design von Dezzain Studio
Übersetzt von Htwo
Nature Pictures | Bamboo Blinds