diff -urp similargroups-orig/similargroups.admin.inc similargroups/similargroups.admin.inc
--- similargroups-orig/similargroups.admin.inc	2009-07-02 16:58:17.000000000 +0200
+++ similargroups/similargroups.admin.inc	2009-07-02 14:14:00.000000000 +0200
@@ -1,5 +1,5 @@
 <?php
-// $Id$
+// $Id: similargroups.admin.inc,v 1.1 2009/03/06 17:06:57 danithaca Exp $
 
 /**
  * @file Admin file for the OG Similar Groups module
@@ -7,7 +7,7 @@
 
 function similargroups_settings_form() {
   $form = array();
-  
+
   $form['cron_freq'] = array(
     '#title' => t('Similarity index update frequency'),
     '#type' => 'select',
@@ -20,9 +20,9 @@ function similargroups_settings_form() {
       'daily' => t('Daily'),
       'weekly' => t('Weekly')
     ),
-    '#description' => t('Please specify the frequency to generate similarity index. Indexing actually runs in cron.') 
+    '#description' => t('Please specify the frequency to generate similarity index. Indexing actually runs in cron.')
   );
-  
+
   $form['algorithm'] = array(
     '#title' => t('Choose group similarity algorithm'),
     '#type' => 'radios',
@@ -33,7 +33,7 @@ function similargroups_settings_form() {
     ),
     '#description' => t('Different algorithms are useful in different situations. Please leave it as the default classical algorithm unless you have small number of groups and users.')
   );
-  
+
   $form['display_num'] = array(
     '#title' => t('Number of similar groups/users to display'),
     '#type' => 'select',
@@ -45,14 +45,26 @@ function similargroups_settings_form() {
       10 => '10',
       15 => '15',
     ),
-    '#description' => t('Please specify how many items to show in the similar groups/users list.') 
+    '#description' => t('Please specify how many items to show in the similar groups/users list.')
+  );
+
+  $form['method'] = array(
+  	'#title' 	=> t('Which methods do you want to use?'),
+  	'#type'		=> 'checkboxes',
+  	'#default_value'=>variable_get('similargroups_method',''),
+  	'#options' => array(
+  		'g' => t('Group to Group'),
+  		'u' => t('User to Group'),
+  	),
+  	'#description' => t('Choosing "Group to Group" method will provid a block when you visit a group where similar groups to the given group are displayed. ' .
+  			'Choosing the "User to Group" option will provid the user with a pager where he can see Groups that he might be interested in, based on the users he is in the same group with.'),
   );
-  
+
   $form['submit'] = array(
     '#type' => 'submit',
     '#value' => t('Save configuration'),
   );
-  
+
   return $form;
 }
 
@@ -60,11 +72,13 @@ function similargroups_settings_form_sub
   $cron_freq = $form_state['values']['cron_freq'];
   $display_num = $form_state['values']['display_num'];
   $algorithm = $form_state['values']['algorithm'];
-  
+  $method = $form_state['values']['method'];
+
   variable_set('similargroups_cron_freq', $cron_freq);
   variable_set('similargroups_display_num', $display_num);
   variable_set('similargroups_algorithm', $algorithm);
-  
+  variable_set('similargroups_method', $method);
+
   drupal_set_message(t("The configuration options have been saved."));
   if ($cron_freq == 'immediately') {
     drupal_set_message(t("You have selected to build similarity index immediately. Please run cron mannually, or wait for the next cron cycle."));
Nur in similargroups-orig: similargroups.admin.inc~.
diff -urp similargroups-orig/similargroups.module similargroups/similargroups.module
--- similargroups-orig/similargroups.module	2009-07-02 16:57:40.000000000 +0200
+++ similargroups/similargroups.module	2009-07-02 16:49:58.000000000 +0200
@@ -1,147 +0,0 @@
-<?php
-// $Id$
-
-/**
- * @file This module helps to find similar groups based on shared members.
- */
-
-/**
- * Implementation of hook_help().
- */
-function similargroups_help($path, $args) {
-  $output = '';
-  switch ($path) {
-    case "admin/help#similargroups":
-      $output = '<p>'.  t("This module generates related OG groups based on shared membership, and generates similar users based on shared membership to groups.") .'</p>';
-      break;
-  }
-  return $output;
-}
-
-
-/**
- * Implementation of hook_perm().
- */
-function similargroups_perm() {
-  $perm = array(
-    "administer organic groups",
-  );
-  return $perm;
-}
-
-
-/**
- * Implementation of hook_menu().
- */
-function similargroups_menu() {
-  $items = array(); 
-  $items['admin/og/similargroups'] = array(
-    'title' => 'Similar groups configuration',
-    'description' => 'Configuration and adjusts of similar groups module',
-    'page callback' => 'drupal_get_form',
-    'page arguments' => array('similargroups_settings_form'),
-    'access arguments' => array('administer organic groups'),
-    'file' => 'similargroups.admin.inc',
-   );
-  return $items;
-}
-
-/**
- * Implementation of hook_block()
- */
-function similargroups_block($op='list', $delta=0) {
-  if ($op == 'list') {
-    $block[0]['info'] = t('Similar groups');
-    return $block;
-  }
-  else if ($op == 'view') {
-    if ($delta == 0) {
-      if (arg(0) == 'node' && is_numeric(arg(1))) {
-        $node_id = arg(1);
-        if (db_result(db_query("SELECT nid FROM {og} WHERE nid=%d", $node_id)) != NULL) {
-          $nodes = similargroups_get_similar_groups($node_id);
-          if (!empty($nodes)) {
-            $block['subject'] = t('Similar groups');
-            $block['content'] = theme('item_list', $nodes);
-          }
-        }
-      }
-    }
-    return $block;
-  }
-}
-
-
-/**
- * Implementation of hook_cron()
- */
-function similargroups_cron() {
-  $last_cron = variable_get('similargroups_last_cron', 0);
-  $cron_freq = variable_get('similargroups_cron_freq', 'immediately');
-  
-  $current = time();
-  $run = FALSE; 
-  switch ($cron_freq) {
-    case 'immediately':
-      $run = TRUE;
-      break;
-    case 'hourly':
-      $run = (($current-$last_cron) >= 3600) ? TRUE : FALSE;
-      break;
-    case 'every6hr':
-      $run = (($current-$last_cron) >= 21600) ? TRUE : FALSE;
-      break;
-    case 'every12hr':
-      $run = (($current-$last_cron) >= 43200) ? TRUE : FALSE;
-      break;
-    case 'daily':
-      $run = (($current-$last_cron) >= 86400) ? TRUE : FALSE;
-      break;
-    case 'weekly':
-      $run = (($current-$last_cron) >= 604800) ? TRUE : FALSE;
-      break;
-  }
-  
-  if ($run == TRUE) {
-    _similargroups_run_recommender();
-    variable_set('similargroups_last_cron', $current);
-  }
-}
-
-
-/**
- * In this function, we compute similar groups using Recommender API
- */
-function _similargroups_run_recommender() { 
-  $algorithm = variable_get('similargroups_algorithm', 'classical');
-  if ($algorithm == 'classical') {
-    recommender_similarity_classical('similargroups', '{og_uid}', 'nid', 'uid', 'is_active', array(
-      'missing' => 'zero', 'performance' => 'auto'));
-  }
-  else if ($algorithm == 'coocurrence') {
-    recommender_similarity_coocurrences('similargroups', '{og_uid}', 'nid', 'uid');
-  }
-}
-
-
-/**
- * Get a list of groups that are similar with $node_id
- * Similar groups are defined by the fact that they have similar members
- */
-function similargroups_get_similar_groups($node_id) {
-  $app_id = recommender_get_app_id('similargroups');
-  $display_num = variable_get('similargroups_display_num', 5);
-  
-  $result = db_query_range("SELECT mouse2_id id FROM {recommender_similarity} s
-                            INNER JOIN {og} g ON mouse1_id=g.nid INNER JOIN {node} n
-                            ON g.nid=n.nid WHERE n.status=1 AND og_private=0 AND og_directory=1
-                            AND app_id=%d AND mouse1_id=%d AND mouse2_id<>mouse1_id AND similarity>0
-                            ORDER BY similarity DESC, s.created DESC", $app_id, $node_id, 0, $display_num);
-  
-  $top_list = array();
-  while ($n = db_fetch_array($result)) {
-    $node = node_load($n['id']);
-    $top_list[] = l($node->title, "node/{$node->nid}");
-  }
-  return $top_list;
-}
Nur in similargroups-orig: similargroups.module~.
