Posted by flaviovs on September 16, 2009 at 4:52pm
Jump to:
| Project: | Automatic Nodetitles |
| Version: | 6.x-1.2 |
| Component: | Documentation |
| Category: | feature request |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | closed (won't fix) |
Issue Summary
Since there's no standard in Drupal for using or not <?php...?> on text areas designed to input PHP code, these fields usually includes a note on their description telling if the <?php...?> are (not) needed.
Since the module allows for PHP input in a text area, it would be good if you explain in the field description if the <?php...?> tags are needed or not.
Comments
#1
For those, like me, who had trouble finding it...
Its explained at the bottom of the Automatic title generation collapsible group ( at the top of Content Types add/edit form) - under the checkbox Evaluate PHP in pattern.
E.G. to store a pseudo-random UUID as the Title (as per RFC 4122 and courtesy of mimec - http://www.php.net/manual/en/function.uniqid.php#69164) :-
<?phpprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),
mt_rand( 0, 0x0fff ) | 0x4000,
mt_rand( 0, 0x3fff ) | 0x8000,
mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ) );
}
?>
Thanks for this module.
#2
@michael38walker, thanks for the tip, but this page is specific to tracking the issue at the top of the page, and I fail to see how your tip is related to it.
Please, create a handbook entry under http://drupal.org/node/283830 so that other can refer to your tip when necessary.
Thanks again.
#3
I think it should be fine as it is.
#4
Fixing status then (please see http://drupal.org/node/156119)