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

Views and URL

When creating a view of taxonomy terms, I have used the taxonomy terms and vocabulary as the arguments so that if there isn't a specific node, it will list out the vocabulary or terms and the number of nodes underneath them.

This is great, but my problem comes with the url. Currently you only have the "Taxonomy Vocabulary ID" listed as an argument. This produces a url string such as: "Character/2" where I would rather have it produce: "Character/Name"

username variable

What variable is the currently logged in user's username stored in?

sites that link here?

are there any modules, or some other way, to show a list of site that link to yours?

Menu icons

Hello,

I'm modifying the menu.module so that when the user adds a new menu item or edits an existing menu item, then will be able to upload a menu icon; so that the icon will be displayed along side with the text.

However I'm having difficulty uploading the icon.

I've added form elements to the menu_edit_item_form($mid = 0):

  $form['menu_icon_path'] = array(
    '#type' => 'textfield',
    '#title' => t('Path to menu item icon'),
    '#default_value' => t(''),
    '#description' => t('some text')
  );
  
  $form['menu_icon_upload'] = array(
    '#type' => 'file',
    '#title' => t('Upload menu item icon'),
    '#maxlength' => 40,
    '#description' => t("some more text."),
  );

In the function menu_edit_item_save($edit) I added the following check:

  // Check for a new uploaded menu item icon, and use that instead.
  if ($file = file_check_upload($edit['menu_icon_upload'])) {
  ....
  }

However, the above evaluates to false all the time.

When I dump $edit['menu_icon_upload'] all I get is the file name. But not the source directory it is to be picked up from.

Advanced module theming

Hello:

I'm working on a custom module and I understand the basics of theming it via hook_view, the ability to use a node-mymodule.tpl.php file and so on. I'm trying to take it a step further by interacting directly with a theme's existing template files (e.g. page.tpl.php or node.tpl.php) before the node loads. For example:

Hide the node title completely

I've discovered that I can use hook_nodeapi to set this:

Unique titles, specified per content type

This is a quick module I made for patchak, based largely on the code of easytouch, which altered node.module:
http://drupal.org/node/62498#comment-114562

Just put it in the modules directory and enable it. To specifiy which content types should have unique titles, put them in the designated array. If I find some more time, and the question is there, I might create a settings page for this (and probably make it a project).

Pages

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