« June 2013»
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 30

[blog...]

07.05.2012
16:32

TYPO3 Extension Builder - former called Kickstarter

Sometimes it's hard to find up-to-date information about TYPO3 issues in the web. That's of course TYPO3 is so long time in the web and there are forums, mailinglists, 1000s of blogs (like this), wikis and whatever. Another reason is that typo3.org is a really bad indexed website by Google.

 

Today I was looking for the new TYPO3 Extbase Kickstarter. And I was looking and looking and tried the terrible bad search on forge.typo3.org and... got almost mad.

 

Finally I found it here:

And surprice, surprice: It's called Extension Builder now! A good idea to make some difference to the old extension kickstarter. But I missed that point unfortunately.

Now, I'm happy, because the Extension  Builder is part of TYPO3 TER. I don't have to download it by git as early, development version.

Here is some wiki documentation about the new style TYPO3 extension development:

back

03.05.2012
14:17

Backend Language Caching in TYPO3 4.6

If you get lots of messages of this kind

 

??[lang]: User xyz has cleared the language cache

 

in your new TYPO3 4.6.x then there is a simple solution. Add the following setting to your typo3conf/localconf.php:

 

$TYPO3_CONF_VARS['SYS']['lang']['cache']['clear_menu'] = 'TRUE';

 

 

This will add a menu "Clear Language Cache" to your "Clear Cache" menu. Now the user may manually clear the cache.

 

This also fix now the problem with cache-files and NFS. In our setup, the typo3temp is on a NFS-partition. And there seems to be some race conditions why you get errors like this:

 

Core: Error handler (FE): PHP Warning: 
file_get_contents(/var/www/typo3temp/Cache/Data/t3lib_l10n/a232e71bc72d2771b802cab5b3f429b4):
failed to open stream: No such file or directory in /var/www/typo3_src-4.6.8/t3lib/cache/backend/class.t3lib_cache_backend_filebackend.php line 452

 

Usually the file exists - but maybe too late...

 

back

05.04.2012
09:49

extbase extensions need comments to work - PHP optimizer must not remove it!

If you develop extbase/fluid extension for TYPO3 you will get in contact with PHPdoc blocks before classes, functions, variables. This is no nice to have feature but required for extbase to e.g. recognize the right data type.

I really have to learn this because I am not used to write PHPdoc blocks. Usually, I only copy an existing block and adjust the description which I find very important.

 

PHP optimizer or accelerators cache the compiled PHP bytecode and/or do other optimizations. Unfortunately some remove the PHPdoc blocks from the source code first. This is the default behaviour of eAccelerator.

 

With eAccelerator and extbase you get this exception thrown:

 

 

#1242292003: could not determine type of argument "section" 
of the render-method in ViewHelper "Tx_Fluid_ViewHelpers_RenderViewHelper".
Either the methods docComment is invalid or some PHP optimizer strips off comments.

 

 

What to do?

  1. compile eAccelerator with option "--with-eaccelerator-doc-comment-inclusion": "If you want eAccelerator to retain doc-comments in internal php structures" (eAccelerator help)
  2. use another PHP optimizer. I use xCache on Debian Squeeze which seems to work fine.

Links:

back

13.10.2011
22:19

ab_booking 0.5.0 out with new features

Check-in Overview

I promised for weeks to some users to release a new version of ab_booking. Only a few seconds ago, I did it!

New revision 0.5.0 is online in TER (TYPO3 Extension Repository) and on forge.typo3.org.

 

There are some tiny bugfixes and several new features, I am using on my site. Now it's p ossible to make prices depending on the duration of the booking.

 

For example you could enter rates for a double as follows:

  • 1 night: 90 € + 10 € for room cleaning
  • 2 nights: 2x90€ but no extra charge room cleaning
  • 3 nights: 3x80€
  • 7 nights: 7x(90€-20%)

You can achieve this by entering the following code into the price database field:

 

90,D:3:80,D:7:20%

 

Read (comma separated):  It costs 90 per night. A discount ("D") is offered after 3 nights and the new price is 80. Another discount ("D") is vallid after 7 days and you pay 90 minus 20%. And so on...

The same with the room cleaning. If you want only an extra charge for people comming one night, you enter in single component:

 

10,D:2:-1

 

Read: It costs 10 per stay. A discount ("D") is valid after 2 days and the price is removed (-1). You could of course write as well:

 

10,D:2:5,D:7:-1

 

In this case the customers pay 10 for one night, 5 for 2-6 nights and no extra charge for more than 7 nights.

 

Or you can offer optionally breakfast and the customer may deselect it or not.

 

7,D:3:10%,O

 

Read: It costs 7 per person. A discount of 10% is applied after 3 nights. The customer may deselect this option ("O").

 

With 0.5.0 you may also influence the minimum stay for the customer. E.g. if you like to set a minimum stay of 3 nights for bookings more than 8 weeks in the future you can set:

 

3,W:8:2,W:1:1 

 

Read: The minium stay is three nights. 8 weeks before booking start it is reduced to 2 nights. And in the last week before arrival it is set to 1 night.

 

There is an other view which is quite useful in my case: a check-in overview. Now you can put on an internal page a view with the coming arrivals and depatures for the next 4 days (sorry, not configurable at the moment). And you have a simple calendar field to jump to any date in the past and future!

 

 

Now ab_booking is much more flexible but for sure still not flexible enough for everybody. Please feel free to test ab_booking at ab_booking.bigga.de and to install it to your TYPO3 website.

 

back

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

[ 26.02.2013 ]