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

How do I make multiple submit buttons in the same form do different things (4.7)?

I want to have ~6 buttons in the same form, each w/ different operation. When user clicks "save" I want the function [form name]_submit() to save. When he clicks "run" I want it to save then go to another piece of code. Trouble is, I cannot get my function [form name]_submit() to pick up the value of the button that was clicked.

comment replacement module... A bit confusing.

Hi there. I'm currently working a bit on a project where we would need a more powerful "comments engine" than the standard one provided by drupal. (Much because of that we needed a more powerful forum, and wanted the forum users to be able to comment articles). The idea was trying to implement punBB for this purpose (www.punbb.org). A bit tricky since punbb has has it's own authentication and we don't whant to mess around with that do we? ;) This is not the main issue though. First I tought it would be quite easy, just replacing the original comments module with a punbb powered one. But when I started to look at the comment.module code, I began to feel very confused. No big surprise there, I've started out just yesturday and I'm therefore quite new to how Drupal works. But after reading though some more guides I just felt I needed to ask someone about this, or it would take ages to figure out. ;) I'll just fire away then.

Some of the first questions that spring to my mind:

This comments module, could you look at it as a kind of interface module witch all other modules use for commenting functionallity?

If so, what hooks/functions would I need to implement in a punbb version for it to work with other modules? All of them? Just some "output" function?

Do I even need to owerwrite the comment.module or is there another way of setting the "comment engine" for a module?

Webserver Auth module questions

I downloaded the Webserver Authentication module because it's very similar to the module that I need to write for my own site. It's a simple module, but I can't get it to work and I've hit a brick wall. Nothing works - Drupal doesn't recognize when I'm logged into my other authentication system, let alone create Drupal registrations on the fly. It doesn't even appear that the hook_auth module is being called, but I can't trace through the execution because Drupal doesn't use output buffers so inserting echo statements causes errors.

I have tested my login and authentication functions in a separate test program, so I know that they work. I don't know why my module doesn't work. It's probably something simple, but there is virtually no documentation on authentication modules, and I can't figure it out for myself because I can't trace through execution with echo statements. I need information on these basic questions:

- Which hook functions are called when (and not just from within the Drupal code, but from what user action)? I thought that hook_auth() might be called when the user logged in (that was a wild guess), but I can't get Drupal to call this function no matter what I do.

- Exactly how the returns of each function are used - in what other parts of Drupal. Without knowing this, I don't know what's required. In particular for hook_auth, but also for hook_info. When/how are the hook_info functions used? By what part of Drupal? What might call these, and why?

Google Maps module which works with other modules

Hello,
I would like to see a module where users can insert a map along with other contents in a node.

For example if some one is creating a page content he can add a map to it. Ideally he should only have to type in a place name and country name and a map is created.

Is there a module already available like that available?

I think http://maps.tikiwiki.org/tiki-index.php can do the job but the maps are not good enough as google maps or as descriptive.

Prototype (AJAX) Module

I'm thinking it's time that we catch up with Ruby on Rails in the AJAX/DHTML department. Rails has integrated the Prototype and Scriptaculous libraries into their distribution and there's no reason that Drupal couldn't do the same - either as part of core or as a contrib module.

I'm thinking about building a prototype.module which will essentially be a port of the Prototype functions in Rails. Themes and other modules could call these functions and form fields to access the AJAX functions in these libraries.

I've also looked at Dojo, but right now I'm leaning toward Prototype.

I realize that Drupal has been "rolling its own" AJAX up until now, but the pace has been slow and my feeling is that we've already got our hands full with the PHP functions of Drupal. These AJAX libraries will continue to develop and thrive in parallel and we can continue to benefit from those advances.

Some features I'd love to integrate:
- sortable lists
- in-line editing
- auto-validating form fields
- animated error/info messages

Has anyone else done any work in this direction? Does anyone want to help with this effort?

Got any tips, tricks, ideas, or cautions about this? I'd love to get some feedback before I launch into this project.

Thanks!

-Jeff Robbins

authentication modules

I'm trying to write an authentication module, and I can't find adequate documentation. authentication.php does not give enough explanation. I found one published authentication module that I'm trying to use as an example, but it's almost completely uncommented. Where do I get information about this?

Pages

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