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

Mark all forums as read

Anything out to help with 'mark all forums read'? thanks.

Using the comment module with Gallery2 in drupal

I'm setting up a community site for a local pub and have run in to a bit of a problem. I've been using Gallery2 and the Gallery2 module for Drupal as the community gallery but I've not found any way of integrating the comment function in Drupal in to the gallery. It is of course an option to use the comment system in Gallery2 but doing this means losing all of the functionality of the Drupal commenting system as well as links to users and avatar images.

Javascript to include nodes in external sites?

I've been playing around with the Advertisement module, and I like how it allows users to cut and paste a bit of javascript into an external website to have their ad (node) displayed there.

I'd like to do something similar with CCK nodes and was wondering if there is a module to do this. I've looked at several others and it sounds like the services module can do it, but I have never worked with Flex before and it seems pretty complex. Plus, I'd like to allow users to be able to paste in a single javascript tag like the ad module offers. I tried hacking around with the Advertisement module to get a CCK node to display, but I can't seem to figure it out.

unrecognized auth response from cvs.drupal.org: cvs: unrecognized option `--allow-root=/cvs/drupal'

Trying to login to cvs and I keep getting the following:

:~ suydam$ export CVSROOT=:pserver:suydam@cvs.drupal.org:/cvs/druptal-contrib
:~ suydam$ cvs loginLogging in to :pserver:suydam@cvs.drupal.org:2401/cvs/druptal-contribCVS password: 
cvs [login aborted]: unrecognized auth response from cvs.drupal.org: cvs: unrecognized option `--allow-root=/cvs/drupal'
:~ suydam$ 

I've contributed to CVS before, using the same setup and .bashrc settings. Did something change on the server side?

Separate Add and Edit Forms

I'm working on a custom node type and I'd like to be able to have the input form be slightly different depending on whether I'm adding a new node or editing an existing one. How might I go about doing that?

how to pass arguments in to the form

I have simple Drupal form, that should colect user imput and return "electricity consumption quote". I created a module and put form in it. (so far so good)

Now I need to cal this form from a block that appears on all pages and pass it couple of arguments, amount and supply number (electricity supplier). I need these two values to populate first two fields in the form. Can I pass this two arguments via url (or some other way). Bellow is example code

/**
* Implementation of hook_menu().
*/
function getquote_menu($may_cache) {
$items = array();
if ($may_cache) {
$items[] = array(
'path' => 'getquote',
'title' => t('Instant quotes'),
'callback' => 'getquote_page',
'access' => TRUE
);
}

return $items;
}

/**
* Called when user goes to example.com/?q=getquote
*/
function getquote_page($quote) {
$output = t('Get an instant quote on-line.');

// Return the HTML generated from the $form data structure.
$output .= drupal_get_form('getquote_nameform');
return $output;
}

/**
* Defines a form.
*/
function getquote_nameform() {
// *********** basic options ************************************
$form['basicinfo'] = array(
'#title' => t('Basic information'),
'#type' => 'fieldset',
'#description' => t('Get a quick quote based on some basic information')
);

Pages

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