###
# 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 = <p>|</p>
  
  versionPreviewMessage_stdWrap.wrap = <div style="border:2px solid red;padding:10px;margin:10px 0px 10px 0px;"><img src="t3lib/gfx/icon_note.gif" class="absmiddle" alt="" height="16" width="18">&nbsp;<strong>|</strong></div>
  versionPreviewMessageLinkToOriginal_stdWrap.wrap = &nbsp;<span style="font-weight:normal;">|</span>
   
  # 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 = <span style="color:#bbb;">|</span>
    inactiveLinkWrap = |
    activeLinkWrap = <strong>|</strong>
    LinksWrap =|
    showResultsWrap = |<br />
    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 = <div class="news-catmenu">|</div>
    catmenuHeader_stdWrap.wrap = <p class="news-catmenu-header">|</p>

    # 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 = <div class="news-catmenu-ACT">|</div>
    catmenuItem_NO_stdWrap.wrap = <div class="news-catmenu-NO">|</div>

    # wraps for each menu level (only in mode "nestedWraps")
    catmenuLevel1_stdWrap.wrap = <div class="level1">|</div>
    catmenuLevel2_stdWrap.wrap = <div class="level2">|</div>
    catmenuLevel3_stdWrap.wrap = <div class="level3">|</div>
    catmenuLevel4_stdWrap.wrap = <div class="level4">|</div>
  }

  # - - - - - - - - -  catRootline settings  - - - - - - - - - - - #
  catRootline {
  	showCatRootline = {$plugin.tt_news.showCatRootline}
  	catRootline_stdWrap.wrap = <div class="news-catRootline">|</div>

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

  # - - - - - - - - -  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 = <strong>|</strong>
       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 = <dl class="news-single-files">|</dl>
  newsFilesHeader_stdWrap.wrap = <dt>|</dt>
  newsFiles {
    path = uploads/media/
    icon = 1
    stdWrap.wrap = <dd>|</dd>
  }

  # related news by category
  relatedByCategory_stdWrap.wrap =  <dl class="news-single-related">|</dl>
  relatedByCategoryHeader_stdWrap.wrap = <dt>|</dt>
  # globalwrap 2 is used to wrap the list items
  wrap2.wrap = <dd>|</dd>
  
    
  # - - - - - - -   Settings for Related News:  - - - - - - - -  #

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

  related_stdWrap.wrap =  <dl class="news-single-related">|</dl>
  relatedHeader_stdWrap.wrap = <dt>|</dt>

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

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

  # 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 = <dd> | </dd>
        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 = <dd> | </dd>
      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 = <dd> | </dd>
      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.%m.%y
    time_stdWrap.strftime= %H:%M
    title_stdWrap.wrap =
    subheader_stdWrap.wrap = <h3>|</h3>
    subheader_stdWrap.trim=1
    subheader_stdWrap.required=1
    author_stdWrap.typolink.parameter.field = author_email
    author_stdWrap.wrap = <p class="news-single-author">|</p>
    preAuthor_stdWrap.noTrimWrap = || |
	
    addInfo_stdWrap.wrap = <div class="news-single-additional-info"> | </div>

    links_stdWrap.wrap = <dl class="news-single-links">|</dl>
    linksHeader_stdWrap.wrap = <dt>|</dt>
    linksItem_stdWrap.wrap = <dd>|</dd>

    
    imageCount=4
    imgAltTextField = imagecaption
    imageWrapIfAny = <div class="news-single-img"> | </div>

    category_stdWrap.wrap = <div class="news-single-category"> | </div>
    email_stdWrap.setContentToCurrent = 1
    email_stdWrap.typolink.parameter.current = 1
    caption_stdWrap.wrap = <p class="news-single-imgcaption"> | </p>
    caption_stdWrap.trim=1
    # caption_stdWrap.required=1
  
  }
  displaySingle.image {
    file.maxW = {$plugin.tt_news.singleMaxW}
    file.maxH = {$plugin.tt_news.singleMaxH}
    wrap = 
    imageLinkWrap = 1
    imageLinkWrap {
      enable = 1
      bodyTag = <body bgColor="#ffffff">
      wrap = <a href="javascript:close();"> | </a>
      width = 500m
      height = 500
      JSwindow = 1
      JSwindow.newWindow = 1
      JSwindow.expand = 17,20
    }

  }

  # - - - - - - - - - - - rendering of LATEST news   - - - - - - - - - - -  #
  displayLatest {
    age_stdWrap.age = 1
    date_stdWrap.strftime= %d.%m.%y
    time_stdWrap.strftime= %H:%M
    caption_stdWrap.if.directReturn = 0
    subheader_stdWrap.stripHtml = 1
    subheader_stdWrap.crop = 100 | ... | 1
    subheader_stdWrap.ifEmpty.field = bodytext
    imageCount=1
    imgAltTextField = imagecaption
    imageWrapIfAny =
    category_stdWrap.wrap = <div class="news-latest-category"> | </div>
    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

    stdWrap.spaceAfter = 0
  }

  # - - - - - - - - - -    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 = 230 | ... | 1
    subheader_stdWrap.ifEmpty.field = bodytext
    author_stdWrap.wrap =
    preAuthor_stdWrap.noTrimWrap = || |
    imageCount=1
    imageWrapIfAny = 

    category_stdWrap.wrap = <div class="news-list-category"> | </div>
    imgAltTextField = imagecaption

    linkTitleField = title
    linkTitleField.wrap = 
    linkAltField = short
    linkAltField.wrap = 
  }
  displayList.image < displaySingle.image
  displayList.image {
    file.maxW = {$plugin.tt_news.listMaxW}
    file.maxH = {$plugin.tt_news.listMaxH}
    imageLinkWrap = 1
  }
  # Example for overriding values from locallang.php with other values
  _LOCAL_LANG.de {
    # more = [weiterlesen...]
  }
}




# - - - - - - - - - -  display Archive in yearly periods - - - - - - - - -  #

# include the amenu script
includeLibs.newsAmenuUserFunc = EXT:tt_news/res/news_amenuUserFunc2.php
# call user function
plugin.tt_news.newsAmenuUserFunc = user_processAmenu


# - - -  This enables the tt_content.record item to display news items - -  #
tt_news >
tt_news = < plugin.tt_news
tt_news.displayCurrentRecord = 1


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