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

POST elements not working properly? Or is it me...?

Hey all

I'm writing a VERY useful module (for me anyway!) And so I'd appreciate some help with my problems so I can get it finisheed asap (and concentrate more on finishing my main module contribution).

Anyways... My function is this (obviously unfinished!):

function tablemanager_add() {
if (isset($_POST['submit'])){
$count = $_POST['edit']['cols'];
$name = $_POST['edit']['item1'];
$output = "hello " . $name . " bugger don't work" . $count;
print theme('page', $output);
return;
}
$tid = variable_get('tablemanager_table', '1');
$count = 0;
$fetch = db_fetch_object(db_query("SELECT * FROM {tablemanager} tm WHERE tm.tid = '$tid'"));
foreach ((unserialize($fetch->header)) as $a) {
$count++;
$output .= form_textfield($a, 'item' . $count, '', 60, 255, t("Enter your data for '$a' here"), NULL, FALSE);
}
$output .= form_hidden('cols', $count);
$output .= form(form_submit(t('Submit'), 'submit'));
$output .= l(t('Cancel'), 'admin/tablemanager');
print theme ('page', $output);
}

What I can't work out is why none of my elements are being returned? Now bear in mind that I'm NOT a programmer, I'm just tacking this all together as best I can so maybe I'm assuming that I can do things in php which are not actually possible? I'm wondering whether my passing an incrementing variable to the 'name' is invalid? When I view the source on the created page it does seem to work though? It's only after clicking submit that I can't retrieve any of the POST variables. I can't understand why this doesn't work, I've done similiar in other projects before - I think I must just be doing something stupid.

Generalized approach to event management and event newsletter

Hi all,
I'm focusing on event managment because I'm setting up a site that will advertise events.
In the previous versions of event.module the structure of the module was fixed, and so it was simple to create a newsletter that will print out the title, teaser, date and location informations.
With the new version, event is more and more flexible, so any flexinode-type node can become an event.
This is REALLY powerful, so I can create several flexinode-based node types (with different informations, based on the type of event you need).

Now, the problem.

Suppose I have different event types (everyone with its location and teaser field); how can I write a GENERALIZED newsletter module that will recognize that in 'flexinode-1' based events (suppose a stage), location field is named 'flexinode_15' and teaser field is named 'flexinode_16' while in 'flexinode-2' based events (let's say a concert) location field is named 'flexinode_24' and teaser field is named 'flexinode_23' ??

I wouldn't like to write everytime a specific module that everytime must be tailored in order to print out the right fields, and I'm thinking of a universal solution.

The only simple way I found would be to put location informations and the teaser into event table, so that data structure would become fixed, and every other module could benefit of it.

What is your opinion on this matter ?? Does it sound interesting ?? Is anyother working or thinking of something similar ???

How to use form_select dynamically?

Hey all

Just for the sake of neatness I want to insert a dropdown box into my code that calls a function dynamically when it's altered. I know it's possible because I've seen an example of it elsewhere (I'm just having a stupid amount of trouble working out how to adapt it for my own purposes).

Mozile XPI Extension as content editor for Drupal?

Has anyone integrated Mozile, the inline HTML editor that is part of Mozilla, into Drupal?

I really like the way that editing is done straight on a page, rather than in a form or some other text-entry box. It just seems cleaner to me.

I realize that Mozile may lack some of the features of other editors, but using the 'live' page for editing seems like a really good idea.

I figured out I could make a Drupal page editable via Mozile by putting the Mozile-specific CSS code in style.css:

What am I looking for?

I don't know which module I have to install. Currently I have sitemap installed but it's not what I want. What I want is a link on the navagation that says Content. You click on the link and it lists the types of content (not pages, stories etc, but Music Reviews, Rants, News & Information etc) and how many articles are in that category. This is all on the main area, not the navagation drop down btw. Then when I make a selection I want it to take me to a list of all stories/posts in that category so I can organize them the way I want.

What am I looking for? Thanks!

Has ayone created a link indexing/directory module?

Has a link indexing/directory module like hotscripts.com or jspin.com been created yet or is anyone working on one?

Pages

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