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

Difference Between Properties and Elements?

I've been writing modules and little hacks for Drupal for a while. I'm playing with data structures, and am confused as to the convention for '#properties' versus 'elements'. I don't seem to be able to find anything useful on the subject, but seemingly people know what the convention is, so here's me asking...

As an example, let's say I have a data structure that holds a title and either a $form style structure, or a callback that returns one. There may also be some other config type info in there. Here's my data structure as it is now:

How to create a new tab in the user profile?

Hi

I've managed to get some information to display on the user's profile page with a heading (like the 'History' bit), but I was wondering if it was possible to get the information to display on a new tab of its own? Is this done in the _user hook?

Many thanks
Dan

problems about bootstrap

Hey, guys ,currently i am developping a site based on drupal, for some reason i have to create file which is separate from drupal. However i want to still use drupal's database function for consistancy. thus i include the bootstrap function.

require_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_DATABASE);
....

this works fine if i put it under the same directory as index.php
however if i put it under a sub folder and change it to

require_once '../includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_DATABASE);
....

i got this error
Warning: include_once(./sites/default/settings.php) [function.include-once]: failed to open stream: No such file or directory in E:\xampp\htdocs\drupal\includes\bootstrap.inc on line 238

Warning: include_once() [function.include]: Failed opening './sites/default/settings.php' for inclusion (include_path='.;E:\xampp\php\pear\') in E:\xampp\htdocs\drupal\includes\bootstrap.inc on line 238

Warning: require_once(./includes/cache.inc) [function.require-once]: failed to open stream: No such file or directory in E:\xampp\htdocs\drupal\includes\bootstrap.inc on line 844

Fatal error: require_once() [function.require]: Failed opening required './includes/cache.inc' (include_path='.;E:\xampp\php\pear\') in E:\xampp\htdocs\drupal\includes\bootstrap.inc on line 844

Multiple Forms in one single page.

Hello!

Since I am new to Drupal world, it's not clear to me - on how to solve this problem:

In one single web page, I want to display 4 forms and 1 submit button for each form. If user enter values for one of the form & clicks on that submit button of that form, I would like the user to redirect to different page, rendering him the results of his submission.

But in drupal, I am not able to assemble several forms in one single page. 'Blocks' seems to be applicable all through out the application & not in a single page.

Any help is much appreciated.

Drop down menu auto population

Hello!

I am new to Drupal. So excuse me, if it is a stupid question.

Using CCK, I added 3 new fields to a 'Forum Topic':

- Continent
- Country
- Tags

When user selects 'Continent' from the drop down menu, based on his selection, we want to automatically populate 'Country' drop down menu. Suppose if user select 'Asia' in the 'Continent' drop down menu, then automatically, we want to populate country field asian country values 'India', 'China', 'Singapore'...

Music Review Site: CCK or Taxonomy?

First, I have to say that I'm loving the Pro Drupal Development book and am learning a ton. I can't wait to put it into practice. I'm sure this question will come into better resolution as I keep reading, but I would sure help some input right now as well.

I'm working on implementing a music review site, the most of which is CD reviews. It makes sense to me to have an Album content type and a Album Review type and fit them together with a node reference, I think. This would help because there are often Albums without reviews and there could be more than one review of an album (although it won't happen often).

Pages

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