diff -uNr userpoints_contrib.orig/userpoints_retroactive/userpoints_retroactive.module userpoints_contrib/userpoints_retroactive/userpoints_retroactive.module
--- userpoints_contrib.orig/userpoints_retroactive/userpoints_retroactive.module	2007-04-13 07:02:47.000000000 -0700
+++ userpoints_contrib/userpoints_retroactive/userpoints_retroactive.module	2008-03-03 14:34:29.000000000 -0800
@@ -62,6 +62,7 @@
 }
 
 function userpoints_retroactive_initalize() {
+  db_query('DELETE FROM {userpoints}');
   $u_result = db_query('SELECT uid FROM {users} WHERE uid > 0');
   while ($user = db_fetch_object($u_result)) {
     db_query('INSERT INTO {userpoints} (uid, last_update, points, max_points) VALUES (%d, %d, 0, 0)', $user->uid, time());
@@ -69,11 +70,36 @@
 }
 
 function userpoints_retroactive_nodes() {
-	$n_result = db_query("SELECT uid, type, COUNT(uid) AS val FROM {node} WHERE uid > 0 GROUP BY uid, type");
-	while($node = db_fetch_object($n_result)) {
-    $weight = variable_get(USERPOINTS_POST . $node->type, 0);
-		db_query('UPDATE {userpoints} SET points = points + %d WHERE uid = %d', ($node->val * $weight), $node->uid);
-	}
+  // only count published if asked
+  if(variable_get(USERPOINTS_PUBLISH, false)) {
+    // promoted
+    $n_result = db_query("SELECT uid, type, COUNT(uid) AS val FROM {node} WHERE uid > 0 AND status=1 AND promote=1 GROUP BY uid, type");
+    while($node = db_fetch_object($n_result)) {
+      $weight = variable_get(USERPOINTS_POST . $node->type, 0) + variable_get(USERPOINTS_PROMOTE, 0);
+      db_query('UPDATE {userpoints} SET points = points + %d WHERE uid = %d', ($node->val * $weight), $node->uid);
+    }
+    // not promoted
+    $n_result = db_query("SELECT uid, type, COUNT(uid) AS val FROM {node} WHERE uid > 0 AND status=1 AND promote=0 GROUP BY uid, type");
+    while($node = db_fetch_object($n_result)) {
+      $weight = variable_get(USERPOINTS_POST . $node->type, 0);
+      db_query('UPDATE {userpoints} SET points = points + %d WHERE uid = %d', ($node->val * $weight), $node->uid);
+    }
+  // count everything
+  } else {
+     // promoted
+    $n_result = db_query("SELECT uid, type, COUNT(uid) AS val FROM {node} WHERE uid > 0 AND promote=1 GROUP BY uid, type");
+    while($node = db_fetch_object($n_result)) {
+      $weight = variable_get(USERPOINTS_POST . $node->type, 0) + variable_get(USERPOINTS_PROMOTE, 0);
+      db_query('UPDATE {userpoints} SET points = points + %d WHERE uid = %d', ($node->val * $weight), $node->uid);
+    }
+    // not promoted
+    $n_result = db_query("SELECT uid, type, COUNT(uid) AS val FROM {node} WHERE uid > 0 AND promote=0 GROUP BY uid, type");
+    while($node = db_fetch_object($n_result)) {
+      $weight = variable_get(USERPOINTS_POST . $node->type, 0);
+      db_query('UPDATE {userpoints} SET points = points + %d WHERE uid = %d', ($node->val * $weight), $node->uid);
+    }
+   
+  }
 }
 
 function userpoints_retroactive_comments() {
