This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Installing Views and CCK Types Programatically

In a module I'm writing, I would like to have three views and a CCK content type created during the install process. I've seen mention of being able to do it for both items, but I haven't been able to find any instructions. I looked in the og_galleries module and saw an implementation of hook_views_default_views() that basically just contained an views export. Is that something I can also run in an install file?

How to translate content pages ?

Hello.

I was searching for content translating module and found localizer but its for 5.1.x and doesn't work on my 5.2
Is there any other ways to translate my content pages ? Translating strings was simple but cant find content translation.

Thank you.

Sincerely,
Janar

Anyway to remove drupalness from GET/POST?

I'm writing a module that just creates a block with a form in it. The form submits to another site via #action set on the form. The remote processing is expecting plain form names, but when my submission gets to the processor the params are surrounded with "edit[...]".

Is there anyway to remove that stuff?

I also don't have access to http_post_data or http_post_fields.

Thanks.

My form looks like this:

Restrict access inside a node on a field by field basis

I have looked at nodeaccess and the content access and they do not fit me needs. What I am looking for is a module that I can restrict access to certain fields inside a node based upon what group a user is in. Does anyone know of a module that would do this or a way to do this?

The end goal is to be able to restrict access to certain fields inside of a node to an anonymous user because some of the fields contain confidential data the public should not have access to.

Thanks!

Modify page.tpl.php ìnside theming process?

Hi,

I'd like to modify the SOURCE of page.tpl.php (or more specific page_xxx.tpl.php)
AFTER the file has been opened form drupal, but BEFORE drupal starts to theme it.

I'd have to put some tags in the page.tpl.php, which would have to be
replaced with some dynamic content.

Is there any way to let a module modify the template file without changing the source code?

Thanks for help!

Ralf

my_form post to my_hook_nodeapi

Hi,

I try to insert some form-variables into the node/edit page.
Maybe something like that:


function ($form_id, &$form) {

  ...

    $form['mytags']['add_new_tag'] = array(
      '#type' => 'fieldset',
      '#title' => t('add new tag'),
      '#collapsible' => TRUE,
      '#collapsed' => empty($path),
      '#access' => user_access('create pagetags'),
      '#weight' => 31,
    );

      $form[''mytags''][add_new_tag]['tag'] = array(
        '#type' => 'textfield',
        '#default_value' => $tag,
        '#maxlength' => 250,
        '#collapsible' => TRUE,
        '#collapsed' => TRUE,
        '#description' => t("Insert the name of tag $tag_name here."),
      );

      $form['mytags'][add_new_tag]['value'] = array(
        '#type' => 'textarea',
        '#default_value' => $value,
        '#maxlength' => 1000000,
        '#collapsible' => TRUE,
        '#collapsed' => TRUE,
        '#description' => t('Insert the content of the tag here '),
      );
...
}

Then in mytags_nodeapi(&$node, $op, $arg)
I want top access the variables, but don't know how to.

function mytags_nodeapi(&$node, $op, $arg) {
...
  case 'insert':
    // here is nothing to find: $node->mytags->add_new_tag['value'];
  break;
...

where can I find the variable contents posted from the form?

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions