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

Get rid of Login and Register Tabs

I am new to Drupal and I am developing my first module.. It all seems to work OK, other than I get a Login and Register Tab mixed with my module tabs.. I am using a CSS based template.

I have created the permissions and access control elements and they seem to work OK, however, I don't seem to be able to get rid of these unwanted tabs.

Any idea..?

Rethinking Privatemsg

While perusing the bug/feature issues for Privatemsg I realized that it might be time to rethink the way it's done, and perhaps make it more helpful and easier for developers to develop modules around it.

Originally, some ideas were proposed on this thread http://drupal.org/node/50213

RobertDouglass said that a brainstorming thread would be a good idea, and I agree.

Already we have talked about creating a function that modules and php snippets can use to send messages without a form... but there are other discussions to be had.

Should we take the opportunity to change the way messages are stored? Who can edit them? (right now both the sender and the recipient can edit the messages. While this can be useful in some cases it can be confusing in other cases, especially when messages need to behave more like intra-site email)

Also, the idea to store privatemsg as nodes came up in this issue: http://drupal.org/node/49349

Nodes are a bit complicated to store a simple message in, but it's worth looking at. I think that privatemsg maybe should be handled by the server as if it were email, using the same standards. This will probably make it a lot easier to interface with peoples inboxes if they wish. Also, I think doing a mailhandler sort of thing for custom email addresses would be nice too... if you email username@yourdomain.com it gets forwarded to the user as a privatemsg. I'm not sure how this would be possible.

E-Commerce Module - Blank Screen

I have been trying to install the e-commerce module, but without success. Iv'e ran the mysql script and placed the e-commerce directory in the module folder. Now when i login in and go to the module screen, i get a blank white screen. I've even tried taking out folders from the module like the contrib folder, but still just a blank white. Has anyone else run into this problem or have a suggestion? I'm using drupal 4.6 with php 5 on a linux machine. Thank you

Miles

Custom Module Development

I would like to create a custom module that include the following database field type:
* single-line textfield (OK)
* multi-line textfield
* checkbox
* list selection
* freeform list
* URL
* date

How can I modify the example module to include these fields?

Maybe we can create documentation for an advanced example node type!

Thanks, Darly

-------------------

The example module is documentated as follows:

Database definition:

CREATE TABLE node_example ( nid int(10) unsigned NOT NULL default '0', color varchar(255) NOT NULL default '', quantity int(10) unsigned NOT NULL default '0', PRIMARY KEY (nid) )

Implementation of hook_form().

Now it's time to describe the form for collecting the information specific to this node type. This hook requires us to return an array with a sub array containing information for each element in the form.

Code
function node_example_form(&$node) {
$form['title'] = array('#type' => 'textfield', '#title' => t('Title'),
'#size' => 60, '#maxlength' => 128, '#required' => TRUE,
'#default_value' => $node->title);
$form['body'] = array('#type' => 'textarea', '#title' => t('Body'),
'#default_value' => $node->body, '#required' => FALSE );

// Now we define the form elements specific to our node type.
$form['color'] = array('#type' => 'textfield', '#title' => t('Color'),

Working on replacement profile module, tentatively called profileplus.module - ideas wanted!

I've begun work on a replacement for profile.module, which I am tentatively calling profileplus.module

While I considered suggesting at least some of the changes I am making to profile.module itself, I'm concerned that they might add overhead while adding features that many users might not need. And yes, I'm also a little shy about making major changes to core modules, since this will be among my very first Drupal projects.

In a nutshell, I've noticed that a common need for site owners is to be able to add different field types to profile.module easily. Currently, you have to hack the hard-coded field types to do this.

What I wanted was a way to add drop-in extensions (a la Flexinode), that would add new field types to profiles easily.

While working on that project, I realized that it wouldn't be too hard to add a little more functionality - such as field types that don't refer to the built-in profile values field, and which are display-only. Sometimes, you want to have things display in a user's profile, but it doesn't necessarily need to be edited or stored as an actual user variable.

For instance, I wanted an easy way to add lists of "recent nodes by this user" so that they appear in profiles.

Well... I've got that working... but then I decided, it would really be better if some of this stuff appeared in a tabbed interface, so that every displayable profile field thing doesn't appear on the same page. The user/edit pages have a tabbed interface for different sections - I think that profile viewing ought to have the same thing, so that only the necessary information is shown at a time, instead of an enormous page (if you have lots of profile fields).

Secondary Nav and the Drupal Module

I'm really stumped. I know how to make additional Navigation Menus using menu.module and I know how to add Menu Items using hook_menu. But for the life of me I don't see a way to add Menu Items to the additional Navigation Menu from my module.

I thought maybe I was asking too much and a block would work better since that's what menu.module creates for additional menus anyways. But then I need to use menu_tree, which seems really tied to menu ids and such.

Has anyone had the same problem and figured out a way around it?

Ben

Pages

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