[Typo3] XHTML compliant Imagetext
Matthias Nagl
mnagl at web.de
Sat Aug 13 09:16:24 CEST 2005
Hi Matthias
After several requests I'll post some code:
The most important thing is the extended class.tx_cssstyledimgtext_pi1.php (it is located in typo3conf/ext/css_styled_imgtext after installing this extension). My version is here:
http://www.nagl.info/files/class.tx_cssstyledimgtext_pi1.php.txt
The second are appropriate style-sheets. The most annoying problems about this are the incompatibilities if IE. I've solved this problem with conditional comments that load a special CSS-File for IE.
http://www.nagl.info/files/styles.css
http://www.nagl.info/files/iestyles.css
You may view the complete CSS-Settings by simply visiting the page (www.siegler.de)
TS-Setup:
-----------------------
# Boxtitel anpassen
lib.stdheader.10.key.ifEmpty = 2
lib.stdheader.stdWrap.dataWrap =
lib.stdheader.3 >
lib.stdheader.5.wrap = <p class="header-date">|</p>
# Text-CEs anpassen
tt_content.text.20.wrap = <div class="content"> | </div>
tt_content.text.wrap = <div class="cbox"> | </div>
# Textpic-CEs mit css_styled_imgtext anpassen
tt_content.textpic.wrap = <div class="cbox"> | </div>
tt_content.textpic.20.text.10 >
tt_content.textpic.10.if >
tt_content.textpic.20.text.20.wrap =
plugin.tx_cssstyledimgtext._CSS_DEFAULT_STYLE =
# Gültige XHTML 1.1 Anker produzieren und referenzieren
tt_content.stdWrap.dataWrap = <a id="CID{field:uid}"></a> |
tt_content.menu.20.3.renderObj.typolink.section.wrap = CID|
includeLibs.xhtmlanchor = fileadmin/user_functions/user_typolink.inc.php
tt_content.text.20.parseFunc.tags.link.typolink.parameter.postUserFunc = user_xhtmlAnchor
# Wenns die Funktion schon gibt...
config.xhtml_cleaning = all
# IMAGE CE-rendering dazu bringen schönen CHTML code auszugeben
tt_content.image.wrap = <div class="cbox"> | </div>
tt_content.image.20 = USER
tt_content.image.20.userFunc = tx_cssstyledimgtext_pi1->render_image
tt_content.image.20.caption.1.dataWrap = <p class="caption-{field : imagecaption_position}">|</p>
tt_content.image.20.caption.1.wrapAlign >
tt_content.image.20.caption.1.fontTag >
tt_content.image.20.captionSplit.stdWrap.dataWrap = <p class="caption caption-{field : imagecaption_position}">|</p>
tt_content.image.20.captionSplit.stdWrap.wrapAlign >
tt_content.image.20.captionSplit.stdWrap.fontTag >
tt_content.image.20.1.params >
# CE wraps
tt_content.bullets.wrap = <div class="cbox"> | </div>
tt_content.table.wrap = <div class="cbox"> | </div>
tt_content.uploads.wrap = <div class="cbox"> | </div>
tt_content.multimedia.wrap = <div class="cbox"> | </div>
tt_content.menu.wrap = <div class="cbox"> | </div>
tt_content.bullets.20.stdWrap.wrap = <div class="content"> | </div>
tt_content.table.20.stdWrap.wrap = <div class="content"> | </div>
tt_content.uploads.20.stdWrap.wrap = <div class="content"> | </div>
tt_content.multimedia.20.stdWrap.wrap = <div class="content"> | </div>
tt_content.menu.20.stdWrap.wrap = <div class="content"> | </div>
tt_content.uploads.20.userFunc = tx_cssstyledimgtext_pi1->render_uploads
tt_content.uploads.20.userFunc = tx_cssstyledimgtext_pi1->render_uploads
# remove target attribute from downloads
tt_content.uploads.20.linkProc.target >
# remove target attribute from sitemap
tt_content.menu.20.7.2.target >
tt_content.menu.20.7.1.target >
tt_content.menu.20.5.1.target >
tt_content.menu.20.6.1.target >
tt_content.menu.20.4.1.target >
tt_content.menu.20.2.1.target >
tt_content.menu.20.1.1.target >
-----------------------
Constants
-----------------------
PAGE_TARGET =
styles.content.imgtext.captionSplit = 1
-----------------------
Page-TS-Config
-----------------------
mod.SHARED.colPos_list = 0,2
RTE.default {
removeTags = sdfield,font,center
removeTagsAndContents = style,script
showButtons = formatblock, bold, italic, underline, strikethrough, subscript, superscript, left, center, right, justifyfull, orderedlist, unorderedlist, outdent, indent, textindicator, emoticon, insertcharacter, line, link, table, user, acronym, findreplace, chMode, removeformat, copy, cut, paste, undo, redo, showhelp, about, toggleborders, tableproperties, rowproperties, rowinsertabove, rowinsertunder, rowdelete, rowsplit, columninsertbefore, columninsertafter, columndelete, columnsplit, cellproperties, cellinsertbefore, cellinsertafter, celldelete, cellsplit, cellmerge
hideButtons = image
removeTrailingBR = 1
hidePStyleItems = H1, H2, H4, H5, H6, ADDRESS
showStatusBar = 1
useCSS = 1
}
RTE.config.tt_content.bodytext.showButtons < RTE.default.showButtons
options.contextMenu.options.leftIcons = 1
TCEFORM.tt_content {
spaceBefore.disabled = 1
spaceAfter.disabled = 1
section_frame.disabled = 1
header_layout.disabled = 1
image_noRows.disabled = 1
imageborder.disabled = 1
layout.disabled = 1
colPos.removeItems = 1,3
colPos.showItems = 0,2
}
-----------------------
I hope I didn't forget anything. If I did simply write me an eMail!
- Matthias Nagl (mnagl)
-----------------------
This thread is located in the archive at this URL:
http://typo3.org/documentation/mailing-lists/english-main-list-archive/thread/110133500/
More information about the TYPO3-english
mailing list