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

nodeapi hook with drupal 4.7

switch($op){
	case 'prepare':
	
		$node->content['annotation_form'] = array(
		'#value' => t('this is a testing form, why isnt this working???'),
		'#weight' => 10
		);
		break;
	}

is there any reason for this code to fail?

i know that this works well with drupal 5.x but not in my drupal 4.7 so there should be a reason for this to not to work?

can any one help me please.

--
Praveen Gunasekara

Cant Download Module

I need This two mods but it says files not found plz Help ..or suggest a alternate mod for this...

[1]: http://drupal.org/project/tinymce
[2]: http://drupal.org/project/imce

Waiting for Your reply..

Simplenews: <label for="

I'm using the Simplenews module.

In order to be WCAG AA-Compliant my website has to have all the explicitly set.
I am trying to modify it, but the simplenews.module does not have ids specified for the radio buttons. I've also checked the form.inc, but I couldn't find a solution.

Could anybody please explain me how to add IDs on the radio buttons for the subscribe and unsubscribe options? And how should I call them from the form.inc file?

Thank you!

Problem with the Advertisement Modul

Hello,
sorry my english is not very well. :-)
I have Drupal 5.1 and install the Advertisement Modul. That was all correct.
Then i ad two groups, top and right. Then i add two adds. One in the group top and one in the group right.

Then i place the top block at the top of my site and the right block at the right of my site.

The Problem is, that the ad i place in the top group where also shown at the right site withe the right group. Why is it so? What can i do, that the ads only shown in their group?

Thanks for help.

Admin

Hello,

Can someone tell me how i can check if someone is a admin?

I read in a topic on some websites that i can check is with if($admin) but that dont work.

Ill hope someone know`s =D

Thanks in advanced,

Devius

node_save filling table

Hi,

I have been trying to use node_save() instead of poking around with the database tables as I want to do things the proper 'Drupal' way, however I have hit an annoying problem. I am using node_save() to insert a new CCK node that I have defined, which is does, unfortunately it continues to add entries to the 'node' table until the script is stopped or exhausted.

I have searched here and on the web in general and all I have found this issue which dates back to 2005 http://drupal.org/node/27007 I don't know enough about Drupal's internals to know if this is the problem I am hitting or not?

Below is the code the I am using "mynodetype" is the CCK node I have set up, I have not reached the stage of trying to write to the CCK fields yet I am just setting up the basic node. If $newnode->type is set to an undefined node type the it inserts only once. The CCK node has fields related to other nodes and it uses Automatic Nodetitles.


$newnode = new stdClass();
$newnode->nid = '';
$newnode->vid = '';
$newnode->title = 'Test';
$newnode->body = 'Test';
$newnode->uid = $user->uid;
$newnode->teaser = '';
$newnode->type = 'mynodetype';
$newnode->status = 1;
$newnode->comment = 2;
$newnode->promote = 0;
$newnode->moderate = 0;
$newnode->sticky = 0;
node_object_prepare($newnode);
node_validate($newnode, $error);

Pages

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