TYPO free

home

fighting for TYPO free code

the config

This is my setup. I split the configuration into chunks and gave every chunk it's own template. So there is one for tt_news. It is the responsibility of this template to include it's own static templates if needed.

Not all the secrets are in here, but this will get you going with tt_news, comments and ratings.

Please feel free to share your comments or improvements using the form at the bottom.

Main root template constants

  1. title   = TYPO free
  2. slogan  = fighting for TYPO free code
  3.  
  4.  
  5.   // Page id's (hover over a page icon in the page tree to see it's id)
  6. homePage     = 43
  7. newsPage     = 43
  8. newsSingle   = 79
  9. newsArchive  = 43
  10. 404Page      = 16
  11. newsFolder   = 3
  12. nav-top      = 43,8,9,14,28
  13. nav-footer   = 26,25
  14. #searchPage   = 8
  15.  
  16.  
  17.   // Meta data
  18. plugin.meta {
  19.  author      = Michiel Roos
  20.  copyright   = Teknowlogic, 2008
  21.  keywords    = TYPO3,Typo,Free,Typo Free,Ruby,php,typo3 extensions,blog,cli, TYPO3 blog, TYPO3 articles, TYPO3 optimisation
  22.  description = Fighting for TYPO free code. TYPO3 extensions, Linux and Programming related snippets and articles.
  23.  language = en
  24.  includeGlobal = 0
  25. }
  26.  
  27.  
  28.   // Base URL
  29. baseURL      = http://typofree.org/
  30. [globalString = _SERVER|HTTPS=on]
  31.         baseURL      = https://typofree.org/
  32. [global]
  33.  
  34.  
  35.   // Base paths
  36. imagePath    = fileadmin/site/typofree.org/image/
  37. fontPath     = fileadmin/site/typofree.org/font/
  38. stylePath    = fileadmin/site/typofree.org/style/
  39. scriptPath   = fileadmin/site/typofree.org/script/
  40. templatePath = fileadmin/site/typofree.org/template/
  41.  
  42.  
  43.   // Google verification code
  44. googleVerify = ERJKWEJRKWEJRKEJWmCQWEROIXJCVOUblahblah=
  45.  
  46.  
  47.   // Debug
  48. debug        = 0
  49. adminPanel   = 0

comments setup

  1. plugin.tx_comments_pi1 {
  2.         templateFile = {$templatePath}comments.htm
  3.         advanced {
  4.                 dateFormat = %e %b %Y, %H:%M
  5.                 dateFormatMode = strftime
  6.                 reverseSorting = 1
  7.                 enableRatings = 0
  8.         }
  9.         storagePid = 2
  10.         requiredFields = firstname,content
  11.         spamProtect {
  12.                 notificationEmail = [email protected].org
  13.                 fromEmail = [email protected].org
  14.         }
  15.         ratingsConfig < plugin.tx_ratings_pi1
  16.         ratingsConfig {
  17.                 templateFile = {$templatePath}comments.ratings.htm
  18.         }
  19. }
  20.  
  21.  
  22. lib.comments = COA
  23. lib.comments.10 < plugin.tx_comments_pi1
  24. lib.comments.10 {
  25.         code = COMMENTS
  26. }
  27. lib.comments.20 < plugin.tx_comments_pi1
  28. lib.comments.20 {
  29.         code = FORM
  30. }

ratings setup

  1. plugin.tx_ratings_pi1 {
  2.         templateFile = {$templatePath}tt_news.ratings.htm
  3.         storagePid = 29
  4. }

tt_news constants

  1. plugin.tt_news.pid_list = {$newsFolder}
  2.  
  3. # Configure tt_news to display the xml template
  4. plugin.tt_news {
  5.         displayXML {
  6.                 rss2_tmplFile = {$templatePath}rss.htm
  7.                 xmlFormat = rss2
  8.                 xmlTitle = TYPOfree::Blurb
  9.                 xmlLink = {$baseURL}article/
  10.                 xmlDesc = TYPO free :: latest blurb
  11.                 xmlLang = en
  12.                 xmlIcon = fileadmin/site/typofree.org/image/Sound.16.png
  13.         }
  14. }

tt_news setup

  1.  
  2. plugin.tt_news {
  3.         useBidirectionalRelations = 1
  4.         allowCaching = 1
  5.         pid_list  = {$newsFolder}
  6.         singlePid = {$newsSingle}
  7.         newsList  = {$newsArchive}
  8.         archiveTypoLink.parameter = {$newsArchive}
  9.  
  10.         code >
  11.         code = LIST
  12.        
  13.         useHRDates = 1
  14.         useHRDatesSingle = 1
  15.         useHRDatesSingleWithoutDay = 1
  16.  
  17.         catTextMode = 3
  18.         catSelectorTargetPid = {$newsArchive}
  19.        
  20.         usePiBasePagebrowser = 1
  21.         #pageBrowser.maxPages = 5
  22.        
  23.         dontUseBackPid = 1
  24.           // Do not filter backLink through htmlspecialchars
  25.         hscBackLink = 0
  26.         firstImageIsPreview = 1
  27.         templateFile = {$templatePath}tt_news.htm
  28.  
  29.         enableArchiveDate >
  30.         enableArchiveDate = 1
  31.         datetimeDaysToArchive >
  32.         datetimeDaysToArchive = 30
  33.  
  34.         archiveMode >
  35.         archiveMode = month
  36.         archiveMenuNoEmpty >
  37.         archiveMenuNoEmpty = 1
  38.  
  39.         limit = 5
  40.         reverseAMenu = 1
  41.         displayArchivedInLatest = 1
  42.        
  43.         substitutePagetitle = 1
  44.        
  45.         displayLatest {
  46.                 title_stdWrap.htmlSpecialChars = 1
  47.                 title_stdWrap.htmlSpecialChars.preserveEntities =
  48.                 date_stdWrap.strftime = %a, %e %b %Y
  49.                 subheader_stdWrap.crop = 450 | . . . | 1
  50.                 subheader_stdWrap.stripHtml = 0
  51.         }
  52.         displayList {
  53.                 title_stdWrap.htmlSpecialChars = 1
  54.                 title_stdWrap.htmlSpecialChars.preserveEntities =
  55.                 date_stdWrap.strftime = %a, %e %b %Y
  56.                 subheader_stdWrap.crop = 450 | . . . | 1
  57.                 category_stdWrap.wrap = <div class="category">|</div>
  58.                 subheader_stdWrap.stripHtml = 0
  59.         }
  60.         displaySingle {
  61.                 title_stdWrap.htmlSpecialChars = 1
  62.                 title_stdWrap.htmlSpecialChars.preserveEntities =
  63.                 date_stdWrap.strftime = %e %b %Y
  64.                 category_stdWrap.wrap = <div class="category">|</div>
  65.                 author_stdWrap.wrap = <span class="author">|</span>
  66.         }
  67.         displayCatMenu {
  68.                 mode = nestedWraps
  69.                
  70.                 catmenuHeader_stdWrap.wrap = <span class="hide">&nbsp;|</span>
  71.                
  72.                   // enable root icon
  73.                 catmenuNoRootIcon = 1
  74.                
  75.                   // disable other icons
  76.                 catmenuIconMode = -1
  77.                
  78.                   // wrap for the complete "catmenu"
  79.                 catmenu_stdWrap.wrap = <div class="categoryMenu">|</div>
  80.                
  81.                   // wraps for active or inactive category links in the tree
  82.                 catmenuItem_ACT_stdWrap.wrap = <div class="current">|</div>
  83.                 catmenuItem_NO_stdWrap.wrap = <div>|</div>
  84.  
  85.                   // wrap for level "n"
  86.                 catmenuLevel1_stdWrap.wrap =
  87.                 catmenuLevel2_stdWrap.wrap =
  88.                 catmenuLevel3_stdWrap.wrap =
  89.                 catmenuLevel4_stdWrap.wrap =
  90.         }
  91.         _LOCAL_LANG.default {
  92.                 more = more &raquo;
  93.                 goToArchive = more information &raquo;
  94.                 backToList = &laquo; list
  95.                 latestHeader = latest news
  96.                 catmenuHeader =
  97.                 archiveHeader = archive
  98.                 textCat = category:
  99.                 pi_list_browseresults_displays = article ###SPAN_BEGIN###%s to %s</span> of ###SPAN_BEGIN###%s</span>
  100.                 pi_list_browseresults_first = &laquo; first
  101.                 pi_list_browseresults_last = last &raquo;
  102.                 pi_list_browseresults_prev = &lt; previous
  103.                 pi_list_browseresults_next = next &gt;
  104.         }
  105.  
  106.           // Unset default style
  107.         _CSS_DEFAULT_STYLE >
  108. }
  109.  
  110.  
  111. [globalVar = TSFE:id = {$newsSingle}]
  112. plugin.tt_news {
  113.         catTextMode = 1
  114. }
  115. [global]
  116.  
  117.  
  118. plugin.tt_news {
  119.   displayXML {
  120.     rss091_tmplFile = {$plugin.tt_news.displayXML.rss091_tmplFile}
  121.     rss2_tmplFile   = {$plugin.tt_news.displayXML.rss2_tmplFile}
  122.     rdf_tmplFile    = {$plugin.tt_news.displayXML.rdf_tmplFile}
  123.     atom03_tmplFile = {$plugin.tt_news.displayXML.atom03_tmplFile}
  124.     atom1_tmplFile  = {$plugin.tt_news.displayXML.atom1_tmplFile}
  125.  
  126.       // possibile values: rss091 / rss2 / rdf / atom03
  127.     xmlFormat  = {$plugin.tt_news.displayXML.xmlFormat}
  128.  
  129.     xmlTitle   = {$plugin.tt_news.displayXML.xmlTitle}
  130.     xmlLink    = {$plugin.tt_news.displayXML.xmlLink}
  131.  
  132.     xmlDesc    = {$plugin.tt_news.displayXML.xmlDesc}
  133.     xmlLang    = {$plugin.tt_news.displayXML.xmlLang}
  134.     xmlIcon    = {$plugin.tt_news.displayXML.xmlIcon}
  135.     xmlLimit   = {$plugin.tt_news.displayXML.xmlLimit}
  136.     xmlCaching = {$plugin.tt_news.displayXML.xmlCaching}
  137.  
  138.     title_stdWrap.htmlSpecialChars = 1
  139.     title_stdWrap.htmlSpecialChars.preserveEntities = 1
  140.    
  141.     subheader_stdWrap.stripHtml        = 1
  142.     subheader_stdWrap.htmlSpecialChars = 1
  143.     subheader_stdWrap.htmlSpecialChars.preserveEntities = 1
  144.     subheader_stdWrap.crop             = 100 | ... | 1
  145.  
  146.  
  147.     subheader_stdWrap.ifEmpty.field = bodytext
  148.     xmlLastBuildDate = 1
  149.   }
  150. }
  151.  
  152. xmlnews {
  153.         10 {
  154.                 pid_list  = {$newsFolder}
  155.                 singlePid = {$newsSingle}
  156.                 newsList  = {$newsArchive}
  157.                 archiveTypoLink.parameter = {$newsArchive}
  158.        
  159.                 dontUseBackPid = 1
  160.  
  161.                 useHRDates = 1
  162.                 useHRDatesSingle = 1
  163.                 useHRDatesSingleWithoutDay = 1
  164.         }
  165. }
add comment
Just say it . . . *



*
*
* required