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

better menu admin

I have always wondered why the admin->menu function is so functionaly limited. I think i sort of hoped it might be fixed in Drupal 5; but took a quick look and i dont see much of any change in Drupal 5 (for anything :().

So, is it perhaps just that i am the only one that would find this useful?

What i am refering to is when you EDIT a MENU in 4.7 and 5.0 i get the ability to change the name of the menu.. THAT'S IT!! wow, pretty darn useful.. ok.. little sarcasm there...

new node type with 0..n relationship to entity

Hi there, I am new to Drupal, so it's not unreasonable that I might look at this completely from the wrong perspective, but here we go:

I need a new content type, users of a certain role should be able to submit "lecturer submissions" for events. The problem is that there are (among other things) 0 to n co-authors for every submitted "lecturer submission" and I am not sure how to implement that.
I used the hook_form to specify the create content->lecturer submission form, now I want to give the user the possibility to add a variable number of co-authors. In a perfect solution, there would be some custom submit button labelled 'add a co-author' and 'remove this co-author'.
I implemented hook_submit, but it seems as if control flow never passes that function when I use a custom submit button. Isnt there a way to add a submit button to a form and provide some callback function to redraw an altered form with an added/removed co-author?

I read the form-api, the better part of the available developer documentation and googled the site:drupal.org but had no luck yet. I also had a look at the existing modules, but those with a similar problem all solved it with comma or semicolon seperated lists of values, which is no option for me as we need about 10 values for every co-author (name_last, name_first, institute/company ..)

In a nutshell: I want the user to be able to specify a 0..n relationship to an entity (in my case co-authors) while creating the node (in hook_form or any other applicable way). The co-authors are no users in the drupal sense, as we cannot expect every co-author to have an account.

Adding to useraccount/profile view menu?

I have the profile module and the guestbook module installed, also the buddylist module is installed. Instead of the link to the guestbook appearing in the profile view, I would like to have a menuitem in the horisontal menu under the username, like between "view" and "track" (if tracker is enabled) or "edit" (if ones own profile).

In the long run I would probably be wanting to expand the buddylist module to have it's own page for listing buddies, instead of them also showing up in the profile view.

Multisite file system - Really need help

I have a multisite setup and have run into a little trouble using:

1) CCK
2) Image Field
3) Imagecache

Because of the multisite setup I have the following as my file system path: /var/www/html/www/example.com/files

When image field inserts an image it gives that full path and that doesn't work at all with imagecache.

Has anyone else had a similar problem? Is there something with the rewrite that I need to adjust?

Best way to capture user visit dates?

I'm planning to write a module that captures the dates that each authenticated user has visited. I'd like to end up with a small two-column table that stores uid and visit date.

Since I don't need data for anonymous users, I'm thinking of gathering data using hook_menu() with some code in an if (!$may_cache) block. Since I'm new, I'm a little worried that I might be missing a more obvious approach.

Is hook_menu the best place to capture the dates a user has visited?

Thanks in advance for sharing your experience.

Custom views - Expose Sorting

I will try to explain clearly my situation with a simple example :

Step 1 : I create a new node called "mobilephone" (no flexinode nor CCK, just inspired from story node).

Step 2 : I create a Table mobilephone [id_mobilephone, nid, runtime, phone_name, phone_brand, rating] (this not as simple but let say that).

Step 3 : I Insert/Update/delete data on this table in the mobilephone.module

Step 4 : I render in the teaser/body , the phone name, the brand etc ... (still in mobilephone.module).

Pages

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