improvement to comply with .info writing norms

ica - June 26, 2009 - 06:38
Project:Content Glider
Version:6.x-1.5
Component:Documentation
Category:task
Priority:normal
Assigned:Unassigned
Status:active
Description

would be better if .info written according to documentation
Writing .info files (Drupal 6.x)
http://drupal.org/node/231036

i.e

-package = "Easy Module"
+package = Easy Module

or better on 1 of the pre-defined module package groups that can be considered to fit 'i.e' User Interface
+package = User Interface

Dependency
+dependencies[] = views

etc. according to the Drupal documentation above

#1

drupal-id.com - June 27, 2009 - 15:45

If you carefully the documentation (http://drupal.org/node/231036) you will find 2 standard format :) i.e.:

1. First sample says: name = Example module
But the next sample say: name = "Forum"

2. name = "Forum" but package = Organic groups , this show Drupal not consistence.

This mean no effect, take alook at e drupal_parse_info_file() if you want to know how exactly this .info will be apply for a project.

#2

ica - June 27, 2009 - 23:19

yes, you are right there is a inconsistency about package naming -with double quotes or without- on the Drupal documentation there.

but also same modules like this one make up their own package rather than including 1 of the module package groups like

package = Easy Module
instead of i.e
package = User Interface
i guess there is also not clear definition of grouping modules what category a module could best fit.
if every module has its own group/category package info does not make sense
although its a general problem with many other modules too

same goes with Dependency issue
is you module depends on views? if so, should not be added?
dependencies[] = views

some modules management modules depends on this part of .info in order i presume
- like the quickadmin modules
http://drupal.org/project/qamodules

anyway these issues are not critical and has a minor importance
thanks for you attention

#3

Dave Reid - August 21, 2009 - 18:29

BTW, The package information in .info files is *not* a taxonomy system. See http://drupal.org/node/231036 for the proper use of package information. If we want to make the admin/build/modules page classified by taxonomy, we should do it properly and refactor the entire page. I also made a small contrib module (Module taxonomy) so people could alter the package information for the modules on their own site.

This module should not include a package line in the .info file.

#4

drupal-id.com - August 22, 2009 - 16:04

@Dave Reid:

Which one is correct? name = Example or name = "Example" ?

Here is the statement from http://drupal.org/node/231036

The displayed name of your module. It should follow the Drupal capitalization standard: only the first letter of the first word is capitalized ("Example module", not "example module" or "Example Module"). Spaces are allowed as the name is used mainly for the display purposes.

name = "Forum"

#5

Dave Reid - August 22, 2009 - 16:11

I don't use quotations for the name line. I'd just use name = Example.

 
 

Drupal is a registered trademark of Dries Buytaert.