Disable upload and comment for a new content type programmatically

Following code is useful when installing a module that create a new content type programmatically on Drupal x.

Basically, it adds two variables setting default values for comments (core Comment module) and attachments (core Upload module).

Code to write on my_funny_module/my_funny_module.install.

Note that this code assign only default values for my_content_type: as any content type, this value could be later changed via GUI.

on

variable_set('comment_<em>my_content_type</em>', COMMENT_NODE_DISABLED); // Install schema as usual (if any) drupal_install_schema('my_funny_module'); }</pre> <p>Note that this code assign only <em>default</em> values for <em>my_content_type</em>: as any content type, this value could be later changed via GUI.</p>

Proxied content from gemini://chirale.org/2009-12-07_375.gmi (external content)

Gemini request details:

Original URL
gemini://chirale.org/2009-12-07_375.gmi
Status code
Success
Meta
text/gemini; charset=utf-8
Proxied by
kineto

Be advised that no attempt was made to verify the remote SSL certificate.