HOWTO

HowTo: Add a freetagging form to a node display (Drupal 5)


This has been added to the Drupal 5 PHP Snippet section of the Drupal Handbook

I needed to make a little freetagging form to allow users to tag content as they view it - here's how I did it:

Set up a freetagging vocabulary using taxonomy.module and assign it to your content type as usual. Note the vid (vocabulary id) of your freetagging vocabulary (you can find it in the URL when editing the vocabulary). In a custom module, create a new form like so:

<?php
// form for adding tags to nodes
function MY_CUSTOM_MODULE_tag_form($nid = 0) {
 
$form = array();
 
$form['nid'] = array(
   
'#type' => 'hidden',
   
'#value' => $nid,
    );
 
$form['tag'] = array(
   
'#type' => 'textfield',
   
'#title' => 'add tag',
    );
 
$form['submit'] = array(
   
'#type' => 'submit',
   
'#value' => t('+'),
  );
  return
$form;
}
?>

Module Mashup: Creating a feed of embedded videos using emfield, feedapi, and feedapi_mapper


The following is a HOWTO I just submitted to the Drupal.org Handbook

It is now easy to create feeds of embedded third-party videos on Drupal sites using a combination of CCK, Embedded Media Field, FeedAPI, & the FeedAPI Element Mapper modules.

  1. Enable the following modules and sub-modules: CCK, Embedded Media Field, Embedded Video Field, FeedAPI, FeedAPI Mapper, Common Syndication Parser or SimplePie Parser, FeedAPI Node, & (if you plan on using views with your feeds) FeedAPI Node Views. Make sure to give yourself the correct permissions in the access control admin page.
  2. Create a content type that includes an embedded video field. Once you add the field in is suggested that you select "thumbnail" or "thumbnail with thickbox" to avoid loading too many videos on pages with teaser lists. You can use FeedAPI Node's default content type, called feed, or you can create your own and designate it as a feed in the content type settings page.
  3. Under admin/settings/feedapi it is suggested that you remove and tags from the allowed list, as these may cause problems with certain providers.
Add to calendar
Syndicate content