Add a file upload to TYPO3 Flexform

I was wondering for a long time if this is possible. To add a file upload to a TYPO3 Flexform. But i never had the real need to implement something like this. Until today.

I run into a problem where the only solution seemed to be a file upload in the extension’s flexform. And i started digging. The solution is at hand and it is simple. You only need to add the following code into the flexform definition file and customize it according to your needs:


  
         
         
		group
	        file
		gif, jpg,jpeg,png,csv
		10000
		uploads/tx_axprice
		1
		1
		1
Width:180px
	
  

  • Share/Bookmark

Typoscript: wrap only if content is not empty

Often i run into this problem in TYPO3 : i have to wrap a content element with Typoscript but ONLY if there is content. This has an easy solution but all too often i forget it and have to search it up again. So this time i post it here and maybe it helps others too.

subparts.col2 < styles.content.getRight
subparts.col2.stdWrap {
       wrap =
|
required = 1 }
  • Share/Bookmark

Job posting: Arxia is hiring PHP developers

Because the growing number of projects, here at Arxia, (the company i work) we’re looking for  good PHP developers again. We do TYPO3 and Drupal development but we also have some other PHP projects that require more resources.

So:

  • Do you have experience with PHP and MySQL ?
  • You are comfortable with working on other people’s code ?
  • You are willing to learn new things ?
  • You are a good team player ?
  • You are open to working with Content Management Systems like TYPO3 or Drupal ?
  • You live in Cluj Napoca, Romania or near the city?

If you can answer with yes to all these questions then please send your resume to:  office{at} arxia {dot} ro

Arxia is an expanding company, with over 8 years of experience in developing web projects  for domestic and international clients.

Arxia is great company to work for, that’s because you have a good salary package, flexible work hours and a great deal of freedom in what you do. You don’t have bosses to bug you all the time and the colleagues are great.

Our office is located close to Cluj Napoca center and if you use public transportation than the bus stop is at a 150 meters.

  • Share/Bookmark

Hell, it’s about time

Today is a very special day. It’s the day we waited for 12 years. And make no mistake, this day – the 27th of July 2010 will remain in history …

What are you waiting for ? Go and buy your copy. I already have mine!

  • Share/Bookmark

How to create a Recycle Bin / Trash feature in TYPO3′s fileadmin

Did you know that you can create a Recycle Bin / Trash feature in TYPO3′s fileadmin ? It will work just like a Recycle Bin, when you delete a file instead of being deleted instantly it will be moved into the recycle folder. This is a hidden feature of TYPO3 and it doesn’t need any complicated settings or programming.

You just go to File -> Filelist and create a special folder named _recycler_

Here is the result (note that i created 2 recyclers – you will see later why) :

The true power of this hidden feature is that it supports multiple recyclers and master/slave configurations. For example in my configuration the files deleted in the templates folder are moved to the Recycler in the templates folder and files on root level directories are moved into the root level Recycler.

Also this setup behaves like a master/slave configuration. For example if i delete a file from the Recycler under templates directory then those files will be moved to the upper level Recycler (root level). If i delete them from here also then they will be deleted for good.

This is a very cool feature that is built into TYPO3 but not many know about it.

  • Share/Bookmark

Will automobile technologies evolve where they should be ?

Do you remember my article written in 2008 about automobiles being left behind by evolution ? Well this is in a way an update to that article. No, unfortunately we didn’t get there overnight. But it seems that we are making small steps in that direction. You can see in the video below what engineers at Volvo are doing to prevent accidents and provide a car that is able to take independent decisions regardless of what the driver is doing or not doing.

This is only a small step in that direction. The direction i envision about automobiles and transportation in general. But its the right one.

  • Share/Bookmark

Two must reads

In the last week there were fewer interesting reads in my reader so my weekly article batch will turn this week into a must read recommendation. I will only point out two articles but oh boy they are good.

The first one is from John Batelle and is called: On Facebook, Google, and Our Evolving Social Mores Online. The article itself is interesting enough but more interesting is the presentation. It has 216 slides but it worth every minute you spend on it. You will find a different perspective on social networks and  social web in general.

The other article is The Emerging Online Giants and is published in The Economist. This article goes behind the front players in the battle of the web and study a few companies that are not so well known as Google or Yahoo or Microsoft but they are steadily and quietly acquire more and more web properties and power. Its interesting to see how they will evolve and what will become of them.

P.S.

BTW,  i see that The Economist is running on Drupal. Way to go!

  • Share/Bookmark

TYPO3 extension: Google Web Font Loader

Not so long ago i was writing about the new Google Web Fonts launched at the latest Google I/O. Well i thought for a time to write an extension that will allow the use of these fonts in a TYPO3 system just by installing the extension and choosing the font. Unfortunately i didn’t had the time to write this extension. But fortunately others had time and just now i discovered that the Google Web Font Loader TYPO3 extension is available for download.

This is great news for all TYPO3 developers. We can now all use this extension to display nice fonts on our websites. I’ve read the documentation of the extension and it seems that one can use multiple fonts in one website and can even configure the plugin via Typoscript:

plugin.tx_googlewebfont_pi1 {
  WebFontLoader = 1
  fonts.google = Tangerine, Inconsolata, Droid Sans
}

It’s as simple as that. And now your fonts look much better. Isn’t this great ?

  • Share/Bookmark

Weekly article batch 3

From this week i will try to resuscitate my weekly article batches.

Here is the most interesting articles from the last week:

  • Share/Bookmark

Romanian browser usage trends 2010

Following the success of my last year study about browser usage in Romania i decided to repeat the study this year, around the same time (June – middle of the year). The methodology is the same , i took browser data from trafic.ro for a few sites (the most visited in Romania) and made an average of them.

The numbers gave me the following chart which covers the period from  November 2007 to June 2010

This chart covers all browser versions that have more then 0.25 percent market share in Romania. As you can see, from December 2009 Internet Explorer 6 started to loose market share rapidly and i put this on the account of Google. Last December i think was the time when Google announced that they won’t support IE6 on many of their apps anymore. Also since my last study IE8 is steadily taking share from her older siblings IE6 and IE7 while Firefox 3 was taking share also from IE6 and IE7 claiming the title of the most used browser version in Romania.

My last year’s prediction that Google Chrome will reach 10% by the end of the year didn’t become a reality, now Chrome being somewhere over 7%. This is understandable because Google Chrome failed to deliver its initial promises as i recently pointed out. Still i think that because of the aggressive promotion conducted by Google it will reach well over 10% this year. Opera is steadily at 4% while Safari being under 1%. Firefox 1 is the least used browser in this study with an average of 0.29%. I guess next year we can ignore it and we can also ignore his younger sibling FF2 which is below 1% and is dropping fast.

This time i made another chart that covers browser market share by vendor. More specifically i didn’t break up specific versions so all Internet Explorer versions appear as IE and all Firefox versions appear under FF.

It is well pointed out in this chart that IE took a serious hit last December and the main gainer of this hit was Firefox. Chrome’s rapid ascension can be observed too.

I will not come up with any predictions this year. But i can say this. 2010 will enter in browser history books as the year of demise for IE6. By the end of the year i think everyone will drop support for this ancient browser. It is time.

  • Share/Bookmark

Thank you Servint!

This blog and some other sites are running on a VPS from  Servint, one of the best hosting providers out there. And from time to time they surprise us. Surprise us in a good way. I rarely praise any company for the service they provide.  But with Servint i must.

I discovered Servint about 5-6 years ago when i was working for a company that bought hosting from them. Meantime i learned that many other hosting providers were just Servint’s resellers. So one day (about 3 years ago), when i was preparing to launch my website, i bought hosting at Servint. It was an Essential VPS with 256 MB RAM and 10 GB of space. Last year Servint upgraded all Essential VPS’es to 756 MB guaranteed RAM (1.5 GB burst RAM) and to 30 GB of space. Yesterday Servint did it again and upgraded my VPS to 50 GB of storage space and both of these upgrades were free with the price of the package remaining unchanged. But this upgrade is not limited to only the Essential VPS, all VPS product lines got upgraded. I think now Servint’s VPS’s are the most powerful in the world. They really deserve the Enterprise VPS title.

But with Servint its not just about the upgrades. Its about the overall quality of service. I never had any unplanned server outage in these 3 years. I had to submit a few tickets because i wanted some services like PHP upgrade or i wanted a PHP accelerator to be installed. Servint’s response time is unbelievable. Usually in just a few minutes they respond. Once we changed like 5 messages in an hour (they ask for confirmations or provide advices on what is the best scenario)  and my request was solved at the end of that hour. I didn’t use phone support but from what i read on their internal forums, phone support is also great with a human responding after one ring.  Servint’s hosting is really managed hosting. All servers are proactively monitored and when any performance issue is noticed they take the necessary steps to solve the issue.  I wish i could post here all the messages to Servint posted on the internal forum (accessible only to Servint customers). Most of them praise Servint as being the best hosting provider in the world.  And i tend to agree.

With other companies i had bad experiences, i’m still working with other companies at work but i must say none of them can deliver the level of service that Servint provides. Not even ones with so called fanatical support. Or maybe they are acceptable to others, but i’m used with other standards with my hosting provider. I cannot be the client of any other hosting company.

I guess as someone on the internal forums said it – i found a host for life.

  • Share/Bookmark

TYPO3 4.4 has been released

Today the newest version of TYPO3 has been released. Version 4.4 comes with lots of new features and it aims to bring TYPO3 closer to new developers making the learning and starting a website of a new website easier.

For this an Introduction Package has been created that will allow those who are not familiar with TYPO3 to have a functional website in minutes, just by installing TYPO3 with the bundled Introduction Package and start customizing the provided extension and templates.

Among other things we notice the following features and improvements:

To read the full announcement head over to the TYPO3 website where you can also download the newest release to get started with this new TYPO3 version.

This is a long awaited release not because of the time it took to be released but because of the Introduction Package (Actually it took only about half a year from previous release). TYPO3 needed to catch up with other content management systems where once you installed the CMS you had a functional website you could start tinkering with. This lack of a functional example alienated many potential developers who looked for other “working” alternatives. Everyone was complaining that TYPO3 gives an “error” when installed the first time. And if you had no idea about Typoscript and templates you were stuck and it was very hard to go forward with implementing a site. Now it become easier to get started and i think TYPO3 adoption will increase in time. Maybe not spectacularly but the gains will be noticeable.  And be prepared for a new announcement on this website in the following weeks, an announcement that will make TYPO3 even more appealing to all developers, beginners or more experienced.

  • Share/Bookmark

How to avoid docx and xlsx turning into zip when downloaded

I run yesterday in a very interesting problem. On one website the client had some downloadable files in docx and xlsx format. But when downloaded with Internet Explorer the files were downloaded as zip files instead of docx or xlsx. If you renamed the downloaded zip file into xlsx or docx they worked but this is a workaround and not a solution for the client.

So i identified the problem quickly and the problem was with the Apache server not being able to identify MIME Types correctly for these files.  I found two solutions:

1) add this to your .htaccess file:

AddType application/vnd.ms-word.document.macroEnabled.12 .docm
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
AddType application/vnd.ms-powerpoint.template.macroEnabled.12 potm
AddType application/vnd.openxmlformats-officedocument.presentationml.template potx
AddType application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam
AddType application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm
AddType application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
AddType application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm
AddType application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
AddType application/vnd.ms-excel.addin.macroEnabled.12 xlam
AddType application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb
AddType application/vnd.ms-excel.sheet.macroEnabled.12 xlsm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
AddType application/vnd.ms-excel.template.macroEnabled.12 xltm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx

2) find the file /etc/mime.types on your server and add the code above to that file

You may need to restart your Apache server to activate these changes. After this you can download docx or xlsx files in their original format and with the name unchanged.

  • Share/Bookmark

TYPO3WorldMap

I found today an interesting website. It is called TYPO3 World Map and it lists TYPO3 developers and enthusiasts from all over the world. It’s quite an interesting application and offers everyone a glimpse of TYPO3′s distribution around the world.

You can find the application here: http://www.typo3worldmap.net/ and if you’re a TYPO3 developer or enthusiast you can sign up so the map will be more accurate.

  • Share/Bookmark

Learn to say “No”

All too often i receive emails or inquiries from people on how much would some website that they imagined would cost and how long it would take for me to implement it. Because this blog lately become more popular then ever before, i started to receive even more of these inquiries .  One might say that very good for me, that in these harsh times i receive work offers. But many of these offers will not get any reply from me or get a negative reply. Why is that ?

This is because i’m not willing to take work that will eventually be turning into bad reputation for me or the client. There are two situations in which this might occur:

1) Stealing websites

For example i often get inquires like this:

“Hi. My name is xxxxxx and i’ve seen you build websites with TYPO3. I would like you to build me a website for a client of mine. I’ve seen this site yyyyyyyy and i would like you to copy this site and change the logo and the texts in it. How much would you charge for this ?”

I rarely reply to this kind of emails. That is because i don’t want to say to someone that he is a thief. Copying websites its just plain stealing if you don’t have the owners approval. First time when i said this the client said:  ”that website is in Australia, who will check it anyway ?”.  No comment.

2) The “i want Facebook in like a week” approach

The other category of inquiries that i turn down will come with this type of emails:

“Hi. My name is xxxxxx and i want to make a website just like Facebook but better, i want to integrate it with Twitter and also a search like Google would be nice on it. My budget would be 1200 EUROS and i need it in two weeks. Would you be interested ?”

No. Most of the times i’m not interested.  The guys at Facebook worked on it for a few years and Twitter is still having issues under load , Google isn’t matched yet as performance (after being tweaked for ten years) but someone wants to build all that in two weeks.  Ok most of the times its not Facebook, Twitter or Google they want but the situation is the same. They want space rockets built out of thin air.

Ok, i might take the project and work on it for two weeks and get some payment for it. But in the end the client wouldn’t be happy with the fact that the product he could get in two weeks is not the product he dreamed of. I would get bad reputation, he would search for someone else.

So when one of the two situations above occurs i learned to say no to these projects. Because its more important to have good projects that you can be proud of working on then many runaway projects that never get completed, or get completed in a manner that will destroy your reputation.

Also when someone making or requiring an estimation or a quote should take into account that there are 3 types of work:

Quality work will never be fast and cheap. It will be either fast and expensive (more developer resources) or cheap but slow.

Fast work will never be cheap and quality work. It will be either cheap and miserable or it will be quality work but it will be expensive. Very expensive.

Cheap work will never be quality work and fast work in the same time. It will be either quality work and slow work or it will be fast work but it won’t be of any acceptable quality.

So if you have to choose always choose two from these three: quality, fast, cheap. Its not possible to choose all three of them.

  • Share/Bookmark
Get Adobe Flash playerPlugin by wpburn.com wordpress themes