diff -ru votingapi/views/votingapi.views.inc votingapi.diff/views/votingapi.views.inc --- votingapi/views/votingapi.views.inc 2008-12-04 19:34:39.000000000 +0100 +++ votingapi.diff/views/votingapi.views.inc 2009-01-04 20:45:34.000000000 +0100 @@ -337,6 +337,27 @@ 'pseudo_vote' => 'votingapi_vote', 'pseudo_cache' => 'votingapi_cache', ), + array( + // This text is used to construct the field desc. "Votes cast by users + // on [foo]", where [foo] is the value of the description key. + 'description' => t('comments'), + // This should contain the value that your module stores in the voting + // api 'content_type' column. 'node', 'comment', etc. + 'content_type' => 'comment', + // This should contain the name of the Views base table that stores the + // data your votes apply to. + 'base_table' => 'comments', + // This should contain the name of the views field that corresponds to + // the value your module stored in the voting api 'content_id' column. + 'content_id_column' => 'cid', + // VotingAPI constructs pseudo-tables so that multiple relationships can + // point to the same base table (normal and translation-based votes nodes + // for example. These two columns allow you to override the names of the + // pseudo-tables. This default entry for node votes ensures that older + // views built against the standard relationships don't break. + 'pseudo_vote' => 'votingapi_vote', + 'pseudo_cache' => 'votingapi_cache', + ), ); foreach ($default_relationships as $key => $data) { diff -ru votingapi/votingapi.admin.inc votingapi.diff/votingapi.admin.inc --- votingapi/votingapi.admin.inc 2008-10-01 17:47:46.000000000 +0200 +++ votingapi.diff/votingapi.admin.inc 2009-01-14 21:51:35.000000000 +0100 @@ -32,6 +32,12 @@ ), ); + $form['votingapi_nolog_regip'] = array( + '#title' => t('Disable logging of IP-addresses of registered users'), + '#type' => 'checkbox', + '#default_value' => variable_get('votingapi_nolog_regip', TRUE), + ); + return system_settings_form($form); } diff -ru votingapi/votingapi.module votingapi.diff/votingapi.module --- votingapi/votingapi.module 2008-10-09 23:12:35.000000000 +0200 +++ votingapi.diff/votingapi.module 2009-01-14 22:03:51.000000000 +0100 @@ -475,6 +475,9 @@ 'prepped' => TRUE ); } + if (variable_get('votingapi_nolog_regip', TRUE)) { + $vote['vote_source'] = '127.0.0.1'; + } }