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

Is it possible to use HTML tables in Drupal forms?

I'm developing a module called Discussion Polls. You can see an example of this module at:

http://progressivereader.org/?q=node/75

I'm using HTML tables as part of the Drupal form, but obviously the lines aren't the same style as the rest of the Drupal Theme.

This might be a RTFM situation, but is there a way to get the table to use the Drupal theme line style? Or should I fall back to using HTML div blocks and adding those to the Drupal theme?

Theme Editor Module -- Enabling the Modified Themes

I'm having difficulty with this problem using the theme editor module. I create a new theme based off an old one, but it does not show up in the list of themes to potentially enable. Does anyone have any ideas how to make the modified theme appear so I can enable it.

Any help would be appreciated.

I'm really struggling here...

So far I've written a few modules for my own purposes by the simple expedient of hacking what other people have done (one day I'll write a book called "Plagiarism as a force for progress"!). Now I'm trying to do something starting from scratch, and boy is it not that obvious!!

I have successfully got a little baby module to display a form to a page, like this

Question about auto permissions for Drupal/files/image folder

I am wondering why Drupal is creating folders (temp, tmp, images-- from the image module, etc) inside my files directory that do not allow me to access and browse their contents. I want the permissions to allow this, especially since I am needing to troubleshoot how image_assist is handling (or not handling) images within these directories. Any insight into this phenomenon would be greatly appreciated.

Xstatic Module - It is available?

What is the status of the Xstatic module? Has Keith dropped the issue or is it stuck in the pipeline?

See http://drupal.org/node/15223 for more information on Xstatic

Jim

keen php/mysql eye needed to tweak a code snipped to update a database field if one exists or insert if it doesn't

Hey..

Need help tweaking a bit of code in a module I'm playing with.

What I need to do is

a) check to see if a field exists in a table

b) if one exists...update it with a new setting

c) if the field doesn't exist, insert a new one.

am googled to death searching through help sites for php & mysql and thought I would post up here in case someone would spot it quickly.

the table striucture is as follows and is designed to store a link as the "home page" link of the site...i.e. the next time they log in they are redirected to that page.

table name =  frontlink
column 1 = uid  
column 2= front_url

So the table stores a "front url" for each user and is keyed by the user ID.

below is the function to write the information to the database and table. I'm a novice at this so I pasted an existing "save" function from another module and edited it. (apologies in advance)


function quicklinks_front_save($edit) {
global $user;

$edit['old_front_url'] = urldecode($edit['old_front_url']);
if ($edit['old_front_url'] && db_result(db_query("SELECT COUNT(uid) FROM {frontlink} WHERE uid = %d AND front_url = '%s'", $user->uid, $edit['old_front_url']))) {
db_query("UPDATE {frontlink} SET front_url = '%s' WHERE uid = $user->uid AND front_url = '%s'");
drupal_set_message(t('Your front page has been updated.'));
}
else {

Pages

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