TT_news Einstellungen


Ein paar Einstellungen bei tt_news kommen fast bei jedem Projekt zum Einsatz – ich will hier mal diesen Code auch anderen Usern bekanntgeben!

Es wäre super wenn eure Erfahrungen und euer Code hier auch vorgestellt werden könnte! Für Tipps und Fragen bin ich immer zu haben!

Hier der Code Teil:

// Damit kann man im Vorspan auch html TAGS mit einbauen
plugin.tt_news.displayList.subheader_stdWrap.stripHtml = 0

//Hier kann man die Ext. mit seinen Texten versehen
plugin.tt_news._LOCAL_LANG.de {
backToList = zurück
}
plugin.tt_news.displayList {
date_stdWrap.strftime= %A %d %B %Y
}

plugin.tt_news.displaySingle {
date_stdWrap.strftime= %A %d %B %Y
}

plugin.tt_news.maxCatImages = 100
plugin.tt_news.useHRDatesSingle = 0
plugin.tt_news.useHRDatesSingleWithoutDay = 0
plugin.tt_news.dontUseBackPid = 1
plugin.tt_news.useHRDates = 0

Hoffe da kommt noch einiges was man immer so braucht!

Danke das Sie diesen Artikel gelesen haben. Sie können nun eine Nachricht hinterlassen oder bestellen den RSS Feed.

Comments

Für tt_news braucht man wahrlich mal eine Script-Sammlung
Vielleicht hat hier ja jemand mal ein vollständiges Script

Bis dahin mal ein Beitrag von mir zum Thema Datums-Formate.
Die %-Codes findet man auf folgender Seite:
http://www.php.net/manual/en/function.strftime.php

#Deutsche Zeitformate
plugin.tt_news {
archiveTitleCObject {
10.strftime = %B – %Y
}
getRelatedCObject {
20.strftime = %d.%B %Y %H:%M
}
displaySingle {
date_stdWrap.strftime= %d.%B %y
time_stdWrap.strftime= %H:%M
age_stdWrap.age = Minuten | Stunden | Tage | Jahre
}
displayLatest {
date_stdWrap.strftime= %d.%B %y
time_stdWrap.strftime= %H:%M
}
displayList {
date_stdWrap.strftime= %A %d.%B %Y
time_stdWrap.strftime= %d.%B %y %H:%M
}
}

… vielleicht hier “kurz” :) noch mein bisheriges umfassendes tt_news-TypoScript

#————————————————————–
#—– tt_news default-Setup ———————————-
#————————————————————–

###
# This is the default TS-setup for the new tt_news standard template: EXT:tt_news/pi/tt_news_v2_template.html
#
# (see Section Reference in the manual for more options & parameters)
#
# tt_news v 2.x
###

# Includes the newsLib:
includeLibs.ts_news = EXT:tt_news/pi/class.tx_ttnews.php

plugin.tt_news = USER
plugin.tt_news {
userFunc = tx_ttnews->main_news

# template file
templateFile = {$plugin.tt_news.file.templateFile}

# page to get the newsitems from -> “Starting point”
pid_list = {$plugin.tt_news.pid_list}

# page for the Single view (changed in version 1.6.0 – PIDitemDisplay don’t work anymore)
singlePid = {$plugin.tt_news.singlePid}

# page id for the archive link in “LATEST” template
archiveTypoLink.parameter = {$plugin.tt_news.archiveTypoLink.parameter}

recursive = 2
code.field = select_key
allowCaching = {$plugin.tt_news.allowCaching}
limit = {$plugin.tt_news.limit}
latestLimit = {$plugin.tt_news.latestLimit}
backPid = {$plugin.tt_news.backPid}

# Search
searchPid =
emptySearchAtStart = 1

# parse the ‘back to list’ link through htmlspecialchars()
hscBackLink = 1

# substitute pagetitle with title of news article
substitutePagetitle = 1

useHRDates = {$plugin.tt_news.useHRDates}

noNewsToListMsg_stdWrap.wrap = |

versionPreviewMessage_stdWrap.wrap =  |
versionPreviewMessageLinkToOriginal_stdWrap.wrap =  |

# Rendering of news items. re-use the RTE parseFunc configuration for normal content
general_stdWrap {
parseFunc < tt_content.text.20.parseFunc
}

# Pagebrowser settings
usePiBasePagebrowser = 0
pageBrowser {
maxPages = 7
showResultCount = 1
showPBrowserText = 0
dontLinkActivePage = 1
tableParams = cellpadding="2" align="center"

# settings for the extended pageBrowser from TYPO3 3.8.0
showFirstLast = 1
pagefloat = center
showRange = 1
disabledLinkWrap = |
inactiveLinkWrap = |
activeLinkWrap = |
LinksWrap =|
LinksWrap.ATagParams = class=”NewsLink”
showResultsWrap = |
showResultsNumbersWrap =
browseBoxWrap =
browseLinksWrap = |
}

# Display language labels and/or flags
showLangLabels = 0
showFlags = 0
flagImage {
file.maxW = 16
}

# Category settings
catImageMode = {$plugin.tt_news.catImageMode}
catTextMode = {$plugin.tt_news.catTextMode}
maxCatImages = 10
maxCatTexts = 10

# category modes:
# 0 = don’t care about category selections
# 1 = display selected categories
# -1 = display deselected categories
categoryMode = 0

catImageMaxWidth = 25
catImageMaxHeight = 25

useSubCategories = {$plugin.tt_news.useSubCategories}
displaySubCategories = {$plugin.tt_news.displaySubCategories}
showRelatedNewsByCategory = {$plugin.tt_news.showRelatedNewsByCategory}
useSPidFromCategory = {$plugin.tt_news.useSPidFromCategory}

categoryDivider = ,
categoryDivider_stdWrap.noTrimWrap = || |

# – - – - – - – - – CATMENU settings – - – - – - – - – - – #

# setting for the category menu (CATMENU)
displayCatMenu {
# catmenu rendermode:
# nestedWraps = make a catmenu with nested wraps
# tree = use TYPO3 class treeview to build the catmenu
mode = tree
catmenu_stdWrap.wrap = |
catmenuHeader_stdWrap.wrap = |

# 1 = icon from cat record
# 2 = own icons
# 0 = default icon
# -1 = no icon
catmenuIconMode = 0

# if “catmenuIconPath” is set and “catmenuIconMode” is 2 all icons “join”,”joinbottom” & “line” are expected in this path
catmenuIconPath =

# icon for all categories if “catmenuIconMode” = 2
catmenuIconFile = EXT:tt_news/res/arrow.gif

# icon size for “catmenuIconMode” 1 & 2
catmenuIconFile {
width = 18
height = 16
}

# disables the “root” icon of the category tree if set
catmenuNoRootIcon = 1

insertDescrAsTitle = 1

# userdefined root icon
# catmenuRootIconFile = circle_blue.gif

# size of the userdefined root icon
catmenuRootIconFile {
width = 18
height = 16
}

# wraps for active or inactive category links in the tree
catmenuItem_ACT_stdWrap.wrap = |
catmenuItem_NO_stdWrap.wrap = |

# wraps for each menu level (only in mode “nestedWraps”)
catmenuLevel1_stdWrap.wrap = |
catmenuLevel2_stdWrap.wrap = |
catmenuLevel3_stdWrap.wrap = |
catmenuLevel4_stdWrap.wrap = |
}

# – - – - – - – - – catRootline settings – - – - – - – - – - – #
catRootline {
showCatRootline = {$plugin.tt_news.showCatRootline}
catRootline_stdWrap.wrap = |

# if titles are linked the link points to the page which is configured as category shortcut
linkTitles = 1
title_stdWrap.wrap =
divider =  > 
}

# – - – - – - – - – Archive settings – - – - – - – - – - – #

datetimeDaysToArchive = {$plugin.tt_news.datetimeDaysToArchive}
enableArchiveDate = 1
pageTypoLink.parameter.current = 1

reverseAMenu = 1
archiveMenuNoEmpty = 1

# the Condition in the following COA highlights the active Archive month
archiveTitleCObject = COA
archiveTitleCObject {
10 = TEXT
10 {
field = start
strftime = %B %Y
wrap = |
if {
value.field = start
equals.data = GPvar:tx_ttnews|pS
}
}
20 = TEXT
20 {
field = start
strftime = %B %Y
if {
value.field = start
equals.data = GPvar:tx_ttnews|pS
negate = 1
}
}
}
archiveEmptyMsg_stdWrap.wrap =
searchEmptyMsg_stdWrap.wrap =
noNewsIdMsg_stdWrap.wrap =

# – - – - – - – - – news Files: – - – - – - – - – - – #

newsFiles_stdWrap.wrap = |
newsFilesHeader_stdWrap.wrap = |
newsFiles {
path = uploads/media/
icon = 1
stdWrap.wrap = |
}

# related news by category
relatedByCategory_stdWrap.wrap = |
relatedByCategoryHeader_stdWrap.wrap = |
# globalwrap 2 is used to wrap the list items
wrap2.wrap = |

# – - – - – - – Settings for Related News: – - – - – - – - #

useBidirectionalRelations = {$plugin.tt_news.useBidirectionalRelations}
usePagesRelations = {$plugin.tt_news.usePagesRelations}

related_stdWrap.wrap = |
relatedHeader_stdWrap.wrap = |

# icon for related news
tmp.5 = IMAGE
tmp.5 {
file = EXT:tt_news/ext_icon.gif
file.width = 11
file.height = 12
wrap = |  
}

# end-wrap for the getRelated objects
tmp.20 = TEXT
tmp.20 {
field = datetime
strftime = %d-%m-%y %H:%M
wrap =  -  |
}

# Build the list of related news:
getRelatedCObject = COA
getRelatedCObject {
# groupBy =
orderBy = datetime desc

10=CASE
10.key.field=type
# settings for ‘normal’ related news
10.default=COA

10.default {
wrap = |
5 < plugin.tt_news.tmp.5
10 = TEXT
10.field = title
10.typolink.parameter = {$plugin.tt_news.singlePid}
10.typolink.additionalParams.data=register:newsAddParams
10.typolink.useCacheHash = 1
20 < plugin.tt_news.tmp.20
}
# settings for related news, that point to internal pages
10.1=COA
10.1 {
wrap = |
5 < plugin.tt_news.tmp.5
5.file=EXT:tt_news/res/tt_news_article.gif
10 = TEXT
10.field = title
10.typolink.parameter.field = page
20 < plugin.tt_news.tmp.20
}
# settings for related news, that point to external URLs
10.2=COA
10.2 {
wrap = |
5 < plugin.tt_news.tmp.5
5.file=EXT:tt_news/res/tt_news_exturl.gif
10 = TEXT
10.field = title
10.typolink.parameter.field = ext_url
20 < plugin.tt_news.tmp.20
}
}

# pagebrowser for singleview
useMultiPageSingleView = {$plugin.tt_news.useMultiPageSingleView}
maxWordsInSingleView = 0

# – - – - – - – - – - – rendering of SINGLE news – - – - – - – - – - – #

displaySingle {
age_stdWrap.age = 1
textNewsAge_stdWrap.wrap =
date_stdWrap.strftime= %d.%B %y
time_stdWrap.strftime= %H:%M
title_stdWrap.wrap =
subheader_stdWrap.wrap = |
subheader_stdWrap.trim=1
subheader_stdWrap.required=1
author_stdWrap.typolink.parameter.field = author_email
author_stdWrap.wrap = |
preAuthor_stdWrap.noTrimWrap = || |

addInfo_stdWrap.wrap = |

links_stdWrap.wrap = |
linksHeader_stdWrap.wrap = |
linksItem_stdWrap.wrap = |

imageCount=4
imgAltTextField = imagecaption
imageWrapIfAny = |

image >
image.stdWrap.cObject = COA
image.stdWrap.cObject {

10 = IMAGE
10.wrap = |
10.file.import.data = TSFE:lastImageInfo|origFile

10.file.maxW = {$plugin.tt_news.singleMaxW}
10.file.maxH = {$plugin.tt_news.singleMaxH}
10.imageLinkWrap = 1
10.imageLinkWrap {

enable = 1
typolink.parameter.stdWrap.cObject = IMG_RESOURCE
typolink.parameter.stdWrap.cObject {
file.import.data = TSFE:lastImageInfo|origFile
file.maxW = 800
}

typolink.ATagParams (
onclick=”return hs.expand(this)”
class=”highslide”
)
}
}

}

# – - – - – - – - – - – rendering of LATEST news – - – - – - – - – - – #
displayLatest {
age_stdWrap.age = 1
date_stdWrap.strftime= %d.%B %Y
time_stdWrap.strftime= %H:%M
caption_stdWrap.if.directReturn = 0
subheader_stdWrap.stripHtml = 1
subheader_stdWrap.crop = 150 |  … | 1
subheader_stdWrap.ifEmpty.field = bodytext
imageCount=1
imgAltTextField = imagecaption
imageWrapIfAny =
category_stdWrap.wrap = |
categoryItem_stdWrap.wrap =

linkTitleField = title
linkTitleField.wrap =
linkAltField = short
linkAltField.wrap =
}
displayLatest.image < displaySingle.image
displayLatest.image {
file.maxW = {$plugin.tt_news.latestMaxW}
file.maxH = {$plugin.tt_news.latestMaxH}
imageLinkWrap = 1
wrap = |
#

stdWrap.spaceAfter = 0
}
displayLatest.imageCount = 2

# – - – - – - – - – - rendering of LIST news – - – - – - – - – - – #
displayList {
age_stdWrap.age = 1
textNewsAge_stdWrap.wrap =
date_stdWrap.strftime= %A %d. of %B %Y
time_stdWrap.strftime= %d/%m/%y %H:%M

# Don’t display caption in List view
caption_stdWrap.if.directReturn = 0

title_stdWrap.wrap =
subheader_stdWrap.stripHtml = 1
subheader_stdWrap.crop = 150 |  … | 1
subheader_stdWrap.ifEmpty.field = bodytext

subheader_stdWrap.append = TEXT
#subheader_stdWrap.append.data = register:newsMoreLink
subheader_stdWrap.append.data =
#subheader_stdWrap.append.wrap = |
subheader_stdWrap.append.wrap =
subheader_stdWrap.append.if.isTrue.field = bodytext

author_stdWrap.wrap =
preAuthor_stdWrap.noTrimWrap = || |
imageCount=1
imageWrapIfAny =

category_stdWrap.wrap = |
imgAltTextField = imagecaption

linkTitleField = title
linkTitleField.wrap =
linkAltField = short
linkAltField.wrap =
}
displayList.image
tt_news = < plugin.tt_news
tt_news.displayCurrentRecord = 1

### CVS id ###
# $Id: setup.txt 8605 2008-03-15 20:03:19Z rupertgermann $

#……………………………………………………..
#….. List-View: Bildgröße festlegen …………………….
#……………………………………………………..

plugin.tt_news {
displayList {
image.file.maxH = 311
image.file.maxW = 484

}

displayLatest {
image.file.maxH = 96
image.file.maxW = 144

}
}

Leave a comment

(required)

(required)