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

flatten user profile modifications to one page (no secondary_local_tasks)

Hi Drupalers,

I've got my form setup for modifying a user profile such that all the information that is driven by the profile module is showing up under the default secondary local task. ie: the user does not have to click on the sub links when editing their info...from http://foobar/user/12/edit.

My problem is that I can't seem to get the information back into the database...I've used hook_form_alter on the 'user_edit' form_id to modify the form. I'm able to get all the default_values into each field. I'm then tried using hook_user to simulate the action that takes place when the user hits 'save my settings'

Can anyone provide any help?? Here is my hook_user function. I've added the drupal_set_message function and what is odd is that when I attempt to save my settings the only output I get is "For 12, a load operation was invoked.
For , a categories operation was invoked.
For 12, a load operation was invoked.
For 12, a form operation was invoked.
For , a validate operation was invoked. "

is this expected???


function mymodule_user($type, &$edit, &$user, $category = NULL) {
// print "$type";
drupal_set_message("For $user->uid, a $type operation was invoked.");
switch ($type) {
case 'update':
case 'insert':
printArray($edit);
return profile_save_profile($edit, $user, $category);
break;
case 'validate':

URL field in flexinode Problem, changes http:// to http://http//

I know I found the solution for this problem before, but I can't find the post. But pretty much whenever I submit a URL in the URL field in Flexinode, like this "http://drupal.org/node/" it outputs as "http://http//drupal.org/node/". inserting it "drupal.org/node/" makes the link work. (this flexinode type was not themed)

Trouble with differentiated menus

Hi,

I was wondering if there is anyone who could help me. I want to keep a clear static 1. page, with a menubar on top (that's done already).... When I click on one topic in the menu, i would like a block to appear on the left side and only in this new page, with subtopics... I.e.
menutopic = "contact"
Blocktopics (only on this page) = Contact domestic, Contact international, Contact in outer space etc.

Is this possible, or don't I make any sense ? ;o)

Best regards Thomas

Fatal error: Only variables can be passed by reference in /project.module on line 169

Fatal error: Only variables can be passed by reference in /var/www/html/modules/project/project.module on line 169

anyone made the project module work with php5.0.5 and drupal 4.6.5 ...?

Need assistance sorting table *PLEASE*

I'm developing my own groups module. I've got a mysql table with group members (with a group id column and a member id column), and a group info mysql table with all the information regarding each group. I want to output a table with the name, date created, and number of members for each group. I also want to be able to sort on each of the headings. I got everything working, but I don't like the way the member count works. The problem is that the number of members is updated AFTER it's sorted. Can anybody please suggest a better way?
Here's what I have:
<?php
function group_groups_home()
{
$sql = "SELECT group_info.gid, group_info.title, group_info.nid, group_info.created, group_info.members FROM (group_info)";

$header = array(
array('data' => t('Group Name'), 'field' => 'title', 'width' => '100%'),
array('data' => t('Created'), 'field' => 'created', 'align' => 'center'),
array('data' => t('Members'), 'field' => 'members', 'align' => 'center')
);

$rows = array();

$sql .= tablesort_sql($header);
$result = pager_query($sql, 20);

while ($group = db_fetch_object($result)) {
// I don't like the way this is done, but this is the only way I could figure out how to sort by membercount
$membercount = mysql_num_rows(db_query("SELECT * FROM (group_members) WHERE group_members.gid = '%d'", $group->gid));

is there a 4-field node module I can hack instead of using flexinode

I want to make a content type called "example site" on www.drupalecommerce.com. I want it to have 4 fields like:
url
who made it
what modules it demonstrates
what else it demonstrates: themes, etc.

Pages

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