updating modr8 to add a unique node build_mode, I realized there is no rational or common standard for what int value a contrib module should use. I think this shoudl be documented in doxygen in core so it's somewhat findable.

Comments

pwolanin’s picture

Status: Active » Needs review
StatusFileSize
new1.36 KB

An easy and sane standard - use the unix timestamp as of when you write the code - then new modules can never break existing modules, and core never uses in values in the range of current timestamps. Hopefully since this is jsut doc it can also get backported for D6.

As a separate issue we should consider for D7 whether flags like the node build mode should be strings that are easier to make unique using a module name as a prefix.

pwolanin’s picture

Title: Add doxygen suggestion standard for contrib moduel build modes and similar int constants. » Add doxygen suggestion standard for contrib module node build modes and similar int constants.
cwgordon7’s picture

Status: Needs review » Needs work

Liklihood should be spelled likelihood. :)

cwgordon7’s picture

Also the unix timestamp seems to make sense, but I wonder whether it would be any better to just randomly generate a number - or perhaps create a centralized listing somewhere where a contributed module can reserve integer constants.

pwolanin’s picture

Status: Needs work » Needs review
StatusFileSize
new948 bytes

Angie rightly points out that no one will see the doxygen there. So, how about just adding it to node_build_content() since we don't even document currently that this node property will have a major impact on the result of this function.

pwolanin’s picture

StatusFileSize
new949 bytes

fix typo

webchick’s picture

Can we please also add the possible build modes included in core, like hook_menu() does with 'type'?

pwolanin’s picture

StatusFileSize
new1.36 KB

ok

dries’s picture

Status: Needs review » Fixed

Committed to CVS HEAD. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.