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

Newbie: How to modify module behaviour

OK, I'd like to dive into custom coding to make the most of Drupal. There are some modules that do almost what I want to do... So, I'm wondering how to modify their behaviour.

Let's get specific:

If I want to do Y (e.g. add 2 numbers and store the sum in DB), right after a module does X (e.g. child node created), where would my PHP code go?

Should I roll my own module with my new DB table set up in the installation file, and do some kind of hook alter on the other module that is doing X?

Access Denied for module

I've just started developing modules for Drupal and I've come across a problem I can't get around. In my module, I defined one menu item with a callback. This worked great for a while, and now I'm getting the Access Denied method every time I try to access this node.

My menu code is as follows:

Drupalit or vote up/down?

I'm about to begin a site that will have some content that can be voted on. The idea is that when pieces receive enough votes they are promoted to the front page, or a dedicated page.

I've been playing around with most of the modules and just wondered if there is one in particular that folks would recommend.

Drupalit and vote up/down would seem to suit my needs. However, there's also fivestar and jrating.

What tables and fields do I need to populate for importing custom data as a node?

I'm creating a module that imports external documents into Drupal as a node, does anyone know which table(s) I need to write the data to to properly store my documents? Or can you point me to a page on Drupal's site that might detail this process?

news category

Hello all,

Till now I was making projects in Joomla, but now I'm trying to pass to develop projects in Drupal.

And I'm interested if there is such a way to display news categories. Is there something already done or that need to be programmed, or maybe there is such a menu.

thanks for helping !

regards, Hum

Creating form using drupal_render in .inc files!

Hi Guys,

I am using drupal 5.1 acidfree module. I have different albunms that has images and movies. I am giving options to user to select the images from the albums and submit them for printing service. I have also created a link in every album which shows the selected images in a form layout of the current user that he had selected for printing service.

I have created this form in image module successfuly in image_gallery.module file, now this same functionality i want to use in acidfree module, but this time this code is there in class_album.inc file of the acidfree module. This form is being developed but not in the same fashion like in a row every record.
This is the code.

calling this in somewhere in other function like
*****************************

return drupal_get_form('acidfree_album_print_service', $form);

******************************
<?php
function acidfree_album_print_service()
{
global $user;
$type = new stdClass();
$type->message = t('There is no image');
$form = array();
$print_res = db_query("SELECT * FROM {print_service} where uid='$user->uid'");
$total_print_num = db_num_rows($print_res);
if($total_print_num>0)
{
while ($node = db_fetch_object($print_res))
{
$node = node_load($node->nid);
$confirm_nid = db_query("SELECT nid FROM {node} where nid='$node->nid'");

Pages

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