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

Upload not working

Hi there,

I'm trying to get a file uploaded with the upload module. Well it's coming as far as being uploaded in the C:\windows\temp folder but there is stays. It won't show up in the drupal/files folder.
Files folder has read/write access. If I use image module files are being uploaded to a subfolder so uploading shouldn't be a problem.
The file that I try to upload is 13k, it works on the image module.

Anybody an idea.

Grtx, Stonie

Gallery2 woes, please help...

I am hoping someone can help me. I installed Gallery2 under Drupal 4.6.4 and I originally installed it under my Drupal directory in a directory named '/gallery'... Then when I configured it (after a fully successful install) in Drupal. All seemed to go fine. Until I enabled the block and then the site went blank. Nothing, nothing at all. I mean the second I enabled the gallery block in Drupal all I got was a blank page (even in admin mode). Tried going back to my Drupal root - same, blank page. I changed the name of the gallery directory and the site came back. I thought that by possibly naming the install directory 'gallery' was somehow a problem. So I ripped it out completely - brand new install from scratch of gallery2 to a 'gallery2' directory.

Now I got two problems - first Drupal seems to still think that it should be going to only '/gallery' as its directory for admin and everything. I could swear I edited some config file in Linux at some point when I first did the install that set 'gallery' as the base directory (I don't know, maybe I didn't) but it seems that Drupal is always going to a 'gallery' directory for settings. BUT then again I do not know if this is supposed to be 'gallery' and not 'gallery2'

I mean this:

http://www.thehongkongstandard.com/drupal-4.6.4/gallery is blank!

and this:

http://www.thehongkongstandard.com/drupal-4.6.4/gallery2/main.php is a default view of a gallery2 install...

Bug in 4.7 form_execute?

I have a module with a form_name, form_name_validate and form_name_execute. In cvs version the module work, in 4.7 the function form_name_execute don't start..... is a bug of 4.7? The code:


<?php

function test2_form_help($section='') {
$output = '';
switch ($section) {
case "admin/modules#description":
$output = t("Insert test2_form");
break;
}
return $output;
}

function test2_form_perm() {
return array('access content', 'access test2_form', 'administer test2_form');
}

function test2_form_menu() {
$items = array();
$items[] = array(
'path' => 'test2_form',
'title' => t('test2_form insert'),
'callback' => 'test2_form_exe',
'access' => user_access('access test2_form'),
'type' => MENU_NORMAL_ITEM );
return $items;
}

function test2_form_exe() {
$output .= test2_form_form();
print theme('page', $output);
}

function test2_form_form(&$value = NULL)
{
$form['#method'] = 'post';
$form['#action'] = 'test2_form';
$form['name'] = array(
'#type' => 'textfield',
'#title' => t('Is Only a test2_form_form'),
'#size' => 50,
'#maxlength' => 50,
'#required' => TRUE,
'#value' => $value['name'],
);
$form['submit'] = array('#type' => 'submit', '#value' => t('confirm'));
$output = drupal_get_form('test_form', $form);
return $output;
}

function test_form_validate($form_id, $form_values) {

Adding a new item to node menu

Hello!

I want to add a new item to the node menu (the edit/view tabs under the node title). I have constructed the following menu item, but it doesn't show up.

$items[] = array(
	"path" => "node/{$nid}/mymodule", //$nid was determined before 
	"title" => "My module action", 
	"callback" => "mymodule_additional_node_info",
	"type" => MENU_LOCAL_TASK,
	"access" => true //Just to make sure it really shows up
);

What am I doing wrong?

Html content on module landing page

I am using article module and I would like to add some content to mysite.com/article before showing all the articles. Where should I add html? please help.
Thanks in advance.
Kind regards
Onesimpleman

Newb needs help creating a basic node

I am new to the Drupal way of doing things and I've looked through a lot of docs pertaining to modules (and worked through a couple tutorials) but I'm still confused. Basically my main concern right now is that I can set up a node module (no block needed right now) and set up the settings function so that an admin user can change certain settings in the control panel. I don't really need all the advanced function hooks, just the basics plus the settings hook. What function hook do you use if you don't set up the module as a block?

Pages

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