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

Need Help with Tables and 4.7 Forms API

Hi guys, I'm trying to update a site I manage to Drupal 4.7-beta4. I've made a few custom modules, one of which implemented a form mixed into a table. The old code looked like this:

$db_hours_query = db_query('...query...', $node_data->nid);
while ($db_hours = db_fetch_array($db_hours_query)) {
  $user_select[$db_hours['row_num']] = $db_hours['uid'];
  $service_hours[$db_hours['row_num']] = $db_hours['service_hours'];
  $fellowship_hours[$db_hours['row_num']] = $db_hours['fellow_hours'];
  $fundraiser_hours[$db_hours['row_num']] = $db_hours['fund_hours'];
  $ritual_req[$db_hours['row_num']] = $db_hours['ritual'];
}

In here a select field is generated, but I'm switching to a textfield with 4.7's autocomplete feature, so it's not really relevant.
<?php
$header = array(t('#'), t('Member'), t('Service Hrs'), t('Fellowship Hrs'), t('Fundraiser Hrs'), t('Ritual Req.'));
$rows = array();
for($i = 1; $i <= $total_slots; $i++) {
$rows[] = array(
'data' => array(
($error[$i] ? theme('image', 'misc/watchdog-error.png', t('error'), t('error')) : t($i)),
form_select('', 'user_select]['.$i, ($user_select[$i] != 'select' ? $user_select[$i] : 'Select a Member'), $user_options),
form_textfield('', 'service_hours]['.$i, (($service_hours[$i] && $user_select[$i] != 'select') ? $service_hours[$i] : ''), 5, 5),
form_textfield('', 'fellowship_hours]['.$i, (($fellowship_hours[$i] && $user_select[$i] != 'select') ? $fellowship_hours[$i] : ''), 5, 5),

Recommendation

Just wondering if someone can recommend a good image galleries module. I've tried gallery2 and the basic album module, but I find that the gallery2 module is too congested to the average user, and the album module isn't very "gallery-ish" (ie you can't browse several pictures in rows and colums on the page - just in list form, as if they were seperate posts).

I'd love something in which photos could be displayed like in gallery2, but with a simple interface. All i want to do is click on an album and view the pictures inside, with a nice layout.

nodeapi $op = 'prepare'

What is the main use of the 'prepare' op in hook_nodeapi? It's not documented , and i was just wondering what is commonly done during that hook, and when it is fired...

hook_user question

Hi everyone (anyone)

I have done my best to solve this issue of adding my own information into the $user object when it is loaded.
I checked the API for hook_user and implemented
what I thought was the correct solution but it didn't work. To ensure that I had done it correctly I made a clean install
of Drupal and built a whole new module based on block_example so that it was clear what I was doing and nothing else could
affect it.

Online Tabletop Gamers Organizer (need help)

Hi there,
I currently run a brand-new drupal powered site at www.scirpg.com

I need some help, I know very little of php programing, but I know enough to have created, alter and refine my site by myself (no help at all, drupal was very easy to install including most modules)

SciRPG is a community that will run Science Fiction tabletop style RPG's members use existing clients like Screenmonkey/OpenRPG or WebRPG, Klooge, GRiP... chat/dice/map clients of all types.

I need the site to be capable of this:
Users can create Campaign groups, The creator of the Campaign is now the "GM" of that Game.
Other users can create "Characters".... as many as they want.

When a User creates a Campaign group, it should allow the Users to submit one of their "Characters" to the group. If the "GM" deems the "Character" fit to play in his game, he then grants the player access to the "Campaign".

The "GM" can then alter the "Character" as the game progresses...
The "GM" can add notes to his "Campaign" as the game progresses.
The "GM" can end the "Campaign" and save it as an archive (for later reference)

A failsafe feature allows the User "Character" to drop out from a Campaign (in case the "GM" abandons the game without Ending the "Campaign" group)

Admin creates "Character" sheets for Users to fill out (as there may be different game Rules for creating a "Character")

So its mainly a system for Organizing groups of Users, and keeping track of the Activity in the Group.

Strange TrackBack issue: The trackback url is not a valid url.

The facts are these:

I've been running without issue the trackback module for several months. I recently did install and have been sort of running the Xinha module. I was able to run both at the same time with no issue for several hours on monday; last night though, when I tried to run a "story" type node it was returned with: The trackback url is not a valid url.. This only happens for the story nodes and not blog, page, or image.

Pages

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