Ultimate Point Mod, Punten aanpassen

Hulp nodig bij een modificaties of op zoek naar een MOD?
Forumregels

LEES: Richtlijnen voor Support. Vul de support template in!
phpBB3.0.x
Verschaf iemand geen servertoegang tenzij het niet anders kan. Maak altijd eerst een volledige backup en verander de inloggevens na afloop. Eigen risico.
Plaats reactie
Gebruikersavatar
Joost01
Berichten: 544
Lid geworden op: 29 mar 2013, 12:24
Locatie: Nederland

Ultimate Point Mod, Punten aanpassen

Bericht door Joost01 » 17 jan 2014, 14:32

Hi,


Ik wou graag de punten telling op mijn forum aanpassen namelijk dat het forum alleen bijvoorbeeld 15 aangeeft en niet 15.30 want ik wil met hele aantallen werken.

Afbeelding

Kan iemand mij hiermee opweg helpen met wat ik moet aanpassen hiervoor? :)
Forumversie: 3.2.0
Stijl: prosilver Special Edition

Gebruikersavatar
Solidjeuh
Berichten: 681
Lid geworden op: 05 okt 2010, 06:28
Locatie: Aalst / Belgie
Contacteer:

Re: Ultimate Point Mod, Punten aanpassen

Bericht door Solidjeuh » 17 jan 2014, 19:14

Dan moet heel die modificatie herschreven worden.
En de maker van die mod houd zich daarmee niet veel meer bezig wegens ziekte..
je zal het dus hiermee moeten doen :)
Forum voor NL Extensie vertalingen ---> https://www.solidjeuh.fun
----------------------------------------------------------------------------

Gebruikersavatar
Ger
Berichten: 4864
Lid geworden op: 03 jan 2006, 22:23
Locatie: 192.68.1.100
Contacteer:

Re: Ultimate Point Mod, Punten aanpassen

Bericht door Ger » 21 jan 2014, 12:31

Volgens mij valt dat nog wel mee. Totaal niet getest, maar probeer eens:

OPEN ./includes/points/functions_points.php
ZOEK

Code: Selecteer alles

function number_format_points($num)
{
	global $user;

	$decimals = 2;

	return number_format($num, $decimals, $user->lang['POINTS_SEPARATOR_DECIMAL'], $user->lang['POINTS_SEPARATOR_THOUSANDS']);
}
Je ziet daar $decimals = 2;. Zet die eens op 0?

Gebruikersavatar
Solidjeuh
Berichten: 681
Lid geworden op: 05 okt 2010, 06:28
Locatie: Aalst / Belgie
Contacteer:

Re: Ultimate Point Mod, Punten aanpassen

Bericht door Solidjeuh » 21 jan 2014, 14:54

@Ger, Dat veranderd enkel je 'Cash on hand' dus het cash geld
Je geld op de bank, de statistieken en alle andere functies van die mod blijven nog steeds het getal achter de komma tonen. Dus ik vrees dat dit niet zomaar zal werken zonder andere aanpassingen te doen in de php en html bestanden..
Forum voor NL Extensie vertalingen ---> https://www.solidjeuh.fun
----------------------------------------------------------------------------

Gebruikersavatar
John P
Berichten: 163
Lid geworden op: 29 sep 2012, 13:48
Contacteer:

Re: Ultimate Point Mod, Punten aanpassen

Bericht door John P » 21 jan 2014, 23:17

Misschien een gek idee maar als je het datatype waar de punten staan opgeslagen in integer veranderd heb je hele getallen.
Afbeelding
Webhosting, Custom MODs, Technical management, MOD installation and Webdesign

Gebruikersavatar
Joost01
Berichten: 544
Lid geworden op: 29 mar 2013, 12:24
Locatie: Nederland

Re: Ultimate Point Mod, Punten aanpassen

Bericht door Joost01 » 11 mar 2014, 19:47

John P schreef:Misschien een gek idee maar als je het datatype waar de punten staan opgeslagen in integer veranderd heb je hele getallen.
Hoe pas ik dit aan, snap het niet helemaal.. Sorry voor het late antwoord was wat druk de laatste tijd privé. :oops:
Forumversie: 3.2.0
Stijl: prosilver Special Edition

Gebruikersavatar
Joost01
Berichten: 544
Lid geworden op: 29 mar 2013, 12:24
Locatie: Nederland

Re: Ultimate Point Mod, Punten aanpassen

Bericht door Joost01 » 23 mei 2014, 13:35

*Bump*
Forumversie: 3.2.0
Stijl: prosilver Special Edition

Gebruikersavatar
Joost01
Berichten: 544
Lid geworden op: 29 mar 2013, 12:24
Locatie: Nederland

Re: Ultimate Point Mod, Punten aanpassen

Bericht door Joost01 » 05 jun 2014, 16:05

*Bump*
Forumversie: 3.2.0
Stijl: prosilver Special Edition

Gebruikersavatar
Theriddler
Berichten: 1103
Lid geworden op: 20 apr 2012, 07:47
Contacteer:

Re: Ultimate Point Mod, Punten aanpassen

Bericht door Theriddler » 16 jun 2014, 09:33

Joost01 schreef:Hoe pas ik dit aan, snap het niet helemaal.. Sorry voor het late antwoord was wat druk de laatste tijd privé. :oops:
Door naar de database te gaan via phpmyadmin en daar in de points table het datatype veranderen van DECIMAL naar INT

Ik heb die mod niet geinstalleerd staan ,je zou in het installatie bestand kunnen kijken mbv notepad++
en zo kunnen uitvinden welke namen deze mod gebruikt achter de prefix van je forum. bijv: phpbb_points_bank
zodra je de juiste naam gevonden hebt klik je op structuur van die table en zie je als het goed is de onderverdeling (de kolommen) klik bij de juiste op veranderen en je ziet het woord type staan
Verander deze naar INT

Maak wel altijd een backup voor de zekerheid voor je iets wijzigt

Gebruikersavatar
Joost01
Berichten: 544
Lid geworden op: 29 mar 2013, 12:24
Locatie: Nederland

Re: Ultimate Point Mod, Punten aanpassen

Bericht door Joost01 » 29 jul 2014, 11:26

Zou ik jou mogen vragen om dit voor mij te achterhalen? Want zelf weet ik niet wat ik zoek in die install file word daar niet wijzer van.

Ik hoop dat je me kan helpen te zoeken in die file.
Forumversie: 3.2.0
Stijl: prosilver Special Edition

Gebruikersavatar
David
Berichten: 5093
Lid geworden op: 15 jan 2007, 22:00
Locatie: Zeeuws-Vlaanderen
Contacteer:

Re: Ultimate Point Mod, Punten aanpassen

Bericht door David » 29 jul 2014, 17:55

Weet ook niet precies hoe het werkt, maar het bestand install_ultimate_points.php ziet er als volgt uit:

Code: Selecteer alles

<?php
/** 
*
* @package Ultimate Points
* @version $Id: install_ultimate_points.php 594 2009-11-18 09:34:38Z femu $
* @copyright (c) 2009 wuerzi & femu
* @license http://opensource.org/licenses/gpl-license.php GNU Public License 
*
*/

/**
* @ignore
*/
define('UMIL_AUTO', true);
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);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();

if (!file_exists($phpbb_root_path . 'umil/umil_auto.' . $phpEx))
{
	trigger_error('Please download the latest UMIL (Unified MOD Install Library) from: <a href="http://www.phpbb.com/mods/umil/">phpBB.com/mods/umil</a>', E_USER_ERROR);
}

// The name of the mod to be displayed during installation.
$mod_name = 'UP_ULTIMATE_POINTS_NAME';

/*
* The name of the config variable which will hold the currently installed version
* You do not need to set this yourself, UMIL will handle setting and updating the version itself.
*/

$version_config_name = 'ultimate_points_version';

/*
* The language file which will be included when installing
* Language entries that should exist in the language file for UMIL (replace $mod_name with the mod's name you set to $mod_name above)
*/
$language_file = 'mods/points';

/*
* Optionally we may specify our own logo image to show in the upper corner instead of the default logo.
* $phpbb_root_path will get prepended to the path specified
* Image height should be 50px to prevent cut-off or stretching.
*/

/*
* The array of versions and actions within each.
* You do not need to order it a specific way (it will be sorted automatically), however, you must enter every version, even if no actions are done for it.
*
* You must use correct version numbering.  Unless you know exactly what you can use, only use X.X.X (replacing X with an integer).
* The version numbering must otherwise be compatible with the version_compare function - http://php.net/manual/en/function.version-compare.php
*/

/**
* Define the basic structure
* The format:
*		array('{TABLE_NAME}' => {TABLE_DATA})
*		{TABLE_DATA}:
*			COLUMNS = array({column_name} = array({column_type}, {default}, {auto_increment}))
*			PRIMARY_KEY = {column_name(s)}
*			KEYS = array({key_name} = array({key_type}, {column_name(s)})),
*
*	Column Types:
*	INT:x		=> SIGNED int(x)
*	BINT		=> BIGINT
*	UINT		=> mediumint(8) UNSIGNED
*	UINT:x		=> int(x) UNSIGNED
*	TINT:x		=> tinyint(x)
*	USINT		=> smallint(4) UNSIGNED (for _order columns)
*	BOOL		=> tinyint(1) UNSIGNED
*	VCHAR		=> varchar(255)
*	CHAR:x		=> char(x)
*	XSTEXT_UNI	=> text for storing 100 characters (topic_title for example)
*	STEXT_UNI	=> text for storing 255 characters (normal input field with a max of 255 single-byte chars) - same as VCHAR_UNI
*	TEXT_UNI	=> text for storing 3000 characters (short text, descriptions, comments, etc.)
*	MTEXT_UNI	=> mediumtext (post text, large text)
*	VCHAR:x		=> varchar(x)
*	TIMESTAMP	=> int(11) UNSIGNED
*	DECIMAL		=> decimal number (5,2)
*	DECIMAL:		=> decimal number (x,2)
*	PDECIMAL		=> precision decimal number (6,3)
*	PDECIMAL:	=> precision decimal number (x,3)
*	VCHAR_UNI	=> varchar(255) BINARY
*	VCHAR_CI		=> varchar_ci for postgresql, others VCHAR
*/

$versions = array(
	// Version 1.0.0 - this is the first version using UMIL
	'1.0.0'	=> array(
		// Add fields in the forums and users table
		'table_column_add' => array(
			array($table_prefix . 'users', 'user_points', array('DECIMAL:20', 0.00)),
			array($table_prefix . 'forums', 'forum_perpost', array('DECIMAL:10', 5.00)),
			array($table_prefix . 'forums', 'forum_peredit', array('DECIMAL:10', 0.05)),
			array($table_prefix . 'forums', 'forum_pertopic', array('DECIMAL:10', 15.00)),
		),

		// Now to add some permission settings
		'permission_add' => array(
			array('u_use_points', true),
			array('u_use_bank', true),
			array('u_use_logs', true), 
			array('u_use_robbery', true),
			array('u_use_lottery', true),
			array('u_use_transfer', true),
			array('m_chg_points', true),
			array('m_chg_bank', true),
			array('a_points', true),
		),
  
		// How about we give some default permissions then as well?
		'permission_set' => array(
			array('REGISTERED', 'u_use_points', 'group'),
			array('REGISTERED', 'u_use_bank', 'group'),
			array('REGISTERED', 'u_use_logs', 'group'),
			array('REGISTERED', 'u_use_robbery', 'group'),
			array('REGISTERED', 'u_use_lottery', 'group'),
			array('REGISTERED', 'u_use_transfer', 'group'),
			array('ROLE_ADMIN_STANDARD', 'a_points', 'role'),
			array('ROLE_MOD_STANDARD', 'm_chg_points', 'role'),
			array('ROLE_MOD_STANDARD', 'm_chg_bank', 'role'),
		), 
      

		// Now to add the tables (this uses the layout from develop/create_schema_files.php and from phpbb_db_tools)
		'table_add' => array(

			array($table_prefix . 'points_bank', array(
					'COLUMNS'		=> array(
						'id'			=> array('UINT:10', NULL, 'auto_increment'),
						'user_id'		=> array('UINT:10', 0),
						'holding'		=> array('DECIMAL:20', 0.00),
						'totalwithdrew'	=> array('DECIMAL:20', 0.00),
						'totaldeposit'	=> array('DECIMAL:20', 0.00),
						'opentime'		=> array('UINT:10', 0),
						'fees'			=> array('CHAR:5', 'on'),
					),
					'PRIMARY_KEY'	=> 'id',
				),
			),

			array($table_prefix . 'points_config', array(
					'COLUMNS'		=> array(
						'config_name'		=> array('VCHAR', ''),
						'config_value'		=> array('VCHAR_UNI', ''),
					),
					'PRIMARY_KEY'	=> 'config_name',
				),
			),

			array($table_prefix . 'points_log', array(
					'COLUMNS'		=> array(
						'id'			=> array('UINT:11', NULL, 'auto_increment'),
						'point_send'	=> array('UINT:11', NULL, ''),
						'point_recv'	=> array('UINT:11', NULL, ''),
						'point_amount'	=> array('DECIMAL:20', 0.00),
						'point_sendold'	=> array('DECIMAL:20', 0.00),
						'point_recvold'	=> array('DECIMAL:20', 0.00),
						'point_comment'	=> array('MTEXT_UNI', ''),
						'point_type'	=> array('UINT:11', NULL, ''),
						'point_date'	=> array('UINT:11', NULL, ''),
					),
					'PRIMARY_KEY'	=> 'id',
				),
			),

			array($table_prefix . 'points_lottery_history', array(
					'COLUMNS'		=> array(
						'id'		=> array('UINT:11', NULL, 'auto_increment'),
						'user_id'	=> array('UINT', 0),
						'user_name'	=> array('VCHAR', ''),
						'time'		=> array('UINT:11', 0),
						'amount'	=> array('DECIMAL:20', 0.00),
					),
					'PRIMARY_KEY'	=> 'id',
				),
			),

			array($table_prefix . 'points_lottery_tickets', array(
					'COLUMNS'		=> array(
						'ticket_id'	=> array('UINT:11', NULL, 'auto_increment'),
						'user_id'	=> array('UINT:11', 0),
					),
					'PRIMARY_KEY'	=> 'ticket_id',
				),
			),

			array($table_prefix . 'points_values', array(
					'COLUMNS'		=> array(
						'bank_cost'						=> array('DECIMAL:10', 0.00),
						'bank_fees'						=> array('DECIMAL:10', 0.00),
						'bank_interest'					=> array('DECIMAL:10', 0.00),
						'bank_interestcut'				=> array('DECIMAL:20', 0.00),
						'bank_last_restocked'			=> array('UINT:11', NULL),
						'bank_min_deposit'				=> array('DECIMAL:10', 0.00),
						'bank_min_withdraw'				=> array('DECIMAL:10', 0.00),
						'bank_name'						=> array('VCHAR:100', NULL),
						'bank_pay_period'				=> array('UINT:10', 2592000),
						'lottery_base_amount'			=> array('DECIMAL:10', 0.00),
						'lottery_chance'				=> array('DECIMAL', 50.00),
						'lottery_draw_period'			=> array('UINT:10', 3600),
						'lottery_jackpot'				=> array('DECIMAL:20', 50.00),
						'lottery_last_draw_time'		=> array('UINT:11', NULL),
						'lottery_max_tickets'			=> array('UINT:10', 10),
						'lottery_name'					=> array('VCHAR:100', ''),
						'lottery_prev_winner'			=> array('VCHAR', ''),
						'lottery_prev_winner_id'		=> array('UINT:10', 0),
						'lottery_ticket_cost'			=> array('DECIMAL:10', 0.00),
						'lottery_winners_total'			=> array('UINT', 0),
						'number_show_per_page'			=> array('UINT:10', 0),
						'number_show_top_points'		=> array('UINT', 0),
						'points_dl_cost_per_attach'		=> array('DECIMAL:10', 0.00),
						'points_per_attach'				=> array('DECIMAL:10', 0.00),
						'points_per_attach_file'		=> array('DECIMAL:10', 0.00),
						'points_per_poll'				=> array('DECIMAL:10', 0.00),
						'points_per_poll_option'		=> array('DECIMAL:10', 0.00),
						'points_per_post_character'		=> array('DECIMAL:10', 0.00),
						'points_per_post_word'			=> array('DECIMAL:10', 0.00),
						'points_per_topic_character'	=> array('DECIMAL:10', 0.00),
						'points_per_topic_word'			=> array('DECIMAL:10', 0.00),
						'points_per_warn'				=> array('DECIMAL:10', 0.00),
						'reg_points_bonus'				=> array('DECIMAL:10', 0.00),
						'robbery_chance'				=> array('DECIMAL:5', 0.00),
						'robbery_loose'					=> array('DECIMAL:5', 0.00),
					),          
				),
			),
		),

		// Clear the general cache as well as the templates, imagesets and themes cache
		'cache_purge' => array(
			array(),
			array('imageset'),
			array('template'),
			array('theme'),
		),

		// Alright, now lets add some modules to the ACP
		'module_add' => array(
			// First, lets add a new category named ACP_POINTS to ACP_CAT_DOT_MODS
			array('acp', 'ACP_CAT_DOT_MODS', 'ACP_POINTS'),

			// Now we will add the settings mode to the ACP_POINTS category
			array('acp', 'ACP_POINTS', array(
					'module_basename'	=> 'points',
					'module_langname'	=> 'ACP_POINTS_INDEX_TITLE',
					'module_mode'		=> 'points',
					'module_auth'		=> 'acl_a_points',
				),
			),

			// Now we will add the bank modul to the ACP_POINTS category
			array('acp', 'ACP_POINTS', array(
					'module_basename'	=> 'points',
					'module_langname'	=> 'ACP_POINTS_BANK_TITLE',
					'module_mode'		=> 'bank',
					'module_auth'		=> 'acl_a_points',
				),
			),

			// Now we will add the lottery modul to the ACP_POINTS category
			array('acp', 'ACP_POINTS', array(
					'module_basename'	=> 'points',
					'module_langname'	=> 'ACP_POINTS_LOTTERY_TITLE',
					'module_mode'		=> 'lottery',
					'module_auth'		=> 'acl_a_points',
				),
			),

			// Now we will add the robbery modul to the ACP_POINTS category
			array('acp', 'ACP_POINTS', array(
					'module_basename'	=> 'points',
					'module_langname'	=> 'ACP_POINTS_ROBBERY_TITLE',
					'module_mode'		=> 'robbery',
					'module_auth'		=> 'acl_a_points',
				),
			),
		),

		/*
		* Now we need to insert some data.  The easiest way to do that is through a custom function
		* Enter 'custom' for the array key and the name of the function for the value.
		*/
		'custom'	=> 'first_fill_1_0_0',
	),
	
	// Version 1.0.1 only update Version
	'1.0.1'		=> array(),
	
	// Version 1.0.2
	'1.0.2' => array(
		// Version 1.0.2 add robbery max rob and lottery pm id
		'custom'	=> 'fill_1_0_2',
	),
	
	// Version 1.0.3 only update Version
	'1.0.3'		=> array(),
	
	// Version 1.0.4
	'1.0.4' => array(
		'module_add' => array(
			// Now we will add the forum points modlue to the ACP_POINTS category
			array('acp', 'ACP_POINTS', array(
					'module_basename'	=> 'points',
					'module_langname'	=> 'ACP_POINTS_FORUM_TITLE',
					'module_mode'		=> 'forumpoints',
					'module_auth'		=> 'acl_a_points',
				),
			),

			// Now we will add the userguide modul to the ACP_POINTS category
			array('acp', 'ACP_POINTS', array(
					'module_basename'	=> 'points',
					'module_langname'	=> 'ACP_POINTS_USERGUIDE_TITLE',
					'module_mode'		=> 'userguide',
					'module_auth'		=> 'acl_a_points',
				),
			),
		),
		// Version 1.0.4 add userguide in ACP
		'custom'	=> 'fill_1_0_4',
	),
	
	// Version 1.0.5 only update Version
	'1.0.5'		=> array(),	
	
	// Version 1.0.6 only update Version
	'1.0.6'		=> array(),	
	
);

// Include the UMIF Auto file and everything else will be handled automatically.
include($phpbb_root_path . 'umil/umil_auto.' . $phpEx);

/*
* Here is our custom function that will be called for version 1.0.0
*
* @param string $action The action (install|update|uninstall) will be sent through this.
* @param string $version The version this is being run for will be sent through this.
*/
function first_fill_1_0_0($action, $version)
{
	global $db, $table_prefix, $umil;

	switch ($action)
	{
		case 'install' :    
			// Run this when installing the first time
			if ($umil->table_exists($table_prefix . 'config'))
			{
				$sql_ary = array();

				$sql_ary[] = array('config_name' => 'points_enable',			'config_value' => '1',);
				$sql_ary[] = array('config_name' => 'points_name',				'config_value' => 'Points',);
				$sql_ary[] = array('config_name' => 'ultimate_points_version',	'config_value' => '1.0.0',);
				$db->sql_multi_insert($table_prefix . 'config ', $sql_ary);
			}

			if ($umil->table_exists($table_prefix . 'points_config'))
			{
				// before we fill anything in this table, we truncate it. Maybe someone missed an old installation.
				$db->sql_query('TRUNCATE TABLE ' . $table_prefix . 'points_config');

				$sql_ary = array();

				$sql_ary[] = array('config_name' => 'transfer_enable',				'config_value' => '1',);
				$sql_ary[] = array('config_name' => 'transfer_pm_enable',			'config_value' => '1',);
				$sql_ary[] = array('config_name' => 'comments_enable',				'config_value' => '1',);
				$sql_ary[] = array('config_name' => 'pertopic_enable',				'config_value' => '1',);
				$sql_ary[] = array('config_name' => 'perpost_enable',				'config_value' => '1',);
				$sql_ary[] = array('config_name' => 'peredit_enable',				'config_value' => '1',);
				$sql_ary[] = array('config_name' => 'logs_enable',					'config_value' => '1',);
				$sql_ary[] = array('config_name' => 'images_topic_enable',			'config_value' => '1',);
				$sql_ary[] = array('config_name' => 'images_memberlist_enable',		'config_value' => '1',);
				$sql_ary[] = array('config_name' => 'lottery_enable',				'config_value' => '1',);
				$sql_ary[] = array('config_name' => 'bank_enable',					'config_value' => '1',);
				$sql_ary[] = array('config_name' => 'robbery_enable',				'config_value' => '1',);
				$sql_ary[] = array('config_name' => 'points_disablemsg',			'config_value' => 'Ultimate Points is currently disabled!',);
				$sql_ary[] = array('config_name' => 'stats_enable',					'config_value' => '1',);
				$sql_ary[] = array('config_name' => 'lottery_multi_ticket_enable',	'config_value' => '1',);
				$sql_ary[] = array('config_name' => 'robbery_sendpm',				'config_value' => '1',);
				$sql_ary[] = array('config_name' => 'display_lottery_stats',		'config_value' => '1',);

				$db->sql_multi_insert($table_prefix . 'points_config ', $sql_ary);
			}

			if ($umil->table_exists($table_prefix . 'points_values'))
			{
				// before we fill anything in this table, we truncate it. Maybe someone missed an old installation.
				$db->sql_query('TRUNCATE TABLE ' . $table_prefix . 'points_values');

				$sql_ary = array();

				$sql_ary[] = array(
					'number_show_per_page' => '15', 
					'number_show_top_points' => '10', 
					'reg_points_bonus' => '50', 
					'lottery_jackpot' => '50', 
					'lottery_winners_total' => '0', 
					'lottery_prev_winner' => '0', 
					'lottery_prev_winner_id' => '0', 
					'lottery_last_draw_time' => '0', 
					'bank_last_restocked' => '0', 
					'lottery_base_amount' => '50', 
					'lottery_draw_period' => '3600', 
					'lottery_ticket_cost' => '10', 
					'bank_fees' => '0', 
					'bank_interest' => '0', 
					'bank_pay_period' => '2592000', 
					'bank_min_withdraw' => '0', 
					'bank_min_deposit' => '0', 
					'bank_interestcut' => '0', 
					'points_per_poll_option' => '0', 
					'points_per_poll' => '0', 
					'points_per_attach_file' => '0', 
					'points_per_attach' => '0', 
					'points_per_post_word' => '0', 
					'points_per_post_character' => '0', 
					'points_per_topic_word' => '0', 
					'points_per_topic_character' => '0', 
					'points_dl_cost_per_attach' => '0', 
					'points_per_warn' => '0', 
					'robbery_chance' => '50', 
					'robbery_loose' => '50', 
					'bank_cost' => '0', 
					'bank_name' => 'BANK NAME', 
					'lottery_name' => 'LOTTERY NAME',
				);

				$db->sql_multi_insert($table_prefix . 'points_values ', $sql_ary);
			}      

			// Send the message, that the command was successful
			return 'UP_INSERT_FIRST_FILL';
		break;

		case 'update' :
		break;

 		case 'uninstall' :
			// Run this additionally when uninstalling
			if ($umil->table_exists($table_prefix . 'config'))
			{
				$sql = 'DELETE FROM ' . $table_prefix . "config
					WHERE config_name = 'points_enable'";
				$db->sql_query($sql);
				$sql = 'DELETE FROM ' . $table_prefix . "config
					WHERE config_name = 'points_name'";
				$db->sql_query($sql);
			}

			// Send the message, that the command was successful
			return 'UP_REMOVE_FORUM_ENTRIES';
		break;
	}
}


/*
* Here is our custom function that will be called for version 1.0.2
*
* @param string $action The action (install|update|uninstall) will be sent through this.
* @param string $version The version this is being run for will be sent through this.
*/
function fill_1_0_2($action, $version)
{
	global $db, $table_prefix, $umil;

	switch ($action)
	{
		case 'install' :
		case 'update' :
			// Run this when installing/updating
			if ($umil->table_exists($table_prefix . 'points_values'))
			{
				$sql = "ALTER TABLE " . $table_prefix . "points_values
					ADD robbery_max_rob decimal(5,2) NOT NULL DEFAULT '10.00'";
				$db->sql_query($sql);
				
				$sql = "ALTER TABLE " . $table_prefix . "points_values
					ADD lottery_pm_from INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'";
				$db->sql_query($sql);
				
				$sql = "ALTER TABLE " . $table_prefix . "posts
					ADD points_received DECIMAL( 20, 2 ) NOT NULL default '0.00'";
				$db->sql_query($sql);
			}
			
			// Method 1 of displaying the command (and Success for the result)
			return 'UP_UPDATE_SUCCESFUL';
		break;

		case 'uninstall' :
		
			if ($umil->table_exists($table_prefix . 'posts'))
			{
				$sql = 'ALTER TABLE ' . $table_prefix . 'posts
					DROP points_received';
				$db->sql_query($sql);
			}
			
			// Send the message, that the command was successful
			return 'UP_REMOVE_FORUM_ENTRIES';
		break;
	}
}

function fill_1_0_4($action, $version)
{
	global $db, $table_prefix, $umil;

	switch ($action)
	{
		case 'install' :
		case 'update' :
			// Run this when installing/updating
			if ($umil->table_exists($table_prefix . 'points_values'))
			{
				$sql = "ALTER TABLE " . $table_prefix . "points_values
					ADD forum_topic decimal(10,2) NOT NULL DEFAULT '0.00'";
				$db->sql_query($sql);
				
				$sql = "ALTER TABLE " . $table_prefix . "points_values
					ADD forum_post decimal(10,2) NOT NULL DEFAULT '0.00'";
				$db->sql_query($sql);
				
				$sql = "ALTER TABLE " . $table_prefix . "points_values
					ADD forum_edit decimal(10,2) NOT NULL DEFAULT '0.00'";
				$db->sql_query($sql);
				
				$sql = "ALTER TABLE " . $table_prefix . "points_values
					ADD gallery_upload decimal(10,2) NOT NULL DEFAULT '0.00'";
				$db->sql_query($sql);
				
				$sql = "ALTER TABLE " . $table_prefix . "points_values
					ADD gallery_remove decimal(10,2) NOT NULL DEFAULT '0.00'";
				$db->sql_query($sql);

				$sql = "ALTER TABLE " . $table_prefix . "points_values
					ADD gallery_view decimal(10,2) NOT NULL DEFAULT '0.00'";
				$db->sql_query($sql);
			}
			
			if ($umil->table_exists($table_prefix . 'posts'))
			{
				$sql = "ALTER TABLE " . $table_prefix . "posts
					ADD points_poll_received DECIMAL( 20, 2 ) NOT NULL default '0.00'";
				$db->sql_query($sql);
				
				$sql = "ALTER TABLE " . $table_prefix . "posts
					ADD points_attachment_received DECIMAL( 20, 2 ) NOT NULL default '0.00'";
				$db->sql_query($sql);

				$sql = "ALTER TABLE " . $table_prefix . "posts
					ADD points_topic_received DECIMAL( 20, 2 ) NOT NULL default '0.00'";
				$db->sql_query($sql);

				$sql = "ALTER TABLE " . $table_prefix . "posts
					ADD points_post_received DECIMAL( 20, 2 ) NOT NULL default '0.00'";
				$db->sql_query($sql);
			}
			
			if ($umil->table_exists($table_prefix . 'points_config'))
			{
				$sql = "INSERT INTO " . $table_prefix . "points_config
					(`config_name`, `config_value`) VALUES ('gallery_deny_view', '0')";
				$db->sql_query($sql);
			}
			
			// Method 1 of displaying the command (and Success for the result)
			return 'UP_UPDATE_SUCCESFUL';
		break;

		case 'uninstall' :
		
			if ($umil->table_exists($table_prefix . 'posts'))
			{
				$sql = 'ALTER TABLE ' . $table_prefix . 'posts
					DROP points_poll_received';
				$db->sql_query($sql);
				
				$sql = 'ALTER TABLE ' . $table_prefix . 'posts
					DROP points_attachment_received';
				$db->sql_query($sql);

				$sql = 'ALTER TABLE ' . $table_prefix . 'posts
					DROP points_topic_received';
				$db->sql_query($sql);

				$sql = 'ALTER TABLE ' . $table_prefix . 'posts
					DROP points_post_received';
				$db->sql_query($sql);				
			}
			
			// Send the message, that the command was successful
			return 'UP_REMOVE_FORUM_ENTRIES';
		break;
	}
}

?>
Weet niet of dit je helpt, maar je vind daar verschillende keren het woord DECIMAL. Bijvoorbeeld onder: array($table_prefix . 'points_bank', array(.

Misschien moet je onder de array($table_prefix . 'points_log', array( zijn, bij 'point_amount' => array('DECIMAL:20', 0.00),. Durf het je helaas niet met zekerheid te zeggen. Hopelijk iemand anders ;)
Wijziging: Toevoeging:
Heb de modificatie even op een test forum gezet, als je alleen 'point_amount' => array('DECIMAL:20', 0.00), veranderd gebeurd er niks in de legenda rijkste gebruikers.

Als ik array($table_prefix . 'users', 'user_points', array('DECIMAL:20', 0.00)), verander dan worden alleen de cijfers achter de coma weg gelaten, het was 15,35 dat werd bij het veranderen naar INT 15.00 en volgens mij wil Joost de .00 ook weg hebben :?

Ga nog even verder spelen, maar beloof niets ;) Hopelijk dat iemand in de tussentijd de oplossing weet... want ik heb hier eigenlijk ook geen kaas van gegeten.
Op zoek naar een vertaling voor je extensie? vertalingen

Gebruikersavatar
Joost01
Berichten: 544
Lid geworden op: 29 mar 2013, 12:24
Locatie: Nederland

Re: Ultimate Point Mod, Punten aanpassen

Bericht door Joost01 » 29 jul 2014, 18:50

Hoi David,

Bedankt voor het helpen uitzoeken ik bedoel inderdaad dat de .00 die wil ik eruit hebben. :)
Forumversie: 3.2.0
Stijl: prosilver Special Edition

Mid
Berichten: 961
Lid geworden op: 03 mei 2008, 23:22

Re: Ultimate Point Mod, Punten aanpassen

Bericht door Mid » 29 jul 2014, 19:54

Volgens mij moet ", 0.00" worden weggehaald, zodat puur de integer wordt neergezet.

Gebruikersavatar
David
Berichten: 5093
Lid geworden op: 15 jan 2007, 22:00
Locatie: Zeeuws-Vlaanderen
Contacteer:

Re: Ultimate Point Mod, Punten aanpassen

Bericht door David » 29 jul 2014, 20:51

Heeft iemand Ger zijn suggestie geprobeerd? Jij Joost? :? Volgens mij werkt dat precies zoals jij zou willen, ik zou zeggen probeer het eens en kijk wat je er van vindt. Op het oog wordt alles achter de . weggelaten ook bij de punten als je een onderwerp aanmaakt, bericht plaatst of wijzigt.

Dat wat ik met de database heb gedaan had volgens mij weinig zin en voegde volgens mij ook weinig toe :?
Op zoek naar een vertaling voor je extensie? vertalingen

Gebruikersavatar
Joost01
Berichten: 544
Lid geworden op: 29 mar 2013, 12:24
Locatie: Nederland

Re: Ultimate Point Mod, Punten aanpassen

Bericht door Joost01 » 30 jul 2014, 09:50

Ow wow, bedankt David. Het werkt alleen bij het bewerken van de punten blijft het nog staan helaas.
Forumversie: 3.2.0
Stijl: prosilver Special Edition

Gebruikersavatar
David
Berichten: 5093
Lid geworden op: 15 jan 2007, 22:00
Locatie: Zeeuws-Vlaanderen
Contacteer:

Re: Ultimate Point Mod, Punten aanpassen

Bericht door David » 30 jul 2014, 10:02

Joost01 schreef:Ow wow, bedankt David. Het werkt alleen bij het bewerken van de punten blijft het nog staan helaas.
In het Beheerderspaneel staat het inderdaad nog met de 2 getallen achter de punt, maar voor de gebruikers staat het volgens mij overal zonder. Je moet mij niet bedanken, maar Ger ;) Ik vroeg mij slechts af waarom niemand zijn suggestie had geprobeerd... Is het nu ook zoals je zou willen?
Op zoek naar een vertaling voor je extensie? vertalingen

Plaats reactie