TYPO3 4.3 Multimedia Cookbook
Total Page:16
File Type:pdf, Size:1020Kb
TYPO3 4.3 Multimedia Cookbook Over 50 great recipes for effectively managing multimedia content to create an organized website in TYPO3 Dan Osipov BIRMINGHAM - MUMBAI This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010 953 Quincy Drive, , Brick, , 08724 TYPO3 4.3 Multimedia Cookbook Copyright © 2010 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: January 2010 Production Reference: 1210110 Published by Packt Publishing Ltd. 32 Lincoln Road Olton Birmingham, B27 6PA, UK. ISBN 978-1-847198-48-8 www.packtpub.com Cover Image by Vinayak Chittar ([email protected]) This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010 953 Quincy Drive, , Brick, , 08724 Credits Author Editorial Team Leader Dan Osipov Mithun Sehgal Reviewers Project Team Leader Karsten Dambekalns Lata Basantani Mario Rimann Mathias Schreiber Project Coordinator Poorvi Nair Acquisition Editor Rashmi Phadnis Proofreader Andie Scothern Development Editor Reshma Sundaresan Graphics Technical Editor Nilesh R. Mohite Kavita Iyer Production Coordinator Copy Editor Adline Swetha Jesuthas Ajay Shanker Cover Work Indexer Adline Swetha Jesuthas Hemangini Bari This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010 953 Quincy Drive, , Brick, , 08724 About the Author Dan Osipov has over 12 years of web development, graphic design, as well as system architecture and application development experience. He has worked on various multipurpose sites, including e-commerce, educational, informational, and dynamic news sites. For the last 4 years, he has worked in the media industry, designing and maintaining an online presence for journals and newspapers. At the moment of writing, Dan was employed at Calkins Media, where he worked on using TYPO3 as the CMS system powering high traffic, dynamic news sites, like phillyBrubs. com and Timesonline.com. He is also a member of the Digital Asset Management team, focused on the development of the DAM extension for TYPO3. I would like to thank the Phillyburbs team, as their needs served as an inspiration for a lot of the material in this book. I would like to thank the TYPO3 community at large for "inspiring people to share". Last, but not least, I would like to thank my family for their understanding and support. This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010 953 Quincy Drive, , Brick, , 08724 About the Reviewers Karsten Dambekalns, born in 1977, learned the basics of web technology the hard way – by looking at other websites' HTML source. This happened after having learned BASIC and Assembler on a good old Commodore C128. Karsten discovered PHP in 1999 and and was caught by TYPO3's immense possibilities in 2002. Later, he joined the TYPO3 Association and today is part of the TYPO3 5.0 and FLOW3 development team. In 2000, he founded his own Internet company together with a friend from university, which he left behind in 2008 to become a freelancer working fully on the development of TYPO3. Karsten also speaks at conferences and writes articles about topics around PHP and TYPO3. Karsten mostly lives in Germany with his wife Līga, their three kids, and a nameless Espresso machine. Mario Rimann, born in 1982 in Zürich, Switzerland, started his journey through the IT jungle back in the early 90s. After his primary education as a service technician for office equipment like printers, copy machines, fax machines, and computers, he moved to his first job as a system administrator at a school. After collecting some years of IT and "people-skills", Mario moved onto the European headquarters of a company running a big website in the nightlife business, later he had his own company, and is now again a regular employee. While being employed at the above-mentioned school, he made his first contact with TYPO3. In the beginning, it was mainly a hobby—which evolved to be the main part of his own company. In 2006 and 2007, he organized the first two international TYPO3 Developer Days, which took place in Switzerland. This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010 953 Quincy Drive, , Brick, , 08724 Right now, Mario is employed as a project manager and developer at a mid-sized web-agency in central Switzerland that specializes in TYPO3 and Magento. Alongside his job, Mario also helps out in several TYPO3 projects. You can contact him at [email protected]. Mathias Schreiber has been working in the Web industry since 1995, developing websites with database-driven content for several large companies throughout Europe. He has been a part of the TYPO3 community since early 2002. Ever since then, he has been close to the core development and also hosted early developer meetings in 2004. He did more than 100 training sessions in Germany and Switzerland spreading the word about TYPO3 and has trained most of today's successful TYPO3 companies. In 2004, he founded wmdb Systems together with Peter Kühn, Diana Beer, and Bodo Eichstaedt and since then he maintains large TYPO3 projects for many well-known companies from Europe. For two years, he has been part of the 12 so called active members of the TYPO3 Association but resigned from his duties to focus on his company and family. Today, you can find him on almost any TYPO3 event there is—training snowboard- beginners at the TYPO3 Snowboard tours, mentoring bug-fixing sessions on the TYPO3 Developer days, or sharing ideas on the TYPO3 Conference. This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010 953 Quincy Drive, , Brick, , 08724 Table of Contents Preface 1 Chapter 1: Getting Started 7 Introduction 8 Setting up a web server on Debian 9 Setting up a multithreaded environment 12 Setting up a web server on Windows 14 Creating a scalable architecture 16 Setting up an NFS share 18 Setting up TYPO3 19 Installing needed extensions 23 Creating a template for a site 25 Chapter 2: Managing Digital Assets 31 Setting up a file structure 31 Setting up a filemount 35 Setting up rights for backend users 36 Setting up FTP access 39 Setting up a category tree 42 Creating a frontend upload form 44 Debugging code 51 Creating frontend user groups 53 Creating frontend users 54 Chapter 3: Operating with Metadata in Media Files 57 Inserting metadata into images 58 Extracting metadata from images 59 Inserting metadata into audio 64 This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010 953 Quincy Drive, , Brick, , 08724 Table of Contents Extracting metadata from audio 65 Extracting metadata from PDF 66 Chapter 4: Rendering Images 69 Rendering images using content elements 70 Embedding images in RTE 72 Rendering images using TypoScript 78 Rendering links to files using <media> tags 79 Creating a gallery using ce_gallery 83 Rendering metadata from a DAM object 87 Chapter 5: Rendering Video and Audio 89 Rendering video using media content object 89 Rendering audio using media content object 93 Rendering audio and video using media TypoScript object 94 Rendering audio and video using content elements and rgmediaimages extension 96 Extending the media content object for more rendering options 101 Using custom media player to play video 106 Connecting to Flash Media Server to play video 113 Chapter 6: Connecting to External APIs 117 Introduction 117 Getting files from Amazon S3 118 Uploading files to S3 121 Creating a bucket in S3 123 Uploading DAM files to S3 125 Getting recent Flickr photos 128 Uploading files to Flickr 130 Uploading DAM files to Flickr 132 Reading list of movies from YouTube API 137 Authenticating requests to YouTube API 140 Showing video list with frontend plugin 141 Chapter 7: Creating Services 149 Extracting metadata from OpenOffice documents 149 Processing audio using a service 156 Converting a video to FLV upon import 162 Converting audio using services 165 Building an audioConversion service 180 ii This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010 953 Quincy Drive, , Brick, , 08724 Table of Contents Chapter 8: Automating Processes 185 Adding FTP access to the media repository 185 Indexing downloaded files 194 Setting up indexing rules 197 Categorizing files by geolocation 204 Index 207 iii This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010 953 Quincy Drive, , Brick, , 08724 This material is copyright and is licensed for the sole use by jackie tracey on 23rd February 2010 953 Quincy Drive, , Brick, , 08724 Preface TYPO3 is one of the world's leading open source content management systems, written in PHP, which can be used to create and customize your website.