Ermm yes, just edit the group permissions, e.g. Registered usersParsaAkbari wrote: Also, is it possible to install this mod for evrebody so evreybody can earn points not just certain users.
Ermm yes, just edit the group permissions, e.g. Registered usersParsaAkbari wrote: Also, is it possible to install this mod for evrebody so evreybody can earn points not just certain users.
Code: Select all
<?php
/**
*
* @package points
* @version $Id: user_points_update.php,v 1.0 2007/05/31 15:12:00 Ganon_Master Exp $
* @copyright (c) 2007 Ganon_Master
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
define('IN_PHPBB', true);
$phpbb_root_path = './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
$sql = "SELECT * FROM " . USERS_TABLE . ' WHERE user_posts != 0';
$result = $db->sql_query($sql);
$users = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
for($i = 0, $size = sizeof($users); $i < $size; $i++)
{
$points = $users[$i]['user_posts'] * $config['points_post'];
$sql = "UPDATE " . USERS_TABLE . "
SET user_points = $points
WHERE user_id = '".$users[$i]['user_id']."'";
$db->sql_query($sql);
unset($points);
}
trigger_error('Query executed.');
?>
userrfdns wrote:i have an issue with this mod ..
i installed it, it works everything.. but when posting or creatyng a new topic points are not updating ..
when i run below script points are made equal to posts.. i set new topic to 2-3 points and reply to 1 ..
Code: Select all
<?php /** * * @package points * @version $Id: user_points_update.php,v 1.0 2007/05/31 15:12:00 Ganon_Master Exp $ * @copyright (c) 2007 Ganon_Master * @license http://opensource.org/licenses/gpl-license.php GNU Public License * */ define('IN_PHPBB', true); $phpbb_root_path = './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include($phpbb_root_path . 'common.' . $phpEx); $sql = "SELECT * FROM " . USERS_TABLE . ' WHERE user_posts != 0'; $result = $db->sql_query($sql); $users = $db->sql_fetchrowset($result); $db->sql_freeresult($result); for($i = 0, $size = sizeof($users); $i < $size; $i++) { $points = $users[$i]['user_posts'] * $config['points_post']; $sql = "UPDATE " . USERS_TABLE . " SET user_points = $points WHERE user_id = '".$users[$i]['user_id']."'"; $db->sql_query($sql); unset($points); } trigger_error('Query executed.'); ?>
what can i do?
PS: The permisions for groups over forums are set to be able to receive points..
regards