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

Problem with hof.module

I'm using Drupal 4.6 and uploaded hof folder under the modules folder.
But now my site gives "page cannot be displayed" error when I try to open the admin/modules page. All other admin pages are normal.
When I delete the hof module, then admin/module page works properly.

Conference management module?

Hello there, I'm new to all this -- is there a conference management module (some people call it events management) ie conf. program, registrations, financials etc?

Larry

Weighted Tag Clouds (as seen on Flickr and Technocrati) to Drupal!

Either you like them or you don't, but they leave no one untouched. Of course I'm talkin about Weighted Tag Clouds, seen on Flickr, Technorati and del.icio.us among others.

So here it is, Drupal Weighted Tag Clouds Module!

Sidenote 1: Actually this is my first module ever built, and I'm not really a programmer (copy 'n' paste you know...), so please feel free to improve and comment on the code.
Sidenote 2: This doesn't have to be a module, just pull out the php-code and replace the variables and you can include it on any page you wan't.
Sidenote 3: Also feel free to include this in an existing module, I'd be glad.

<?php

/**
 * Implementation of hook_menu().
 */
function term_popular_menu($may_cache) {
  $items = array();

  if ($may_cache) {
    $items[] = array('path' => 'admin/settings/term_popular', 'title' => t('popular terms'),
      'callback' => 'term_popular_admin',
      'access' => user_access('administer site configuration'),
      'type' => MENU_NORMAL_ITEM);

    $items[] = array('path' => 'term_popular', 'title' => t('popular terms'),
      'callback' => 'term_popular_page',
      'access' => user_access('access content'),
      'type' => MENU_CALLBACK);
  }

  return $items;
}


/**
 * Menu callback; present settings.
 */
function term_popular_admin() {
  system_settings_save();

  foreach (taxonomy_get_vocabularies() as $vocabulary) {
    $vocabulary_fields[$vocabulary->vid] = $vocabulary->name;
  }

  $output = form_textfield(t('Maximum number of terms'), 'max_terms', variable_get('max_terms', 200), 4, 5, t('Maximum number of terms to show on the page.'));
  $output .= form_select(t('Vocabularies to include'), 'vocabulary_fields', variable_get('vocabulary_fields', $vocabulary_fields), $vocabulary_fields, t('Select which vocabularies to be included on the page.'), 0, 1);

  print theme('page', system_settings_form($output));
}


/**
 * Return a list of popular terms in HTML.
 */
function term_popular_list() {

  $vocabulary_fields =  variable_get("vocabulary_fields", $vocabulary_fields);
  $max = variable_get('max_terms', 200);

  if ($vocabulary_fields != NULL  && $max != NULL) {
    implode(', ', $vocabulary_fields);

    $result = db_query('SELECT * FROM {term_data} WHERE vid IN (%s)', implode(', ', $vocabulary_fields));

    while ($term = db_fetch_object($result)) {
        $term_names[$term->tid] = $term->name;
        $popularity[$term->tid] = taxonomy_term_count_nodes($term->tid) ;
    }

    arsort($popularity);
    $popularity_temp = $popularity;
    $most_popular = (array_shift($popularity_temp));
    natcasesort($term_names);
    $i = 1;

    while (list($key, $val) = each($term_names) and $i <= $max) {
      if ($popularity[$key] > 0) {
        $output .= '<span style="font-size: '. round(($popularity[$key] / $most_popular * 30) + 8) . 'px">' . l( $val, 'taxonomy/term/'. $key) . '</span>' . "\n";
        $i++;
      }
    }

    return $output;
  }
}

/**
 * Theme Popular Terms page
 */
function term_popular_page($rids = null) {
  $output  = '<div class="term_popular">';
  $output .= term_popular_list();
  $output .= '</div>';
  print theme("page", $output);
}

?>

This line is where the magic happens:

$output .= '<span style="font-size: '. round(($popularity[$key] / $most_popular * 30) + 8) . 'px">' . l( $val, 'taxonomy/term/'. $key) . '</span>' . "\n";

I'm not shure if the "math" used here is the best, go play with it! Yuo could of course also use em instead of px.

problem to open http://drupaldocs.org/api/head/file/contributions/ docs/developer/examples/node_example.module

Sorry for my english.
I can't open http://drupaldocs.org/api/head/file/contributions/docs/developer/example... page, I can only see this page:
Fatal error: Can't open file: 'sessions.MYI'. (errno: 145) query: SELECT u.*, s.* FROM users u INNER JOIN sessions s ON u.uid = s.uid WHERE s.sid = '8a5893b83cf981526b8ac3f671be4775' AND u.status < 3 LIMIT 0, 1 in /home/www/drupaldocs.org/includes/database.mysql.inc on line 125.
what is the problem?

Module Idea / Question

Forgive me if this has been addressed before. First of all, I am not a coder & my overall skills w/ drupal are fairly basic, but improving every day.

Would it be possible (or how hard would it be) to create a module that would serve the purpose of displaying / showcasing items from the site staff & that submitted by users?

Interest match module - how about this?

I'm in the process of creating an interest match module. It currently allows administrators to configure subjects the user may rate their interest in, and allows users to search for similar users by calculating the total difference between users ratings and order by that value (current source: http://www.mypastebin.com/?code=1880021952). I would like to get some response on a good implementation of this. A was thinking about a couple of things.

This is in some respects similar to the profile module and how it is used for instance on drupal.org, but I think it sufficiently different in nature to require it's own module. However, integration could be fine by integrating it into a user category through the user hook. Not sure where that'll place the search though. Making a search for other fields of the profile.module would be problematic.

I was also thinking it could be nice to integrate it into the taxonomy system, which would make it quite different. The admin could connect the module to one or more categories. Interest subjects would be tied to categories. This would allow users to rate their interest in different categories as they browse the site or at a central page. It would also allow for instance a category sensitive block showing users interested in the current category, which could also be useful for administrators by being kind of a survey of site interest. It would be more like a category rating system, closely tied to users. This approach would also allow users to show a page with entries (nodes) of interest, which perhaps moves away a matchmaking type module.

Pages

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