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

Profiles Module

Dear Drupallers,
I would like to disable the users from editing their usernames and other specific fields in the profiles module.
Does anyone have any tips for doing this? I would appreciate any help and thanks in advance.

Abe

Extend hook_onload() to accomodate body class, id, and title attributes, instead of just events.

I am trying to make a body_styles.module that will uses a combination methods to derive and insert id and class attributes into every page's body tag. (see "How to generate body class/id attributes for each page" for more details)

My question is, is there a way for a module to insert code into the body tag?

I keep thinking that hook_onload() is the way to go here, but the problem (as I read it in the api) is...

The returned statements will be automatically separated by semicolons, so including them in the returned array is optional.

This prevents me from being able to use it to insert class/id, title attributes. Or is there a better way than hook_onload() for a module to insert code into the body tag? (This is my first module so I'm new to all the api hooks)

The body tag is very special to css designers. The ability to insert class and id hooks gives us unbelievable control over the look of a site, usually mitigating the need for pounds of additional markup throughout the page. And this onload_hook seems like the logical place to get a foothold.

If there isn't a better way to do this, would it be possible (and would people be amenable) to modify/extend hook_onload() in the core to allow us to insert other attributes like id, class, etc?

Extra calls to menu items

I have a question about what happens if you invoke more than one menu callback in one page generation. Please follow along with underneath example.

A user browses to example.com/user/register. All bootstrap routines are executed. It is here where user_menu() registers user_page() as the appropriate callback for the "user/register"-path. Through user_page(), we are redirected to user_register(). Then, through _user_forms(), user_register invokes all $module_user functions to complete the user registration form:

// fragment of user_menu()
    $items[] = array('path' => 'user/register', 'title' => t('register'),
      'callback' => 'user_page', 'access' => $user->uid == 0 && variable_get('user_register', 1), 'type' => MENU_LOCAL_TASK);

// fragement of user_register
  $extra = _user_forms($edit, $account, $category, 'register');

Lets now say that I have the Captcha module installed.

how to set form name

like this
<from name="testname" .. >
I use drupal cvs

$from['id']=array(....);

I'm tired of the phpBB wars, here's a solution.

I'm currently writing a new module called forumplus... I'm tired of the phpBB war. It will use nodes solely, instead of comments as replies to the Original Post, and allow for more detailed control of the forums themselves, such as usergroup permissions to allow admin-only or VIP forums within the forum, specific moderators for specific forums, and more on suggestion.

Better integration of modules such as profile, quote, user, upload, privatemsg, shoutbox, blog, path (something other forums don't do) and others is planned for it, as well as, once again, anything suggested.

A basic list of operations for this would be as follows.

Create Container (taxonomy)
->Create Forum within Container (taxonomy/term)
--->Create post within Forum (node/add/forumplus, $forumnew->parent == '-1')
--->Reply to existing post within Forum (node/add/forumplus, $forumnew->parent == $node->nid)
->Display Containers and Forums as a list
->Display posts within Forum
->Display Forums within single Container
->Sort posts by most recent post
->Different display for threads with new posts (bold, different colour; all in the CSS)
->Set moderators for specific forums (admin/forumplus/configure/# where # = the fid)
->Optionally display or hide moderators of forums.
->Display most recent post on hook_overview(), as well as poster and time.
->Threads default to flat-view, maybe at a future point the ability to threaded-view them.

Can not modules after adding "events"

I tried to install the events module. I created the tables in the database and added the events folder in the modules folder. When I navigate to "modules" the page does not open. When I delete the folder it opens again. What am I doing wrong?

Pages

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