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

Dealing with database errors / getting database version information (drupal 4.7.x)

Hi! I'm writing a module that makes use of views in the database. However, MySQL 4.1 doesn't support views. How can I determine the database type and version (this is also necessary) easily, so that I can modify my module (and .install) to not try and make a view if the database doesn't support it?

Forms API - need multiple instances of arbitrary strings

Okay. I've got a site. The site has a big legacy database of book reviews with a seriously mangled and crufty back-end. I load the data into a database, and set up a little Drupal module to query it and show pretty results. Yay. Now, to work on a little interface to edit/submit book reviews. (The reviews are submitted by email to one of the site's administrators, who then uploads them.) Drupal's form API comes to the rescue. Yayness! I have a mostly-working form in moments.

Problem. Book reviews have book authors. That is authors, plural. An arbitrary number of authors. (In practice, no more than 6). We also have book reviewers (never any more than 2 of those, though). I need to get these authors names' into the database.

So. How does one handle this sort of a setup? It's easy enough to set up a select box with the MULTIPLE attribute -- in fact, I've already done it, for some subject/geographic/time period codes associated with the reviews -- but that's for a mostly fixed set of codes; most reviews have a totally unique author.

I suppose I could create some fixed number of text fields and number them 1 to 6 (and hope we have no more than 6 authors). But I'm hoping for a better way... I have an idea for a terribly ugly little hack using JavaScript and a multiple-select element, but I'm not to happy with that, either.

Current node information in my module's scope.

I am creating a module and having some difficulty getting what to me seems to me general information.

For instance, I need to get information about the current node. I know you can use global $user, but I don't need user information, I need the node id for the current page so I can get taxonomy information for that particular node and do some of my own queries.

Yikes! CSS & TinyMCE Problem

I posted this in the template forum, but it should probably go here. Sorry...

I am having a problem where the dark blue background color from my css is also doubling as the background color for the text box with tinymce!

if i keep the background this dark, the background of the text box becomes the same color and makes it difficult to enter text. What could I be doing wrong? Why won't the text box just say white?

Thank you!

FEED to Story Converter

Is there a moduel where I can import FEED's and automatically have them converted to stories on my drupal installation ? Whats the best way to display full feed contents in my drupal website ?

Problem in using the forms API

Hello ,

Would someone please point me at anything that demonstrates how to create dynamic forms inside tables
using the new forms API . Its not clear to me at the moment how to do this ?

I am thinking that i have to build the forms array first and then build the table in conjunction with the complete forms array .

Can someone help me out ..

Regards Paul

Pages

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