Put Video Content on Your Web Site using Drupal
Put Video Content on Your Web Site using Drupal
  • Matthew Weigand
  • 승인 2009.05.08 21:49
  • 댓글 0
이 기사를 공유합니다

For the past few months this How To column has heavily featured new capabilities of this magazine's web site, www.koreaittimes. com. This month is no exception, because we have recently added video reviews to the site from our media partner digitaltrends.com. They have given us an RSS feed of those videos, which we have then been able to automatically pull from digitaltrends.com's video server.

The key to this is yet another mod created for Drupal called FeedAPI. FeedAPI processes feeds such as the increasingly popular RSS style feed and automatically turns them into content on a web site. With Feed Element Mapper, a related module to FeedAPI, you can take each piece of information from an RSS feed that was processed by FeedAPI and map it to a specific information slot on a ProsePoint Story node. The stories practically write themselves.

The first step in using FeedAPI and Feed Element Mapper, of course, is to download and install them. If you are familiar with installing Drupal modules, you can just follow your instincts. If you are not, you should read the readme.txt files for each of the modules. After installation you should turn on the FeedAPI, Feed Element Mapper, and Common Syndication Parser modules. Do not turn on Simplepie Parser, because it is not used.

After standard installation is finished, go to the Create Content section of the Drupal web site, where you can see a new content type, Feed. Simply select it to create a new feed. A feed is basically a title, a small description in the body, and a feed RSS url. You can also set a few check boxes during feed creation to refresh the feed on creation, update existing feed items, pause automatic feed update, and set a time limit for life of a feed item. Do not select refresh feed on creation. Do what you like with the other options and hit save.

You will be able to see the created feed, which is not content in itself, but a mechanism to process content. Finish the setup process by mapping the feed elements to the correct Story elements. Do this by selecting the Map option for the feed you just created. You will see a page with three collapsible areas - feed item example, description of available mappers, and edit mapping. In the feed item example, you can see a very detailed list of discrete pieces of information from the feed, and in edit mapping, you can point this information to the correct slots of your content type. By default this is Story.

One important detail that is often left out is the treatment of embed codes in this whole process. ProsePoint and the FeedAPI module by default strip out codes such as <embed> or <script> from any input or feed respectively. Additionally, Feed Element Mapper displays only an empty blank line in lieu of showing those same codes. If you are trying to import a feed with those items, you need to enable two options, and then have faith. First, you should dig into the Input Formats options of your Drupal site, and set the default input format to Full HTML. Second, you should dig into the FeedAPI options and check the box Allow All HTML tags. Then, you should go back to Feed Element Mapper, and have faith that the empty line in between <body> tags contains the embed code you want. This will save you about two weeks of frustrated experimentation.

Finally, hit save, and then press the option to refresh the feed. A number of videos will be pulled in and created as unpublished stories on your site. Then you will be able to publish them at your convenience and a date that you set with standard Drupal options.  Below is an example of what is at the time of this writing the most popular of these videos.

삭제한 댓글은 다시 복구할 수 없습니다.
그래도 삭제하시겠습니까?
댓글 0
계정을 선택하시면 로그인·계정인증을 통해
댓글을 남기실 수 있습니다.

  • #1206, 36-4 Yeouido-dong, Yeongdeungpo-gu, Seoul, Korea(Postal Code 07331)
  • 서울특별시 영등포구 여의도동 36-4 (국제금융로8길 34) / 오륜빌딩 1206호
  • URL: www.koreaittimes.com / m.koreaittimes.com. Editorial Div. 02-578-0434 / 010-2442-9446. Email: info@koreaittimes.com.
  • Publisher: Monica Younsoo Chung. CEO: Lee Kap-soo. Editor: Jung Yeon-jin. Juvenile Protection Manager: Yeon Choul-woong.
  • IT Times Canada: Willow St. Vancouver BC, Canada / 070-7008-0005.
  • Copyright(C) Korea IT Times, Allrights reserved.