By Cornell Jake on
When I came to chapter 2 of the book "Pro Drupal Development" they ask me to make the file 'annotate.info'.
Okay I do that, and then i must add this content:
; $Id$
name = Annotate
description = Allows users to annotate nodes.
package = Example
version = "$Name$"
The module is show up in the list at Administer -> Site Building -> Modules, but $Name$ is showing litteral!
Picture:
http://img2.freeimagehosting.net/image.php?43944a5516.jpg
or
http://img254.imageshack.us/my.php?image=wrongnamegd7.jpg
Thanks in advance!
Comments
$Name$
I'm not sure, but I think that will get replaced by the source control when you check it in as a Drupal contrib project.
In other words, IF you are adding your module to the Drupal module list, the $Name$ (and the $Id$) will get automatically replaced with an appropriate value.
If you aren't making it available to everyone as a contributed module, then you should just use whatever text you want. (Maybe you can omit that line - not sure as I'm fairly new to this myself.)
$Name$ is specific to CVS
woe is me, this stuff already made it out into the wild in print, huh? ;)
$Name$ is automatically replaced by CVS with the name of the branch or tag you check out from, assuming the .info file was checked into CVS in the first place.
the only reason we used to recommend people put
version = "$Name$"in their .info files was simply as a convinience for the small subset of drupal power-users who deploy their sites directly from CVS. and now, even that reason is meaningless, thanks to the http://drupal.org/project/cvs_deploy module i just wrote and published yesterday.certainly people developing their own custom modules for their own sites shouldn't put $Name$ as the version string for their modules. you should give it whatever version string makes sense for your site.
yes, you can entirely omit the
versionkeyword in your .info files, then the version column on the modules page (admin/build/modules) will just be blank, that's all.cheers,
-derek
___________________
3281d Consulting
Thanks a lot you two,
Thanks a lot you two,
Thus I fill in , or I fill in 5.1 instead of "$Name$"?
I knew it was a smart question :-)