« February 2012»
M T W T F S S
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29        

[blog...]

27.09.2011
18:43

Convert to New TYPO3 News Extension

List View of New news Extension

This week, I converted my first TYPO3 project from "tt_news" to the new "news" extension by Georg Ringer.

 

"news" is written from scratch for TYPO3 4.5 and higher using Extbase and Fluid. It is not compatible with the old and not maintained tt_news extension which is used very often.

 

But I was happy to see an "News Import" filter for the tt_news news articles and categories. In my case only the relation between news and categories got lost. It was not worth digging into this error because I only have 20 news on this system.

The "News Import" in the Web-section is only visible if you activate "Show import module [showImporter]" in the Extension Manager for news.

 

news is much easier than tt_news. There is only one list view which does everything you need: show a list of multiple images, show only latest, show archived, show only one category. The second view is the detailed view. And the third and last one a view called "Date Menu". Don't know what it is good for.

 

There are only a few settings I've done in my template:

 

page.headerData.500 = TEXT
page.headerData.500.value = <link rel="alternate" type="application/rss+xml" title="RSS-Feed" href="http://www.weltcafe-dresden.de/weltcafe/termine/feed.rss" /> 

plugin.tx_news.settings.displayDummyIfNoMedia = 0
plugin.tx_news.settings.defaultDetailPid = 61
plugin.tx_news.settings.facebookLocale = de_DE
plugin.tx_news.settings.list.rss.channel.language = de_DE
plugin.tx_news.settings.list.rss.channel.link = http://www.weltcafe-dresden.de/weltcafe/termine/feed.rss
plugin.tx_news.settings.list.rss.channel.title = Weltcafe Termine

 

To get RSS running, I added in the same template like described in the wiki:

 

[globalVar = TSFE:type = 9818]
lib.stdheader >
tt_content.stdWrap.innerWrap >
tt_content.stdWrap.wrap >
styles.content.get.stdWrap >

pageNewsRSS = PAGE
pageNewsRSS.typeNum = 9818
pageNewsRSS.10 < styles.content.get
pageNewsRSS.10.select.where = colPos=0 AND list_type = "news_pi1"
pageNewsRSS.10.select {
orderBy = sorting ASC
max = 1
}

config {
# deactivate Standard-Header
disableAllHeaderCode = 1
# no xhtml tags
xhtml_cleaning = none
admPanel = 0
metaCharset = utf-8
# define charset
additionalHeaders = Content-Type:text/xml;charset=utf-8
disablePrefixComment = 1
baseURL = http://www.weltcafe-dresden/
absRefPrefix = http://www.weltcafe-dresden/
}

# set the format
plugin.tx_news.settings.format = xml
[global] 

 

 

And last, I added the following lines to my realurl config to get the same urls than before. In this way, my visitors get the right article.

  • First, make a nice name for the RSS feed:
'fileName' => array(      
'defaultToHTMLsuffixOnPrev' => 0,     
'acceptHTMLsuffix' => 1,     
'index' => array(         
'feed.rss' => array(             
'keyValues' => array(                 
'type' => 9818,)
),     
),
),
  • Second, make speaking URLs for the news article itself
'postVarSets' =>    array (      
'_DEFAULT' =>  array (
'article' => array(
array( 'GETvar' => 'tx_news_pi1[controller]',
'valueMap' => array( 'nieuws' => '', ),
'noMatch' => 'bypass', ),
array( 'GETvar' => 'tx_news_pi1[action]',
'valueMap' => array( 'detail' => '', ),
'noMatch' => 'bypass', ),
array( 'GETvar' => 'tx_news_pi1[news]',
'lookUpTable' => array( 'table' => 'tx_news_domain_model_news',
'id_field' => 'uid', 'alias_field' => 'title',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array( 'strtolower' => 1,
'spaceCharacter' => '-', ),
),
),
),
[...]

back

01.11.2010
20:15

TYPO3 tt_news Doesn't Show Hidden News in Backend Preview

I'm using currently TYPO3 4.4.4 and tt_news 3.0.1. The last tt_news version is almost one year old now (its from 2009-12-02) and there are plenty of open, unassigned bugs. It seems to me that nobody is working on tt_news at the moment. But a lot of people are using it.

 

One of my customer asked me, why it is not possible to see the articles as preview in the backend. tt_news just tells you in SINGLE view: "no news_id given". Ok, I'm using realurl. But even when switching it off, tt_news still claims "Keine news_id übergeben." (German translation).

 

I found a bug report (15600) and a dirty hack for this issue. I changed this hack for my needs and it's working now for me. Of course it will get lost with the next update of tt_news but nobody knows when it will be updated :-(

 

 

// http://bugs.typo3.org/view.php?id=15600
if( is_object($GLOBALS['BE_USER'])){    
$suchmuster = '/AND \(?tt_news.hidden\=0\)?/';    
$this->enableFields = preg_replace($suchmuster, "", $this->getEnableFields('tt_news'));

 

 

} else {    
$this->enableFields = $this->getEnableFields('tt_news');
}

back

19.06.2010
20:37

Link t3blog and tt_news Articles on Your TYPO3-Site

Quite often I want to set a link to an article I wrote somewhere else on this TYPO3 page. This is no problem, if this article is on a separate page with a unique ID.

 

But howto set a link to a t3blog article or a tt_news article?

 

As usual, there are several possibilities:

 

I tried them all. To link a tt_news article is no problem with all of it. But howto link a t3blog-article? This seems to be not so easy if you're using realurl!

[...]

By adding the following Typoscript to your page TSconfig (Page->Edit->Options), tinymce_rte shows you the articles and t3blog-categories when selecting the blog-record folder (in my case ID is 3):

 

RTE.default {  
linkhandler {      
tx_t3blog_post {          
default { 
# instead of default you could write the id of the storage folder            
# id of the Single News Page             
parameter = 3            
additionalParams = &tx_t3blog_pi1[blogList][showUidPerma]={field:uid}
additionalParams.insertData = 1
select = uid,title as header,hidden
sorting = crdate desc
}
}        

 

 

       tx_t3blog_cat {            
default {                
parameter = 3                
additionalParams = &tx_t3blog_pi1[blogList][category]={field:uid}                
additionalParams.insertData = 1                
select = uid,catname as header,hidden                
sorting = crdate desc            
}

}
}

 

 


 

Unfortunately it is not possible to select the tags from the menu. This is because all tags of one post are stored in the tagClouds field of the tx_t3blog_post table. So still have to add an external link to your page and add e.g. "blog/tags/typo3" if you're using realurl, your blog is located on page "blog" and you want to select the "typo3" tag.

back

10.11.2009
15:09

newscalendar for Typo3 tt_news

Quite often you have the requirement to list events, news, references or whatever in a cronological order on your webpage. The tt_news extension of Typo3 is capable to do a lot of things. Though it is quite complex to configure it to your needs.

 

One missing feature is a calendar view of the upcoming events. With newscalendar you can do this.

As of version 1.10 newscalendar uses the jQuery tools from flowplayer.org. In my (news-) template I configured my own css for calendar and context menu and I modified the default images of the tooltip background (live demo on doris.bigga.de/vortraege/):

 

plugin.tx_newscalendar_pi1.calendar.startWeekDay = 1
plugin.tx_newscalendar_pi1.file.cssContextMenu = fileadmin/templates/doris/css/cssContextMenu.css
plugin.tx_newscalendar_pi1.file.cssCalendar = fileadmin/templates/doris/css/cssCalendar.css
plugin.tx_newscalendar_pi1.file.jsJQueryTooltip = fileadmin/templates/doris/js/jquery.tools.min.js

 

In the last statement I include my own version of the jquery tools. I just changed the statement "relative:false" into "relative:true". Otherwise the tooltip isn't shown above the date but somewhere because the javascript misscalculates the position.

 

I added a bugreport to the typo3 forge bugtracker: http://forge.typo3.org/issues/show/5313

 

UPDATE (2009-11-26):

There seems to be a lot of development in progress. Today version 2.1.1 is online and my bug is fixed because the jQuerytooltip has been dropped. So I disabled the two lines in the template again:

 

# plugin.tx_newscalendar_pi1.file.cssContextMenu = fileadmin/templates/doris/css/cssContextMenu.css

 

 

# plugin.tx_newscalendar_pi1.file.jsJQueryTooltip = fileadmin/templates/doris/js/jquery.tools.min.js

 

Now I can modify the default scheme by (e.g.):

 

plugin.tx_newscalendar_pi1.tip.backgroundColor=#E3EECB

 

 

plugin.tx_newscalendar_pi1.tip.borderWidth=2

 

 

 

plugin.tx_newscalendar_pi1.tip.positions='top'

 

 

 

 

UPDATE (2010-02-03):

Today version 2.1.4 is online. Fixing errors which has already been fixed and got lost in 2.1.2. Confusing.

 

back

[ 29.01.2012 ]