i have 3 problems after doing what it said. maybe in converting i missed something (or maybe its on you .)
ok the first problem was when executing the sql commands i get this error:
Code: Select all
Error
SQL query:
ALTER TABLE phpbb_posts ADD posts_ratings_score TINYINT UNSIGNED NOT NULL ,
ADD posts_ratings_standard_diviation SMALLINT UNSIGNED NOT NULL ,
ADD posts_ratings_shadowed BOOL NOT NULL ,
ADD posts_ratings_penaltized BOOL NOT NULL ,
ADD INDEX ( posts_ratings_voteround_closed, posts_ratings_shadowed ) ;
MySQL said: Documentation
#1072 - Key column 'posts_ratings_voteround_closed' doesn't exist in table
Code: Select all
Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of usort(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in D:\localhost\test\includes\functions_posts_ratings.php on line 248
Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in D:\localhost\test\includes\functions_posts_ratings.php on line 723
Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in D:\localhost\test\includes\functions_posts_ratings.php on line 764
Code: Select all
General Error
SQL ERROR [ mysql4 ]
Field 'standard_diviation' doesn't have a default value [1364]
SQL
INSERT INTO phpbb_posts_ratings_votes (post_id, score, shadow, user_id, time) VALUES (804, 40, 0, '2', 1198863760)
BACKTRACE
FILE: includes/db/mysql.php
LINE: 158
CALL: dbal->sql_error()
FILE: includes/functions_posts_ratings.php
LINE: 581
CALL: dbal_mysql->sql_query()
FILE: posts_ratings.php
LINE: 59
CALL: submit_vote()
Code: Select all
ADD posts_ratings_voteround_closed BOOL NOT NULL,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
and finnally if it helps here are the converted install files i did:
for the templates:
Code: Select all
##############################################################
## MOD Title: Post Rating System
## MOD Author: ..::Frans::.. < [email protected] > (..::Alfatrion::..)
## http://www.infopolitie.nl
## http://forum.infopolitie.nl
## MOD Description: The Posts Ratings System allows your user to rate post.
Features include:
- Posting ratings (Afther a number of days the average rating is calculated and voting is no longer possible)
- Shadow ratings (System determine what users would have voted).
- Karma calculation (User stats)
- Penalty system
- Modpoints for users (For each post user gets points that they need to vote)
## MOD Version: 0.1.0
##
## Installation Level: easy
## Installation Time: 3 minutes
## Files To Edit: 4
## styles/prosilver/template/viewtopic_body.html
## styles/prosilver/template/ucp_main_front.html
## styles/prosilver/template/memberlist_view.html
## styles/prosilver/theme/stylesheet.css
## Included Files: n/a
##############################################################
## For Security Purposes, Please Check: http://startrekguide.com/forum/viewtopic.php?f=40&t=1802 for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, author will not offer support for MODs not offered
## in our MOD-Database, located at: http://startrekguide.com/forum/viewtopic.php?f=40&t=1802
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
styles/prosilver/theme/stylesheet.css
#-----[ FIND ]------------------------------------------
#
@import url("common.css");
@import url("links.css");
@import url("content.css");
@import url("buttons.css");
@import url("cp.css");
@import url("forms.css");
@import url("tweaks.css");
@import url("colours.css");
#-----[AFTER, ADD ]------------------------------------------
#
@import url("posts_ratings.css");
#-----[ OPEN ]------------------------------------------
#
styles/prosilver/template/memberlist_view.html
#-----[ FIND ]------------------------------------------
#
<dt>{L_JOINED}:</dt> <dd>{JOINED}</dd>
<dt>{L_VISITED}:</dt> <dd>{VISITED}</dd>
#-----[AFTER, ADD ]------------------------------------------
#
<!-- IF S_POSTS_RATINGS_KARMA_ENABLED -->
<dt>{L_KARMA}:</td> <dd>{POSTS_RATINGS_KARMA_SCORE}<!-- IF U_USER_ADMIN --> ~ {POSTS_RATINGS_KARMA_O}<!-- ENDIF --></dd>
<!-- ENDIF -->
#-----[ OPEN ]------------------------------------------
#
styles/prosilver/template/ucp_main_front.html
#-----[ FIND ]------------------------------------------
#
<dt>{L_JOINED}:</dt> <dd>{JOINED}</dd>
<dt>{L_VISITED}:</dt> <dd>{LAST_VISIT_YOU}</dd>
#-----[AFTER, ADD ]------------------------------------------
#
<!-- IF S_POSTS_RATINGS_KARMA_ENABLED -->
<dt>{L_KARMA}:</dt> <dd>{POSTS_RATINGS_KARMA_SCORE}</dd>
<!-- ENDIF --><!-- IF S_POSTS_RATINGS_MODPOINTS_ENABLED -->
<dt>{L_MODPOINTS}:</dt> <dd>{POSTS_RATINGS_ODPOINTS}</dd>
<!-- ENDIF -->
#-----[ OPEN ]------------------------------------------
#
styles/prosilver/template/viewtopic_body.html
#-----[ FIND ]------------------------------------------
#
<!-- IF postrow.U_EDIT --><li class="edit-icon"><a href="{postrow.U_EDIT}" title="{L_EDIT_POST}"><span>{L_EDIT_POST}</span></a><
/li><!-- ENDIF -->
<!-- IF postrow.U_DELETE --><li class="delete-icon"><a href="{postrow.U_DELETE}" title="{L_DELETE_POST}"><span>{L_DELETE_POST}</
span></a></li><!-- ENDIF -->
#-----[AFTER, ADD ]------------------------------------------
#
<!-- IF postrow.S_POSTS_RATINGS_ENABLED -->
<li class="{postrow.POSTS_RATINGS_STAR1}"><!-- IF postrow.S_POSTS_RATINGS_VOTABLE --><a href="{postrow.U_POSTS_RATINGS_STAR1}" title="{L_POSTS_RATINGS_STAR1_EXPLAIN}"><!-- ELSE --><a title="{postrow.POSTS_RATINGS_VOTEROUND_CLOSED_SCORE}"><!-- ENDIF --><span>{L_POSTS_RATINGS_STAR1}</span></a></li>
<li class="{postrow.POSTS_RATINGS_STAR2}"><!-- IF postrow.S_POSTS_RATINGS_VOTABLE --><a href="{postrow.U_POSTS_RATINGS_STAR2}" title="{L_POSTS_RATINGS_STAR2_EXPLAIN}"><!-- ELSE --><a title="{postrow.POSTS_RATINGS_VOTEROUND_CLOSED_SCORE}"><!-- ENDIF --><span>{L_POSTS_RATINGS_STAR2}</span></a></li>
<li class="{postrow.POSTS_RATINGS_STAR3}"><!-- IF postrow.S_POSTS_RATINGS_VOTABLE --><a href="{postrow.U_POSTS_RATINGS_STAR3}" title="{L_POSTS_RATINGS_STAR3_EXPLAIN}"><!-- ELSE --><a title="{postrow.POSTS_RATINGS_VOTEROUND_CLOSED_SCORE}"><!-- ENDIF --><span>{L_POSTS_RATINGS_STAR3}</span></a></li>
<li class="{postrow.POSTS_RATINGS_STAR4}"><!-- IF postrow.S_POSTS_RATINGS_VOTABLE --><a href="{postrow.U_POSTS_RATINGS_STAR4}" title="{L_POSTS_RATINGS_STAR4_EXPLAIN}"><!-- ELSE --><a title="{postrow.POSTS_RATINGS_VOTEROUND_CLOSED_SCORE}"><!-- ENDIF --><span>{L_POSTS_RATINGS_STAR4}</span></a></li>
<li class="{postrow.POSTS_RATINGS_STAR5}"><!-- IF postrow.S_POSTS_RATINGS_VOTABLE --><a href="{postrow.U_POSTS_RATINGS_STAR5}" title="{L_POSTS_RATINGS_STAR5_EXPLAIN}"><!-- ELSE --><a title="{postrow.POSTS_RATINGS_VOTEROUND_CLOSED_SCORE}"><!-- ENDIF --><span>{L_POSTS_RATINGS_STAR5}</span></a></li>
<!-- ENDIF -->
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Code: Select all
##############################################################
## MOD Title: Post Rating System
## MOD Author: ..::Frans::.. < [email protected] > (..::Alfatrion::..)
## http://www.infopolitie.nl
## http://forum.infopolitie.nl
## MOD Description: The Posts Ratings System allows your user to rate post.
Features include:
- Posting ratings (Afther a number of days the average rating is calculated and voting is no longer possible)
- Shadow ratings (System determine what users would have voted).
- Karma calculation (User stats)
- Penalty system
- Modpoints for users (For each post user gets points that they need to vote)
## MOD Version: 0.1.0
##
## Installation Level: easy
## Installation Time: 3 minutes
## Files To Edit: 4
## includes/constants.php
## posting.php
## viewtopic.php
## cron.php
## Included Files: 9
adm/style/acp_posts_ratings.html
includes/acp/acp_posts_ratings.php
includes/acp/info/acp_posts_ratings.php
includes/functions_posts_ratings.php
language/en/mods/info_acp_posts_ratings.php
language/en/mods/posts_ratings.php
posts_ratings.php
styles/prosilver/template/posts_ratings_body.html
styles/prosilver/theme/posts_ratings.css
#
##############################################################
## For Security Purposes, Please Check: http://startrekguide.com/forum/viewtopic.php?f=40&t=1802 for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, author will not offer support for MODs not offered
## in our MOD-Database, located at: http://startrekguide.com/forum/viewtopic.php?f=40&t=1802
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ COPY ]------------------------------------------
#
adm/style/acp_posts_ratings.html
includes/acp/acp_posts_ratings.php
includes/acp/info/acp_posts_ratings.php
includes/functions_posts_ratings.php
language/en/mods/info_acp_posts_ratings.php
language/en/mods/posts_ratings.php
posts_ratings.php
styles/prosilver/template/posts_ratings_body.html
styles/prosilver/theme/posts_ratings.css
#-----[ SQL ]------------------------------------------
#
INSERT INTO `phpbb_styles_imageset_data` ( `image_id` , `image_name` , `image_filename` , `image_lang` , `image_height` , `image_width` , `imageset_id` )
VALUES
(NULL , 'posts_ratings_star_v_0', 'posts_ratings_star_v_00.gif', '', '20', '17', '1'),
(NULL , 'posts_ratings_star_v_1', 'posts_ratings_star_v_01.gif', '', '20', '17', '1'),
(NULL , 'posts_ratings_star_v_2', 'posts_ratings_star_v_02.gif', '', '20', '17', '1'),
(NULL , 'posts_ratings_star_v_3', 'posts_ratings_star_v_03.gif', '', '20', '17', '1'),
(NULL , 'posts_ratings_star_v_4', 'posts_ratings_star_v_04.gif', '', '20', '17', '1'),
(NULL , 'posts_ratings_star_v_5', 'posts_ratings_star_v_05.gif', '', '20', '17', '1'),
(NULL , 'posts_ratings_star_v_6', 'posts_ratings_star_v_06.gif', '', '20', '17', '1'),
(NULL , 'posts_ratings_star_v_7', 'posts_ratings_star_v_07.gif', '', '20', '17', '1'),
(NULL , 'posts_ratings_star_v_8', 'posts_ratings_star_v_08.gif', '', '20', '17', '1'),
(NULL , 'posts_ratings_star_v_9', 'posts_ratings_star_v_09.gif', '', '20', '17', '1'),
(NULL , 'posts_ratings_star_v_10', 'posts_ratings_star_v_10.gif', '', '20', '17', '1'),
(NULL , 'posts_ratings_star_uv_0', 'posts_ratings_star_uv_00.gif', '', '20', '17', '1'),
(NULL , 'posts_ratings_star_uv_1', 'posts_ratings_star_uv_01.gif', '', '20', '17', '1'),
(NULL , 'posts_ratings_star_uv_2', 'posts_ratings_star_uv_02.gif', '', '20', '17', '1'),
(NULL , 'posts_ratings_star_uv_3', 'posts_ratings_star_uv_03.gif', '', '20', '17', '1'),
(NULL , 'posts_ratings_star_uv_4', 'posts_ratings_star_uv_04.gif', '', '20', '17', '1'),
(NULL , 'posts_ratings_star_uv_5', 'posts_ratings_star_uv_05.gif', '', '20', '17', '1'),
(NULL , 'posts_ratings_star_uv_6', 'posts_ratings_star_uv_06.gif', '', '20', '17', '1'),
(NULL , 'posts_ratings_star_uv_7', 'posts_ratings_star_uv_07.gif', '', '20', '17', '1'),
(NULL , 'posts_ratings_star_uv_8', 'posts_ratings_star_uv_08.gif', '', '20', '17', '1'),
(NULL , 'posts_ratings_star_uv_9', 'posts_ratings_star_uv_09.gif', '', '20', '17', '1'),
(NULL , 'posts_ratings_star_uv_10', 'posts_ratings_star_uv_10.gif', '', '20', '17', '1');
CREATE TABLE phpbb_posts_ratings_votes (
user_id MEDIUMINT UNSIGNED NOT NULL,
post_id MEDIUMINT UNSIGNED NOT NULL,
score TINYINT UNSIGNED NOT NULL DEFAULT '30',
standard_diviation SMALLINT UNSIGNED NOT NULL,
shadow BOOL NOT NULL DEFAULT '0',
time INT UNSIGNED NOT NULL,
PRIMARY KEY (user_id, post_id),
INDEX (post_id)
) TYPE = MYISAM CHARACTER SET utf8 COLLATE utf8_bin;
CREATE TABLE phpbb_posts_ratings_votes_chi (
user1_id MEDIUMINT UNSIGNED NOT NULL ,
user2_id MEDIUMINT UNSIGNED NOT NULL ,
time INT UNSIGNED NOT NULL ,
chi TINYINT UNSIGNED NOT NULL ,
diff TINYINT NOT NULL ,
num TINYINT UNSIGNED NOT NULL ,
PRIMARY KEY (user1_id, user2_id),
INDEX (time , num)
) TYPE = MYISAM CHARACTER SET utf8 COLLATE utf8_bin;
CREATE TABLE phpbb_posts_ratings_penalty (
user_id MEDIUMINT UNSIGNED NOT NULL ,
poster_id MEDIUMINT UNSIGNED NOT NULL ,
penalty TINYINT UNSIGNED NOT NULL,
PRIMARY KEY (user_id, poster_id)
) TYPE = MYISAM CHARACTER SET utf8 COLLATE utf8_bin;
CREATE TABLE phpbb_posts_ratings_modpoints (
time INT UNSIGNED NOT NULL ,
user_id MEDIUMINT UNSIGNED NOT NULL ,
points TINYINT UNSIGNED NOT NULL ,
PRIMARY KEY ( time , user_id )
) TYPE = MYISAM CHARACTER SET utf8 COLLATE utf8_bin;
ALTER TABLE phpbb_posts
ADD posts_ratings_score TINYINT UNSIGNED NOT NULL,
ADD posts_ratings_standard_diviation SMALLINT UNSIGNED NOT NULL,
ADD posts_ratings_voteround_closed BOOL NOT NULL,
ADD posts_ratings_shadowed BOOL NOT NULL,
ADD posts_ratings_penaltized BOOL NOT NULL,
ADD INDEX (posts_ratings_voteround_closed, posts_ratings_shadowed);
#-----[ OPEN ]------------------------------------------
#
includes/constants.php
#-----[ FIND ]------------------------------------------
#
// Additional tables
#-----[AFTER, ADD ]------------------------------------------
#
define('POSTS_RATINGS_VOTES_TABLE', $table_prefix . 'posts_ratings_votes');
define('POSTS_RATINGS_VOTES_CHI_TABLE', $table_prefix . 'posts_ratings_votes_chi');
define('POSTS_RATINGS_PENALTY_TABLE', $table_prefix . 'posts_ratings_penalty');
define('POSTS_RATINGS_MODPOINTS_TABLE', $table_prefix . 'posts_ratings_modpoints');
#-----[ OPEN ]------------------------------------------
#
posting.php
#-----[ FIND ]------------------------------------------
#
/**
* @ignore
*/
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
include($phpbb_root_path . 'includes/message_parser.' . $phpEx);
#-----[AFTER, ADD ]------------------------------------------
#
// POSTS_RATINGS
include($phpbb_root_path . 'includes/functions_posts_ratings.' . $phpEx);
#-----[ FIND ]------------------------------------------
#
$redirect_url = submit_post($mode, $post_data['post_subject'], $post_data['username'], $post_data['topic_type'], $poll, $data, $update_message);
#-----[BEFORE, ADD ]------------------------------------------
#
// POSTS_RATINGS
posts_ratings_new_posts($mode);
#-----[ FIND ]------------------------------------------
#
$next_post_id = delete_post($forum_id, $topic_id, $post_id, $data);
#-----[BEFORE, ADD ]------------------------------------------
#
// POSTS_RATINGS
posts_ratings_delete_post($post_id, $data);
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#-----[ FIND ]------------------------------------------
#
/**
* @ignore
*/
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
include($phpbb_root_path . 'includes/bbcode.' . $phpEx);
#-----[AFTER, ADD ]------------------------------------------
#
// POSTS_RATINGS
include($phpbb_root_path . 'includes/functions_posts_ratings.' . $phpEx);
#-----[ FIND ]------------------------------------------
#
// Output the posts
$first_unread = $post_unread = false;
#-----[BEFORE, ADD ]------------------------------------------
#
// POSTS_RATINGS
$user->setup('mods/posts_ratings');
$posts_ratings_data =& posts_ratings_fetch_votes($post_list, $rowset);
#-----[ FIND ]------------------------------------------
#
// Dump vars into template
$template->assign_block_vars('postrow', $postrow);
#-----[BEFORE, ADD ]------------------------------------------
#
// POSTS_RATINGS
$postrow = array_merge($postrow, posts_ratings_display_rating($row, $posts_ratings_data, $forum_id));
#-----[ OPEN ]------------------------------------------
#
cron.php
#-----[ FIND ]------------------------------------------
#
define('IN_PHPBB', true);
define('IN_CRON', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
#-----[AFTER, ADD ]------------------------------------------
#
// POSTS_RATINGS
include($phpbb_root_path . 'includes/functions_posts_ratings.' . $phpEx);
#-----[ FIND ]------------------------------------------
#
// Unloading cache and closing db after having done the dirty work.
#-----[BEFORE, ADD ]------------------------------------------
#
// POSTS_RATINGS
posts_ratings_cron();
#-----[ OPEN ]------------------------------------------
#
memberlist.php
#-----[ FIND ]------------------------------------------
#
/**
* @ignore
*/
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
#-----[AFTER, ADD ]------------------------------------------
#
// POSTS_RATINGS
include($phpbb_root_path . 'includes/functions_posts_ratings.' . $phpEx);
#-----[ FIND ]------------------------------------------
#
// a_user admins and founder are able to view inactive users and bots to be able to manage them more easily
// Normal users are able to see at least users having only changed their profile
settings but not yet reactivated.
#-----[BEFORE, ADD ]------------------------------------------
#
// POSTS_RATINGS
$template->assign_vars(posts_ratings_profile($user_id));
#-----[ OPEN ]------------------------------------------
#
ucp.php
#-----[ FIND ]------------------------------------------
#
/**
* @ignore
*/
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
require($phpbb_root_path . 'common.' . $phpEx);
require($phpbb_root_path . 'includes/functions_user.' . $phpEx);
require($phpbb_root_path . 'includes/functions_module.' . $phpEx);
#-----[AFTER, ADD ]------------------------------------------
#
// POSTS_RATINGS
include($phpbb_root_path . 'includes/functions_posts_ratings.' . $phpEx);
#-----[ FIND ]------------------------------------------
#
// Only registered users can go beyond this point
if (!$user->data['is_registered'])
{
if ($user->data['is_bot'])
{
redirect(append_sid("{$phpbb_root_path}index.$phpEx"));
}
login_box('', $user->lang['LOGIN_EXPLAIN_UCP']);
}
#-----[AFTER, ADD ]------------------------------------------
#
// POSTS_RATINGS
$template->assign_vars(posts_ratings_profile($user->data['user_id']));
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Code: Select all
Ignored permillage of votes (on the edges):
Karma configuration
Interval:
Amount of intervals:
Shadow configuration
The chance the shadow vote is correct:
Shadow algorithm intervall:
Minium votes casted per user requirement:
Penalty configuration
Penalty permillage (of votes):
Minimum ammount of votes required:
Examined period:
Percentage when voting is disabled overall:
Percentage when voting is disabled per user:
Modpoints configuration
Amount of modpoints recieved for each new post:
Period the modpoints stay valid:
Base modpoints on karma?:
note: what are the modpoints for