Archive for the ‘Uncategorized’ Category

nominate FLOW3 and TYPO3 for SF community awards

Tuesday, May 19th, 2009

Show your support for TYPO3 and the upcoming framework FLOW3 and nominate them for a soure forge community award.

Hit this image to nominate FLOW3 for “Best New Project” and “Most Likely to Change the Way You Do Everything”

..or, hit this button to nominate TYPO3 for “Best Project” and “Best Project for the Enterprise”

There aint much more to say about that ;)

je t’aim MS Exchange – not!

Tuesday, February 17th, 2009

Seriously. We’re using Exchange as our group and mail server. And it’s been working rather good I must say. What I thought. Found out now that – at least since SP2 – we’ve had serious troubles sending to mail servers using grey listning. funny… One fix is to add a batch script restarting smtp server every day (forcing it to resend the queued mail). I gave up and added a smarthost instead and now I rely on my broadband provider.

So now I’m waiting for people to start reacting on my old mails finally delivered. Wooho. :)

For anyone else forced to play exchange-guru on your own due to costs or whatever.. this is what I did:

  • Added a scheduled batch script restarting the smtp server
    net stop smtpsvc
    net start smtpsvc
  • Added a non-existing registry key:
    HKLM\System\CurrentControlSet\Services\SMTPSVC\Queuing\
    “GlitchRetrySeconds” – DWORD set to 300.
  • Added my broadband providers smtp server as a smarthost in Exchange following http://www.arrowmail.co.uk/howto/smrthost.aspx

Hope helps someone else. Now back to real work. Back to my PHP code, away from Exchange, away from Windows server..

create new record link with TCE

Friday, August 8th, 2008

If you need a ‘create new record’ link in BE of TYPO3 and also need to supply some default values, this is the way;

  1. $params = "&edit[$mapTable][123]=new&defVals[$mapTable][name]=banana&defVals[$mapTable][codename]=hajaja";
  2. $aOnClick = t3lib_BEfunc::editOnClick($params,‘../../../../’.TYPO3_mainDir);
  3. $icon = ‘<img’.t3lib_iconWorks::skinImg($this->doc->backPath,‘gfx/edit2.gif’,).‘ title="Create secret agent" alt="" style="border:0;" />’;
  4.  
  5. //print a pen icon with the link
  6. $HTML = ‘<a href="#" onclick="’.$aOnClick.‘">’.$icon.‘</a>’;
  7.  

So, what we do is setting up necessary parameters for alt_doc.php to perform cmd actions. In this example I use;

edit[table name][uid OR pid OR -uid]=command – use uid and the command edit to edit a uid, otherswise (as I do  above) use pid and new as command to create a new record in a certain pid. A negative uid together with the new command Creates a new record right after the supplied uid.
defVals[table name][table column]=value – two times. This sets default values for my two fields; name and codename.

Then assemble the parameters with the TYPO3 API call t3lib_BEfunc::editOnClick(); into a javascript call.

It’s a boy!

Sunday, June 8th, 2008

I’ve become a father once again, and once again it was a boy! a truly lovely one as well. See some pictures (“bäbis 08″) at http://people.merea.se/david/site/index.php?id=23

Screen dump of the day

Thursday, May 22nd, 2008

Just for the nerd fun of it and for that I really like the look n feel of my desktop right now – here’s screen dump of my every day ubuntu environment..

Fixing an eclipse crach

Tuesday, May 6th, 2008

Recently I wasn’t able to start up my Eclipse (vaugly remembering having an X-hangup – x-windows crach I mean). All I got was a small error dialog with a reference to eclipse log file containing huge traceback of java exceptions.. I didn’t have the time or energy to trace this so I swaped to jEdit for a while.

Sooner or later one has to deal with the problems. The later was today.. My method became deleting each plugin path under [workspace path]/.metadata/.plugins/

The solution was quite simple.. I removed the file .snap in the [workspace path]/.metadata/.plugins/org.eclipse.core.resources/ path and it started working again! :-)

I’m no expert in how Eclipse handles it’s workspace data, but apparently I lost associated projects.. ..but that’s that not so tuff to add again.

GMENU/GIFBUILDER broke my swedish characters

Thursday, March 8th, 2007

We’ve been working on a site for a customer for some time now based on TYPO3. As the the respect to typographical issues where important we decided to go forth using GMENU and GIFBUILDER for menus and headings. I really like the concept of GIFBUILDER and working with it. Sadly we got problems with non ascii characters like our swedish åäö and such. They where replaced by ugly boxes.

Character Ö is replaced by a box..

So, why on earth did this happend I questioned my self.. and people on #typo3 @ irc.freenode.org.

I ended up with these suggestions/requirements:

  1. Make sure you use utf-8 all the way. Gifbuilder (probably GD/freetype really)
  2. Check that the font you use is unicode
  3. Check configuration for mbstring (or iconv) that gifbuilder uses

I did all this. Utf-8 was a requirement for the project as the site will be on both chinese, swedish and english. The font seemed to be in Unicode as well (as far as I could tell). And mbstring was working like a charm..

It’s importent to mention that the development server was a windows server.

Anyway. I copied the site to my local windows computer and tested it. The same buggy result. The I copied it to my own webserver running on debian linux and there it worked! Why? Donno.. However. I went back to my local computer and replaced the font with arial. I got nifty åäö all the sudden. This at least allowed me to assume that it had something to do with the font file (a .otf file btw). The only solution I could think of now would be to convert the font hopfully to utf-8. I got merely no experience with typographical things so this was a blank area for me, but after som googleing I stumbled upon fontforge (http://fontforge.sf.net). It’s actually a *NIX application but I installed Cygwin (along with xfce4), and the cygwin port of fontforge. Wow what an app! A really crappy gui, but wow! :)

fontforge with cygwin

So, I went on and converted my .otf font forcing it to Full unicode, replaced it in my exsisting font on the site. It worked like a charm!

My final configuration on every aspect turned out like this:

localconf.php:

  1.  
  2. // UTF-8 support
  3. $TYPO3_CONF_VARS[‘GFX’][‘gdlib_2′] = ’1′;
  4. $TYPO3_CONF_VARS[‘BE’][‘forceCharset’] = ‘utf-8′
  5. // For GIFBUILDER support
  6. // Set it to ‘iconv’ or ‘mbstring’
  7. $TYPO3_CONF_VARS[‘SYS’][‘t3lib_cs_convMethod’] = ‘mbstring’;
  8. // For ‘iconv’ support you need PHP 5!
  9. $TYPO3_CONF_VARS[‘SYS’][‘t3lib_cs_utils’] = ‘mbstring’;
  10. // For Asian languages
  11. $TYPO3_CONF_VARS[‘SYS’][‘multiplyDBfieldSize’] = 3;
  12. //force db communication to utf8
  13. $TYPO3_CONF_VARS[‘SYS’][‘setDBinit’] = ‘SET NAMES utf8;’;
  14.  

Typoscript

  1.  
  2.  
  3. ## GIFBUILDER HEADING RENDER SETUP ########
  4. ##
  5. ##### Header 1
  6. cHeader1 = IMAGE
  7. cHeader1 {
  8.     alttext.cObject = TEXT
  9.     alttext.cObject.field = header
  10.     wrap = <div class="h1gfx">|</div>
  11.     file = GIFBUILDER
  12.     file {
  13.         format = gif
  14.         reduceColors = 15
  15.         transparentColor = #ffffff
  16.         XY = [10.w]+2,[10.h]+8
  17.         backColor = #ffffff
  18.         10 = TEXT
  19.         10 {
  20.     text.field = header
  21.     fontSize = 14
  22.     offset = 0,20
  23.     fontColor = #333333
  24.     fontFile = fileadmin/fonts/NewsGothicStd_utffull.ttf
  25.     antiAlias = 1
  26.     value.case = upper
  27.         }
  28.     }
  29. }
  30.  

Database was set to full utf-8 charset in all tables from the beginning.

See http://wiki.typo3.org/index.php/UFT-8_support about utf-8 support for TYPO3.

About

Wednesday, February 28th, 2007

Well. I’m David. See http://www.merea.se/ (swedish) if your curious on what I do for a living.