Disable authoring information and other fieldsets

If you want to hide authoring information and the other fieldsets on new/edit node pages, add something like this to a module. It seems to work, but please reply if anyone's got a better solution.

You'll need to change 'news_article_node_form' to e.g. 'page_node_form' or whatever your node type is. Alternatively if you want it for all node types.


<?php
// Implementation of hook_form_alter
function news_article_form_alter($form_id, &$form) {

if ($form_id == 'news_article_node_form') {

// We're going to hide various fields by setting default values for them

$form['author']['#type'] = 'value';
$form['author']['name'] = array('#type'=>'value', '#value'=>$form['author']['name']['#default_value']);
$form['author']['date'] = array('#type'=>'value', '#value'=>$form['author']['date']['#default_value']);

$form['options']['#type'] = 'value';
$form['options']['status'] = array('#type'=>'value', '#value'=>$form['options']['status']['#default_value']);
$form['options']['moderate'] = array('#type'=>'value', '#value'=>$form['options']['moderate']['#default_value']);
$form['options']['promote'] = array('#type'=>'value', '#value'=>$form['options']['promote']['#default_value']);
$form['options']['sticky'] = array('#type'=>'value', '#value'=>$form['options']['sticky']['#default_value']);
$form['options']['revisions'] = array('#type'=>'value', '#value'=>$form['options']['revisions']['#default_value']);

Browser/Server MIME mismatch on file upload

I'm running Drupal 4.7b2 and having a problem with a mismatch between the MIME type sent by the browser (for uploaded files) and the MIME type that the server thinks the file has. The warning, which comes from file.inc, looks like this:

For /tmp/php5Jc9L0 the system thinks its MIME type is application/x-zip while the user has given application/x-zip-compressed for MIME type

For /tmp/phpIqDVKH the system thinks its MIME type is text/plain while the user has given application/pdf for MIME type

Running:
Debian Sarge
Apache/1.3.33
PHP 4.3.10-16
Drupal 4.7b2

Menu question

I do the first steps using drupal, now I ask for some advises how to create the menu-tree.
I would like to have the following

----------------------------------------------------------------------

logo Company

topic1 topic1 topic3 topic4
-----------------------------------------------------------------------
- suptopic1
- suptopci2
- ....

the main-menu should be in the header, a click on topic1 should open a menu on the right side an so on.

Urgently need a Drupal coder with Theme and Module experience.

I'm developing an IM product and require a website that gives registered users access to their own Blog etc like MSN Spaces. I need someone to design themes and modules.

Basically, Drupal has all the required functionality but I want a much cleaner presentation and the layout to be simplified.

I have my own servers in a co-lo that run fedora core 4, php 5 and apache 2.054. I already have Drupal (4.6 i think) installed and working.

I am really running out of time, i need to go live by the end of March.

This project will provide ongoing work.

taxonomy_access on pre-existing nodes problem

So, taxonomy access is great, but here's a pattern that's confusing me:

flexinode input formats - HTML/PHP etc.

Flexinode is great. But I'm confused about how/if it works with input formats.

On my first flexinode type, the standard 3 types appear (Filtered HTML, PHP code, Full HTML) ... like any other node.... but it's not clear what it applies to?? Anyway, whatever I set it to, it doesn't save, it's always "Filtered HTML."

The behavior of the textareas I've created is not "Filtered HTML" ... it ignores <?php ?> stuff, and allows any HTML, no conversion of linebreaks.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 4.7.x