Sunday, October 25, 2009

Ad Views

Adds Views2 support to the Ad module for Drupal 6.x and Views 2.
Features

The current release provides field support for:
Core Ad Module (inc. Ad, Ad Clicks, Ad Stats)
Views Relationships to user and files tables
Taxonomy support for Ad groups (and any other taxonomy terms required)
Advertisement row style supports rendering of any ad type supported by Ad module. The Ad Module provides a new base node type called Advertisement, rather than just adding fields to the node type.
Provided default view gives simple example of how to display ads
Field support for Ad Text, Ad Image, Ad Flash, Ad External and Ad HTML Modules
Documentation
Roadmap

Fields support to be included in due course:
Ad Notify (1 table)
Ad Owners (1 table)
Ad Channel (4 tables)
Releases
Official releases Date Size Links Status
6.x-1.0-beta1 2009-Sep-20 11.73 KB Download · Release notes Recommended for 6.x

Development snapshots Date Size Links Status
6.x-1.x-dev 2009-Sep-21 11.73 KB Download · Release notes Development snapshot

View all releases

Resources
Read documentation

Monday, October 19, 2009

ModuleInfo

ModuleInfo
View
CVS instructions
Administration · Modules
jabapyth - September 5, 2008 - 19:16


What this Module Does

In the description of each module on the page admin/build/modules, ModuleInfo places a list of the Pages, Blocks, and Content-types created by that module. Basically it alerts the user to any changes that a module makes to the drupal UI.

Currently supports:
Help pages
Configuration Pages
Other Pages
Blocks
Content-Types

Todo:
If system module, link to the handbook page
Query outside review sources (e.g. drupalmodules.com)

Module Info provides a simple description of the changes a
module makes to a user's API. This description is placed on the
admin/build/modules page, conveniently next the module.
This module solves a problem that I have frequently had, and that
others I know have had: When I enable a module, I have no immediate
indication of precisely "what" the module does, and more importantly
*where* i can go to take advantage of that functionality. Frequently I
am forced to hunt around the menus, etc. to with the question "what has
changed now this module is enabled?" My module provides a nice, simple
list of the pages, blocks, and content-types a module creates, eliminating
a (in my view) huge usability issue.
ReleasesOfficial releases Date Size Links Status
6.x-1.2 2009-Jun-04 8.17 KB Download · Release notes Recommended for 6.x
5.x-1.1 2008-Sep-15 7.77 KB Download · Release notes Recommended for 5.x

View all releases

Resources
Home page

Sunday, October 18, 2009

Create from Web

Effortless content creation by retrieving attribute values from the Web to (pre-)fill your node type (cck) fields.

Available services include:
Wikipedia, ISBNdb
BibTex, attribute: value lists
Google Scholar, Amazon, imdb -- to be updated
How does it work?

New nodes are created as follows:
choose a service from the list
enter some query keywords (or text to transform/map)
in case of multiple results: inspect result list and click 'create' on intended item
preview the new node with retrieved data pre-filled
submit node as usual

With the Wikipedia service you can prefill any kind of content types. Querying for a movie e.g. it extracts directors, actors, language, imdb id, and such!
Simple to add a web service of your choice

For new services you have to supply a .inc file that returns an associative array. The keys of this array map to the cck fields of your node type. You can specify also mappings in the settings.

Historical note: Module was initially written for Drupal 4.7 and flexinode. Since Drupal 5 for CCK instead of flexinode. CCK multiple value fields get pre-filled in Drupal 6 version. Currently neglecting Drupal 5 version.

See exemplary use in #387570: How it work?
Releases
Official releases Date Size Links Status
6.x-1.3 2009-Mar-01 13.87 KB Download · Release notes Recommended for 6.x
5.x-1.2 2009-Feb-16 16.32 KB Download · Release notes Recommended for 5.x

View all releases

View Reference

Defines a CCK field type 'View Reference' which allows users to link to, or include views into nodes. This module is modeled on Node Reference and usage is similar.

You can choose views via Autocomplete textfields and Select lists, with support for dynamic 'add another item' unlimited values.

You may enter arguments for each view by a delimiter seperated list with support for php generated arguments.

Some other modules you might be interested in are:
Viewfield - This is a module very similar to View Reference and many people prefer it for it's support for tokens instead of php in arguments. The storage method differs, and views are always chosen with select lists.
Insert View - This is not a CCK module, but rather allows you to use [macros] in body content and blocks to output the view.
Embed Views Display - Provides a Views display plugin to create views output that works more cleanly with embeded views.
Views Attach - Provides a Views display plugin to automatically attach Views to User Profiles and Node Content without storing any info with the User or Node allowing easy global reconfiguration.
Releases
Official releases Date Size Links Status
6.x-2.23 2009-Sep-20 12.34 KB Download · Release notes Recommended for 6.x

View all releases

Associated Nodes

This module enables to associate nodes according to different criteria such as Taxonomy and CCK fields.

You can give a different weight for each criterion. All criteria will be aggregated by the main module which compute a matching score for each couple of nodes. Then, for a given node, you can get the other nodes that are associated to it. The associated nodes are ordered by the matching score they have with the given node.

Different associations can be defined with their own criteria and weight.

The main module provides an API so you can define your own criteria of association (See How to write a plugin).

Associated Links, which is part of the project, is a module that uses Associated Nodes to define blocks with links to associated nodes on nodes pages.

See Associated Nodes Handbook for more documentation.
Releases
Official releases Date Size Links Status
6.x-1.5 2009-Apr-24 14.39 KB Download · Release notes Recommended for 6.x
5.x-1.2 2009-Apr-14 13.25 KB Download · Release notes Recommended for 5.x

View all releases

Resources
Read documentation

Wednesday, October 14, 2009

Module snippets: Automatic Nodetitles

If you have content that doesn't have a title per se, you can use Automatic Nodetitles (http://drupal.org/project/auto_nodetitle) to generate the title. In the simplest form you could use a token like [nid] to insert a node id. However I've found that using just the first n words of the body for the title is a good option.
Here is some code which you can paste into the "Pattern for the title:" field, remember to set "Evaluate PHP in Pattern" to true.
$limit = 10;
$text = $node->body;

$text = strip_tags($text);
     
$words = str_word_count($text, 2);
     
$pos = array_keys($words);
      if (
count($words) > $limit) {
         
$text = substr( $text, 0, $pos[$limit]);
         
$text = trim( $text );
         
$text = rtrim( $text, '.' );
         
$text = trim( $text ) . '...';
      }

return 
$text;
?>

(include the php preprocessor tags). For more advanced limits you might create a hidden field for your content type which holds the value of the number of words to insert into the title. That hidden field could be static for all instances of the field, or configurable per insert.

Build a Module in Drupal 6 Multi-part Video Series

Build a Module in Drupal 6 Multi-part Video Series

This expanding video series from Build a Module.com takes you from building your first module, to securing and testing your code. These videos focus on getting new Drupal developers up to speed with development as quickly as possible using real-world examples from Drupal's top contributors.The videos listed below are free, but there are several additional premium videos on the site that complete the series.