/[drupal]/contributions/modules/auto_nodetitle/README.txt
ViewVC logotype

Diff of /contributions/modules/auto_nodetitle/README.txt

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.6 by fago, Tue Oct 30 11:17:38 2007 UTC revision 1.7 by fago, Mon Nov 5 15:26:07 2007 UTC
# Line 1  Line 1 
1  $Id: README.txt,v 1.5 2007/04/07 15:25:04 fago Exp $  $Id: README.txt,v 1.6 2007/10/30 11:17:38 fago Exp $
2    
3  Automatic Nodetitle Module  Automatic Nodetitle Module
4  ------------------------  ------------------------
# Line 7  by Wolfgang Ziegler, nuppla@zites.net Line 7  by Wolfgang Ziegler, nuppla@zites.net
7    
8  Description  Description
9  -----------  -----------
10  This is a small and efficent module that allows hiding of the node title field. To prevent  This is a small and efficent module that allows hiding of the content title field. To prevent
11  empty node title fields it sets the title to the content type name or to an configurable  empty content title fields it sets the title to the content type name or to an configurable
12  string. If the token module is installled it's possible to use various node data for the  string. If the token module is installled it's possible to use various content data for the
13  autogenerated title - e.g. use the text of a CCK field.  autogenerated title - e.g. use the text of a CCK field.
14    
15  Advanced users can also provide some PHP code, that is used for automatically generating an  Advanced users can also provide some PHP code, that is used for automatically generating an
# Line 26  Installation Line 26  Installation
26     type.     type.
27    
28    
29    
30   Advanced Use: Combining tokens and PHP   Advanced Use: Combining tokens and PHP
31   ---------------------------------------   ---------------------------------------
32    
# Line 41  Installation Line 42  Installation
42      return $token;      return $token;
43    }    }
44  ?>  ?>
45    
46   So if the text of the CCK textfield [field_testtext-raw] isn't empty it will be used as title.   So if the text of the CCK textfield [field_testtext-raw] isn't empty it will be used as title.
  Otherwise the node type will be used.  
   
   
  Advanced Use: Accessing $node from PHP  
  ----------------------------------------  
  If you prefer to not use the token module, the best way to access $node is:  
   
 <?php  
   global $form_values;  
   $node = (array)$form_values;  
 ..  
 ?>  
 However, the node does just contain the form_values as submitted by the user. Any data  
 processing the modules might do with their fields will be done later.  
 For sure it's easier to go with the token module!  
47     Otherwise the node type will be used.

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.3