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

Courios about categorizing blog entries

Is there any way the user could categorise their blog enries into diffrent sections.

User account:
-view recent blog entries
- Category #2
-blog entry
-blog entry
- Category #1
-blog entry
-blog entry

And is it possible to change the name Blog to Journal? Or is there some other module that could do the all this.

Rewriting PM module: Anyone familiar with function form_select?

I'm rewriting a portion of the PM module. One change is to add a MEMBERS drop down list to the existing CONTACTS list on the "Write a new message" page.

The existing PM module uses form_ functions from common.inc for everything but the drop down lists, and I'm wondering if the working code I wrote for a MEMBERS list can be translated into a form_select function.

Here's the working code, with the XXonChangeXX XXed-out to get through the "suspicious code" filter on the Drupal forum:

  $form .= '<select id="edit-quick" name="quick2" XXonChangeXX="document.getElementById(\'edit-recipient\').value=quick2.value"><option value="" selected="selected">--'.t("Members").'--</option>';
  $result = db_query("SELECT name AS name from users ORDER BY name", $user->uid);
  while ($name = db_fetch_object($result)) 
  {
    $name = check_plain($name->name);
    $form .= "<option value='$name'>$name</option>";
  }
  $form .= '</select>';

Here's the function from common.inc:

function form_select($title, $name, $value, $options, $description = NULL, $extra = 0, $multiple = FALSE, $required = FALSE) 

I think I can figure out most of the parameters, but I don't understand how to fill the list from $result, or how to do the OnChange code.

If my modifications are of value, I'd be glad to contribute this to the project. Suggestions appreciated.

Taxonomy and Breadcrumb Trail - need a little help :)

When I view a node, my breadcrumb trail is not reflecting the correct path of the page (as I have defined it in the taxonomy heirarchy)... but when I view the term in taxonomy the breadcrumb appears to be working fine.

Any idea how I can get my nodes to display the same types of breadcrumbs that my taxonomy pages are displaying?

access custom fields from profile module

I'm developing a module and I want my module to access one of the custom fileds that I have created using the profile module.

Can someone proint me in the direction of how to do this? I haven't been able to find any examples.

Thanks.

Eric

menu clip & shift

Hello board - I've accomplished a ton w/Drupal, without ever needing to ask a question on the forum - which is good - it's a great system.

So I have a module idea, maybe. I'd like to sound it out and get some feedback. As I mentioned, I'm new to Drupal - so I may be missing a feature, or a precedent that will make all this moot.

The problem: I don't want to use the theme-based main navigation because I want the breadcrumbs etc. I want to use the menu system (it's cool). However - I don't want the menu restricted to one tree structure in a single block. For example, I'd like to have a top horizontal nav that only shows one level of the heirarchy (no expanding menus). The next level of the heirarchy should appear in a different area - a block on the left side (already using flexiblock to position blocks). In some cases I'd like to 'shift down' the heirarchy - so that for some categories - the second-level of the menu shows on the top horizontal nav, and the tree on the left represents the 3rd, 4th, ... levels below that. (Let me know if my goal needs more clarification)

Solution?: Based on stuff like the menu_tree() documentation I'm sure I can write a function to "clip" a menu - just show one level no matter where it appears.

The "shift" idea is still a little hazy though.

Trying to imagine it as a module, I suppose there would be a "menu clip" block. The settings for a block of that kind would include:

Forms API: markup fields in collapsible fieldsets

Is it intended that when you place a markup field inside a collapsible fieldset that the markup is displayed even when the fieldset is collapsed?

If so, how would I place some markup inside the fieldset so that it is only shown when the fieldset is visible?

...Richard.

Pages

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