Ultimate Points

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
Locked
michaelp74
Registered User
Posts: 5
Joined: Sat Feb 20, 2010 9:55 pm
Location: Prague, Czech Republic
Contact:

Re: Ultimate Points

Post by michaelp74 » Sat Feb 20, 2010 10:24 pm

Hi,
Sorry for my bad english, but i found one error, if you use very big points in bank module:

Example:
If you have one hundred million points (100,000,000)in bank, and BANK_WITHDRAW_RATE is 1%
your system badly compute, that maximal withdraw is: 99,000,000 that is totally bad!
The right number is: 99,009,900.99
Your bank has robbed you in this examle for additional 9,900.99 POINTS !!
Bank has badly compute fees only, if you withdraw the whole money, that is automatically computed. If you raise the "maximal computed value" with 1 point, the computed fees is ok.

Solution:
In /includes/points/points_bank.php
SEARCH:

Code: Select all

			$withdrawtotal 	= ( $row['fees'] == 'on' ) ? $row['holding'] - (round($row['holding'] / 100 * $points_values['bank_fees'])) : $row['holding'];
REPLACE WITH:

Code: Select all

			$withdrawtotal 	= ( $row['fees'] == 'on' ) ? round(($row['holding'] * 100)/(100 + $points_values['bank_fees']),2) : $row['holding'];
Sorry, i'm not programmer, maybe this can be compute better, but this is work.
Maybe round with 2 decimals is bad, i don't know. Check please.
Thanks for this great mod!

gennyna
Registered User
Posts: 72
Joined: Mon Apr 06, 2009 7:29 pm

Re: Ultimate Points

Post by gennyna » Sun Feb 21, 2010 11:07 am

Have this problem when i go to Acp panel and i click on the Arcade game:

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/acp/acp_arcade.php on line 472: Undefined index: ARCADE_POINTS_DETECT_ENABLED
[phpBB Debug] PHP Notice: in file /includes/acp/acp_arcade.php on line 472: Undefined index: ARCADE_ULTIMATE_POINTS_SYSTEM

User avatar
darkonia
Registered User
Posts: 1901
Joined: Tue May 13, 2008 1:10 pm
Location: Munich, Germany
Contact:

Re: Ultimate Points

Post by darkonia » Sun Feb 21, 2010 11:14 am

gennyna wrote:Have this problem when i go to Acp panel and i click on the Arcade game:

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/acp/acp_arcade.php on line 472: Undefined index: ARCADE_POINTS_DETECT_ENABLED
[phpBB Debug] PHP Notice: in file /includes/acp/acp_arcade.php on line 472: Undefined index: ARCADE_ULTIMATE_POINTS_SYSTEM
you must install the arcade UPS addon
MMOG-Heaven - Das Gaming Portal
Community bedeutet Gleichgesinnte finden - MMOG-Heaven ist Deine Community! Von Spielern für Spieler bietet Dir dieses Portal genau das, was ein Spieler braucht. Bleibe ständig informiert, finde die neuesten MMORPGs, oder suche die frischesten News aus der Welt des Online Gamings - dieses und vieles mehr erwartet Dich auf MMOG-Heaven.

User avatar
Wuerzi
Registered User
Posts: 60
Joined: Fri Aug 15, 2008 11:38 pm
Location: Germany/Würzburg
Contact:

Re: Ultimate Points

Post by Wuerzi » Sun Feb 21, 2010 11:46 am

darkonia wrote:you must install the arcade UPS addon
Which Arcade UPS addon? :o :shock:

User avatar
darkonia
Registered User
Posts: 1901
Joined: Tue May 13, 2008 1:10 pm
Location: Munich, Germany
Contact:

Re: Ultimate Points

Post by darkonia » Sun Feb 21, 2010 11:50 am

Wuerzi wrote:
darkonia wrote:you must install the arcade UPS addon
Which Arcade UPS addon? :o :shock:
i zhink there was something in the contrib folder, but i can be false thinking, too long here that i install :mrgreen:
MMOG-Heaven - Das Gaming Portal
Community bedeutet Gleichgesinnte finden - MMOG-Heaven ist Deine Community! Von Spielern für Spieler bietet Dir dieses Portal genau das, was ein Spieler braucht. Bleibe ständig informiert, finde die neuesten MMORPGs, oder suche die frischesten News aus der Welt des Online Gamings - dieses und vieles mehr erwartet Dich auf MMOG-Heaven.

User avatar
Ashley.S.
Registered User
Posts: 468
Joined: Mon Aug 04, 2008 6:01 pm
Location: Falmouth, Cornwall, UK
Name: Ashley .S.
Contact:

Re: Ultimate Points

Post by Ashley.S. » Sun Feb 21, 2010 11:53 am

darkonia wrote:
Wuerzi wrote:
darkonia wrote:you must install the arcade UPS addon
Which Arcade UPS addon? :o :shock:
i zhink there was something in the contrib folder, but i can be false thinking, too long here that i install :mrgreen:
I thought the system had already been built in by JRSweets with his arcade :?
Regards,
-Ashley.S. [ ProphpBB Free Forum Hosting Moderator ]

Garn
Registered User
Posts: 27
Joined: Thu Sep 10, 2009 7:56 pm

Re: Ultimate Points

Post by Garn » Sun Feb 21, 2010 11:55 am

Hmmmm, I just ran Add changes from Prosilver to my theme and now,
Fatal error: Cannot redeclare cache::obtain_points_config() in *****/includes/cache.php on line 89
And now Everything has locked out with that error, including the ACP
Last edited by Garn on Sun Feb 21, 2010 11:55 am, edited 1 time in total.

User avatar
Wuerzi
Registered User
Posts: 60
Joined: Fri Aug 15, 2008 11:38 pm
Location: Germany/Würzburg
Contact:

Re: Ultimate Points

Post by Wuerzi » Sun Feb 21, 2010 11:55 am

I think gennyna have a wrong version or wrong lang files for Arcade :?

gennyna
Registered User
Posts: 72
Joined: Mon Apr 06, 2009 7:29 pm

Re: Ultimate Points

Post by gennyna » Sun Feb 21, 2010 12:13 pm

In the folder the file is missing for arcade .. Where can I find?

I have the latest version

thi is a page where there

Code: Select all

    <?php
    /**
    *
    * @package acp
    * @version $Id: acp_arcade.php 788 2009-06-17 19:26:19Z JRSweets $
    * @copyright (c) 2008 http://www.JeffRusso.net
    * @license http://opensource.org/licenses/gpl-license.php GNU Public License
    *
    */

    /**
    * @ignore
    */
    if (!defined('IN_PHPBB'))
    {
       exit;
    }

    /**
    * @package acp
    */
    class acp_arcade
    {
       var $u_action;
       var $new_config = array();

       function main($id, $mode)
       {
          global $db, $user, $auth, $auth_arcade, $template, $cache, $table_prefix, $arcade;
          global $config, $phpbb_admin_path, $phpbb_root_path, $phpEx, $file_functions;

          include($phpbb_root_path . 'includes/arcade/arcade_common.' . $phpEx);
          // Initialize arcade auth
          $auth_arcade->acl($user->data);
          // Initialize arcade class
          $arcade = new arcade_admin();

          $this->tpl_name = 'acp_arcade';
          $version_check = (isset($_POST['version_check'])) ? true : false;
          if ($version_check)
          {
             $mode =  'version';
          }

          switch ($mode)
          {
             case 'settings':
             case 'game':
             case 'feature':
             case 'page':
             case 'path':
                $this->manage_settings($mode);
             break;

             case 'version':
                $this->manage_version_check();
             break;

             default:
                trigger_error('NO_MODE', E_USER_ERROR);
             break;
          }
       }

       function manage_settings($mode)
       {
          global $db, $user, $auth, $auth_arcade, $template, $cache, $table_prefix, $arcade;
          global $config, $phpbb_admin_path, $phpbb_root_path, $phpEx, $file_functions;

          $form_key = 'acp_arcade';
          add_form_key($form_key);

          $update      = (isset($_POST['update'])) ? true : false;
          $template->assign_var('S_ARCADE_SETTINGS', true);

          switch ($mode)
          {
             case 'settings':
                $display_vars = array(
                   'title'         => 'ACP_ARCADE_SETTINGS',
                   'vars'   => array(
                      'legend1'               => 'ACP_ARCADE_VERSION_INFO',
                      'version'               => array('lang' => 'ARCADE_VERSION',    'validate' => 'string', 'type' => 'custom', 'method' => 'arcade_version', 'explain' => true),

                      'legend2'               => 'ACP_ARCADE_SETTINGS_GENERAL',
                      'arcade_disable'         => array('lang' => 'DISABLE_ARCADE',            'validate' => 'bool',      'type' => 'custom',        'explain' => true, 'method' => 'arcade_disable'),
                      'arcade_disable_msg'      => false,
                      'auto_disable'            => array('lang' => 'ARCADE_AUTO_DISABLE',         'validate' => 'bool',      'type' => 'radio:yes_no',    'explain' => true),
                      'auto_disable_start'      => array('lang' => 'ARCADE_AUTO_DISABLE_START',      'validate' => 'string',    'type' => 'text:5:5',       'explain' => true),
                      'auto_disable_end'         => array('lang' => 'ARCADE_AUTO_DISABLE_END',      'validate' => 'string',    'type' => 'text:5:5',       'explain' => true),
                      'download_list'            => array('lang' => 'ARCADE_DOWNLOAD_LIST',          'validate' => 'bool',       'type' => 'radio:yes_no',    'explain' => true),
                      'download_list_message'      => array('lang' => 'ARCADE_DOWNLOAD_LIST_MESSAGE',   'validate' => 'string',    'type' => 'textarea:8:25',    'explain' => true),
                      'new_games_delay'         => array('lang' => 'ARCADE_NEW_GAMES_DELAY',      'validate' => 'int',       'type' => 'text:3:4',       'explain' => true),
                      'flash_version'            => array('lang' => 'ARCADE_ACP_FLASH_VERSION',      'validate' => 'int',       'type' => 'text:3:4',       'explain' => true),
                      'parse_bbcode'            => array('lang' => 'ARCADE_COMMENTS_BBCODE',       'validate' => 'bool',       'type' => 'radio:yes_no',    'explain' => true),
                      'parse_smilies'            => array('lang' => 'ARCADE_COMMENTS_SMILIES',       'validate' => 'bool',       'type' => 'radio:yes_no',    'explain' => true),
                      'parse_links'            => array('lang' => 'ARCADE_COMMENTS_LINKS',       'validate' => 'bool',       'type' => 'radio:yes_no',    'explain' => true),
                      'played_games'            => array('lang' => 'ARCADE_PLAYED_GAMES',          'validate' => 'bool',       'type' => 'radio:yes_no',    'explain' => true),
                      'played_colour'            => array('lang' => 'ARCADE_PLAYED_GAMES_COLOUR',   'validate' => 'string',    'type' => 'text:7:6',       'explain' => true),
                      'cache_time'            => array('lang' => 'ARCADE_CACHE_TIME',            'validate' => 'int',      'type' => 'text:4:3',       'explain' => true,    'append' => ' ' . $user->lang['HOURS']),
                      'online_time'            => array('lang' => 'ARCADE_ONLINE_TIME',         'validate' => 'int',      'type' => 'text:4:3',       'explain' => true,    'append' => ' ' . $user->lang['MINUTES']),
                   )
                );

                if ($arcade->points['installed'])
                {
                   $display_vars['vars'] += array(
                      'legend3'         => 'ACP_ARCADE_POINTS',
                      'use_points'      => array('lang' => 'ARCADE_USE_POINTS',          'validate' => 'bool',       'type' => 'custom', 'method' => 'points_detect', 'explain' => true),
                   );

                   if ($arcade->points['type'] == CASH_MOD)
                   {
                      $display_vars['vars'] += array(
                         'cm_currency_id'      => array('lang' => 'ARCADE_CM_CURRENCY',  'validate' => 'string', 'type' => 'select', 'method' => 'cm_currency_select', 'explain' => true),
                      );
                   }

                   $display_vars['vars'] += array(
                      'game_cost'         => array('lang' => 'ARCADE_GLOBAL_GAME_COST',       'validate' => 'string',       'type' => 'text:10:10',       'explain' => true),
                      'game_reward'      => array('lang' => 'ARCADE_GLOBAL_GAME_REWARD',      'validate' => 'string',       'type' => 'text:10:10',       'explain' => true),
                      'use_jackpot'      => array('lang' => 'ARCADE_GLOBAL_USE_JACKPOT',    'validate' => 'bool',          'type' => 'radio:yes_no',       'explain' => true),
                      'jackpot_maximum'   => array('lang' => 'ARCADE_JACKPOT_MAXIMUM',      'validate' => 'string',       'type' => 'text:10:10',       'explain' => true),
                      'jackpot_minimum'   => array('lang' => 'ARCADE_JACKPOT_MINIMUM',      'validate' => 'string',       'type' => 'text:10:10',       'explain' => true),
                   );
                }

             break;

             case 'game':
                $display_vars = array(
                   'title'         => 'ACP_ARCADE_SETTINGS_GAME',
                   'vars'   => array(
                      'legend1'               => 'ACP_ARCADE_SETTINGS_GAME',
                      'game_zero_negative_score'   => array('lang' => 'ARCADE_GAME_ZERO_NEGATIVE_SCORE',      'validate' => 'bool',    'type' => 'radio:yes_no',    'explain' => true),
                      'game_autosize'            => array('lang' => 'ARCADE_GLOBAL_GAME_AUTOSIZE',         'validate' => 'bool',    'type' => 'radio:yes_no',    'explain' => true),
                      'game_width'            => array('lang' => 'ARCADE_GLOBAL_GAME_WIDTH',            'validate' => 'int',    'type' => 'text:3:4',       'explain' => true),
                      'game_height'            => array('lang' => 'ARCADE_GLOBAL_GAME_HEIGHT',            'validate' => 'int',    'type' => 'text:3:4',       'explain' => true),
                      'override_user_sort'      => array('lang' => 'ARCADE_OVERRIDE_USER_SORT',          'validate' => 'bool',    'type' => 'radio:yes_no',    'explain' => true),
                      'games_sort_order'         => array('lang' => 'ARCADE_GAMES_SORT_ORDER',              'validate' => 'string', 'type' => 'select',       'explain' => true,   'method' => 'games_sort_order_select'),
                      'games_sort_dir'         => array('lang' => 'ARCADE_GAMES_SORT_DIR',              'validate' => 'string', 'type' => 'select',       'explain' => true,   'method' => 'games_sort_dir_select'),
                      'games_per_page'         => array('lang' => 'ARCADE_GAMES_PER_PAGE',               'validate' => 'int',    'type' => 'text:3:4',       'explain' => true),
                      'display_desc'            => array('lang' => 'ARCADE_DISPLAY_DESC',                'validate' => 'bool',    'type' => 'radio:yes_no',    'explain' => true),
                      'resolution_select'         => array('lang' => 'ARCADE_RESOLUTION_SELECT',             'validate' => 'bool',    'type' => 'radio:yes_no',    'explain' => true),
                   )
                );
             break;

             case 'feature':
                $display_vars = array(
                   'title'         => 'ACP_ARCADE_SETTINGS_FEATURE',
                   'vars'   => array(
                      'legend1'            => 'ACP_ARCADE_SETTINGS_PM',
                      'send_arcade_pm'      => array('lang' => 'ARCADE_SEND_PM',    'validate' => 'bool',    'type' => 'radio:yes_no',    'explain' => true),
                      'pm_subject'         => array('lang' => 'ARCADE_PM_SUBJECT',   'validate' => 'string', 'type' => 'textarea:5:25',    'explain' => true),
                      'pm_message'         => array('lang' => 'ARCADE_PM_MESSAGE',   'validate' => 'string', 'type' => 'textarea:8:25',    'explain' => true),

                      'legend2'            => 'ACP_ARCADE_SETTINGS_ANNOUNCE',
                      'announce_game'         => array('lang' => 'ARCADE_ANNOUNCE_GAME',       'validate' => 'bool',    'type' => 'radio:yes_no',    'explain' => true),
                      'announce_forum'      => array('lang' => 'ARCADE_ANNOUNCE_FORUM',     'validate' => 'string', 'type' => 'select',       'explain' => true, 'method' => 'arcade_announce_game'),
                      'announce_subject'      => array('lang' => 'ARCADE_ANNOUNCE_SUBJECT',   'validate' => 'string', 'type' => 'textarea:5:25',    'explain' => true),
                      'announce_message'      => array('lang' => 'ARCADE_ANNOUNCE_MESSAGE',   'validate' => 'string', 'type' => 'textarea:8:25',    'explain' => true),

                      'legend3'                  => 'ACP_ARCADE_SETTINGS_PLAY',
                      'limit_play'               => array('lang' => 'ARCADE_LIMIT_PLAY',              'validate' => 'int', 'type' => 'select',     'explain' => true, 'method' => 'arcade_limit_play_select'),
                      'limit_play_total_posts'      => array('lang' => 'ARCADE_LIMIT_PLAY_TOTAL_POSTS',      'validate' => 'int', 'type' => 'text:3:4',    'explain' => true),
                      'limit_play_posts'            => array('lang' => 'ARCADE_LIMIT_PLAY_POSTS',         'validate' => 'int', 'type' => 'text:3:4',    'explain' => true),
                      'limit_play_days'            => array('lang' => 'ARCADE_LIMIT_PLAY_DAYS',         'validate' => 'int', 'type' => 'text:3:4',    'explain' => true),
                   )
                );

             break;

             case 'page':
                $display_vars = array(
                   'title'         => 'ACP_ARCADE_SETTINGS_PAGE',
                   'vars'   => array(
                      'legend1'               => 'ACP_ARCADE_SETTINGS_PAGE',
                      'display_viewtopic'         => array('lang' => 'ARCADE_DISPLAY_VIEWTOPIC',          'validate' => 'bool',    'type' => 'radio:yes_no',    'explain' => true),
                      'display_memberlist'      => array('lang' => 'ARCADE_DISPLAY_MEMBERLIST',       'validate' => 'bool',    'type' => 'radio:yes_no',    'explain' => true),
                      'acp_items_per_page'      => array('lang' => 'ARCADE_ACP_ITEMS_PER_PAGE',       'validate' => 'int',    'type' => 'text:3:4',       'explain' => true),
                      'download_list_per_page'   => array('lang' => 'ARCADE_DOWNLOAD_LIST_PER_PAGE',      'validate' => 'int',    'type' => 'select',       'explain' => true, 'method' => 'download_list_per_page_select'),
                      'arcade_leaders_header'      => array('lang' => 'ARCADE_LEADERS_HEADER',            'validate' => 'int',    'type' => 'text:3:4',       'explain' => true),
                      'newest_games'            => array('lang' => 'ARCADE_NEWEST_GAMES',            'validate' => 'int',    'type' => 'text:3:4',       'explain' => true),
                      'latest_highscores'         => array('lang' => 'ARCADE_LATEST_HIGHSCORES',         'validate' => 'int',    'type' => 'text:3:4',       'explain' => true),
                      'game_scores'            => array('lang' => 'ARCADE_TOTAL_GAME_SCORES',         'validate' => 'int',    'type' => 'text:3:4',       'explain' => true),

                      'legend2'            => 'ACP_ARCADE_SETTINGS_PAGE_INDEX',
                      'welcome_index'         => array('lang' => 'ARCADE_WELCOME_INDEX',    'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
                      'search_index'         => array('lang' => 'ARCADE_SEARCH_INDEX',    'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
                      'links_index'         => array('lang' => 'ARCADE_LINKS_INDEX',    'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),

                      'legend3'            => 'ACP_ARCADE_SETTINGS_PAGE_CATS',
                      'welcome_cats'         => array('lang' => 'ARCADE_WELCOME_CATS',    'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
                      'search_cats'         => array('lang' => 'ARCADE_SEARCH_CATS',    'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
                      'links_cats'         => array('lang' => 'ARCADE_LINKS_CATS',    'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),

                      'legend4'            => 'ACP_ARCADE_SETTINGS_PAGE_STATS',
                      'welcome_stats'         => array('lang' => 'ARCADE_WELCOME_STATS',          'validate' => 'bool',    'type' => 'radio:yes_no',    'explain' => true),
                      'search_stats'         => array('lang' => 'ARCADE_SEARCH_STATS',          'validate' => 'bool',    'type' => 'radio:yes_no',    'explain' => true),
                      'links_stats'         => array('lang' => 'ARCADE_LINKS_STATS',          'validate' => 'bool',    'type' => 'radio:yes_no',    'explain' => true),
                      'most_popular'         => array('lang' => 'ARCADE_MOST_POPULAR',         'validate' => 'int',    'type' => 'text:3:4',       'explain' => true),
                      'least_popular'         => array('lang' => 'ARCADE_LEAST_POPULAR',         'validate' => 'int',    'type' => 'text:3:4',       'explain' => true),
                      'most_downloaded'      => array('lang' => 'ARCADE_MOST_DOWNLOADED',      'validate' => 'int',    'type' => 'text:3:4',       'explain' => true),
                      'least_downloaded'      => array('lang' => 'ARCADE_LEAST_DOWNLOADED',      'validate' => 'int',    'type' => 'text:3:4',       'explain' => true),
                      'longest_held_scores'   => array('lang' => 'ARCADE_LONGEST_HELD_SCORES',   'validate' => 'int',    'type' => 'text:3:4',       'explain' => true),
                      'stat_items_per_page'   => array('lang' => 'ARCADE_STAT_ITEMS_PER_PAGE',   'validate' => 'int',    'type' => 'text:3:4',       'explain' => true),
                      'arcade_leaders'      => array('lang' => 'ARCADE_LEADERS',            'validate' => 'int',    'type' => 'text:3:4',       'explain' => true),
                   )
                );

             break;

             case 'path':
                $display_vars = array(
                   'title'         => 'ACP_ARCADE_SETTINGS_PATH',
                   'vars'   => array(
                      'legend1'            => 'ACP_ARCADE_SETTINGS_PROTECT',
                      'protect_amod'         => array('lang' => 'ARCADE_PROTECT_AMOD',       'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
                      'protect_ibpro'         => array('lang' => 'ARCADE_PROTECT_IBPRO',       'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
                      'protect_v3arcade'      => array('lang' => 'ARCADE_PROTECT_V3ARCADE',    'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),

                      'legend2'            => 'ACP_ARCADE_SETTINGS_PATH',
                      'game_path'            => array('lang' => 'ARCADE_GAME_PATH',         'validate' => 'path', 'type' => 'text:30:65', 'explain' => true),
                      'unpack_game_path'      => array('lang' => 'ARCADE_UNPACK_GAME_PATH',   'validate' => 'path', 'type' => 'text:30:65', 'explain' => true),
                      'image_path'         => array('lang' => 'ARCADE_IMAGE_PATH',         'validate' => 'path', 'type' => 'text:30:65', 'explain' => true),
                      'cat_image_path'      => array('lang' => 'ARCADE_CAT_IMAGE_PATH',      'validate' => 'path', 'type' => 'text:30:65', 'explain' => true),
                   )
                );

             break;

             default:
                trigger_error('NO_MODE', E_USER_ERROR);
             break;
          }

          $this->new_config = $arcade->config;
          $cfg_array = (isset($_REQUEST['config'])) ? utf8_normalize_nfc(request_var('config', array('' => ''), true)) : $this->new_config;
          $error = array();

          // We validate the complete config if whished
          validate_config_vars($display_vars['vars'], $cfg_array, $error);

          if ($update && !check_form_key($form_key))
          {
             $error[] = $user->lang['FORM_INVALID'];
          }

          // Do not write values if there is an error
          if (sizeof($error))
          {
             $update = false;
          }

          // We go through the display_vars to make sure no one is trying to set variables he/she is not allowed to...
          foreach ($display_vars['vars'] as $config_name => $null)
          {
             if (!isset($cfg_array[$config_name]) || strpos($config_name, 'legend') !== false)
             {
                continue;
             }

             $config_value = $cfg_array[$config_name];
             $this->new_config[$config_name] = $config_value;

             if ($update)
             {
                if ($config_name == 'download_list_per_page' && !in_array($config_value, array(50, 100, 200)))
                {
                   $config_value = 50;
                }

                if (in_array($config_name, array('game_path', 'unpack_game_path', 'image_path', 'cat_image_path')))
                {
                   $file_functions->append_slash($config_value);
                }

                $arcade->set_config($config_name, $config_value);
                if ($config_name  == 'jackpot_minimum')
                {
                   $arcade->reset('jackpot_minimum');
                }
             }
          }

          if ($update)
          {
             add_log('admin', 'LOG_ARCADE_' . strtoupper($mode));
             $cache->destroy('sql', ARCADE_CATS_TABLE);
             $cache->destroy('sql', ARCADE_GAMES_TABLE);
             $cache->destroy('sql', ARCADE_SCORES_TABLE);
             $cache->destroy('_arcade_all_games');
             $cache->destroy('_arcade_cats');
             $cache->destroy('_arcade_leaders');
             $cache->destroy('_arcade_leaders_all');
             trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($this->u_action));
          }

          if (isset($display_vars['lang']))
          {
             $user->add_lang($display_vars['lang']);
          }

          $this->page_title = $display_vars['title'];

          $template->assign_vars(array(
                'L_TITLE'         => $user->lang[$display_vars['title']],
                'L_TITLE_EXPLAIN'   => $user->lang[$display_vars['title'] . '_EXPLAIN'],

                'S_ERROR'         => (sizeof($error)) ? true : false,
                'ERROR_MSG'         => implode('<br />', $error),

                'U_ACTION'         => $this->u_action)
          );

          // Output relevant page
          foreach ($display_vars['vars'] as $config_key => $vars)
          {
             if (!is_array($vars) && strpos($config_key, 'legend') === false)
             {
                continue;
             }

             if (strpos($config_key, 'legend') !== false)
             {
                $template->assign_block_vars('options', array(
                   'S_LEGEND'      => true,
                   'LEGEND'      => (isset($user->lang[$vars])) ? $user->lang[$vars] : $vars)
                );

                continue;
             }

             $type = explode(':', $vars['type']);

             $l_explain = '';
             if ($vars['explain'] && isset($vars['lang_explain']))
             {
                $l_explain = (isset($user->lang[$vars['lang_explain']])) ? $user->lang[$vars['lang_explain']] : $vars['lang_explain'];
             }
             else if ($vars['explain'])
             {
                $l_explain = (isset($user->lang[$vars['lang'] . '_EXPLAIN'])) ? $user->lang[$vars['lang'] . '_EXPLAIN'] : '';
             }

             $content = build_cfg_template($type, $config_key, $this->new_config, $config_key, $vars);

             if (empty($content))
             {
                continue;
             }

             $template->assign_block_vars('options', array(
                'KEY'         => $config_key,
                'TITLE'         => (isset($user->lang[$vars['lang']])) ? $user->lang[$vars['lang']] : $vars['lang'],
                'S_EXPLAIN'      => $vars['explain'],
                'TITLE_EXPLAIN'   => $l_explain,
                'CONTENT'      => $content,
                )
             );
          }
       }

       function manage_version_check()
       {
          global $db, $user, $auth, $auth_arcade, $template, $cache, $table_prefix, $arcade;
          global $config, $phpbb_admin_path, $phpbb_root_path, $phpEx;

          $user->add_lang('install');
          $this->page_title = 'ACP_VERSION_CHECK';
          $current_version = str_replace(' ', '.', $arcade->config['version']);

          // Get current and latest version
          $errstr = '';
          $errno = 0;

          $info = get_remote_file('www.jeffrusso.net', '/updatecheck', 'phpBBArcade.txt', $errstr, $errno);

          if ($info === false)
          {
             trigger_error($errstr, E_USER_WARNING);
          }

          $info = explode("\n", $info);
          $latest_version = trim($info[0]);

          $announcement_url = trim($info[1]);
          $update_link = append_sid($phpbb_root_path . 'install/index.' . $phpEx);

          $up_to_date = (version_compare(str_replace('rc', 'RC', strtolower($current_version)), str_replace('rc', 'RC', strtolower($latest_version)), '<')) ? false : true;

          $template->assign_vars(array(
             'S_VERSION_CHECK'   => true,
             'S_UP_TO_DATE'      => $up_to_date,

             'LATEST_VERSION'   => $latest_version,
             'CURRENT_VERSION'   => $current_version,

             'UPDATE_INSTRUCTIONS'   => sprintf($user->lang['ARCADE_UPDATE_INSTRUCTIONS'], $announcement_url, $update_link),
          ));
       }

       function arcade_version()
       {
          global $arcade, $user;

          return $arcade->config['version'] . '&nbsp;&nbsp;&nbsp;<input class="button1" type="submit" id="submit" name="version_check" value="' . $user->lang['ARCADE_CHECK_UPDATES'] . '" />';
       }

       function arcade_announce_game($value, $key = '')
       {
          return make_forum_select($value, false, true, true, true, false, false);
       }

       function arcade_limit_play_select($value, $key = '')
       {
          global $user;

          return '<option value="' . LIMIT_PLAY_TYPE_NONE .'"'. (($value == LIMIT_PLAY_TYPE_NONE) ? ' selected="selected"' : '') . '>' . $user->lang['ARCADE_NONE'] . '</option><option value="' . LIMIT_PLAY_TYPE_POSTS . '"' . (($value == LIMIT_PLAY_TYPE_POSTS) ? ' selected="selected"' : '') . '>' . $user->lang['ARCADE_LIMIT_PLAY_TOTAL_POSTS'] . '</option><option value="' . LIMIT_PLAY_TYPE_DAYS . '"' . (($value == LIMIT_PLAY_TYPE_DAYS) ? ' selected="selected"' : '') . '>' . $user->lang['ARCADE_LIMIT_PLAY_POSTS'] . '</option><option value="' . LIMIT_PLAY_TYPE_BOTH . '"' . (($value == LIMIT_PLAY_TYPE_BOTH) ? ' selected="selected"' : '') . '>' . $user->lang['ARCADE_LIMIT_PLAY_BOTH'] . '</option>';
       }

       function games_sort_order_select($value, $key = '')
       {
          global $user;

          return '<option value="' . ARCADE_ORDER_FIXED .'"'. (($value == ARCADE_ORDER_FIXED) ? ' selected="selected"' : '') . '>' . $user->lang['ARCADE_GAMES_SORT_FIXED'] . '</option><option value="' . ARCADE_ORDER_INSTALLDATE .'"'. (($value == ARCADE_ORDER_INSTALLDATE) ? ' selected="selected"' : '') . '>' . $user->lang['ARCADE_GAMES_SORT_INSTALLDATE'] . '</option><option value="' . ARCADE_ORDER_NAME . '"' . (($value == ARCADE_ORDER_NAME) ? ' selected="selected"' : '') . '>' . $user->lang['ARCADE_GAMES_SORT_NAME'] . '</option><option value="' . ARCADE_ORDER_PLAYS . '"' . (($value == ARCADE_ORDER_PLAYS) ? ' selected="selected"' : '') . '>' . $user->lang['ARCADE_GAMES_SORT_PLAYS'] . '</option><option value="' . ARCADE_ORDER_RATING . '"' . (($value == ARCADE_ORDER_RATING) ? ' selected="selected"' : '') . '>' . $user->lang['ARCADE_GAMES_SORT_RATING'] . '</option>';
       }

       function games_sort_dir_select($value, $key = '')
       {
          global $user;

          return '<option value="' . ARCADE_ORDER_ASC . '"' . (($value == ARCADE_ORDER_ASC) ? ' selected="selected"' : '') . '>' . $user->lang['ASCENDING'] . '</option><option value="' . ARCADE_ORDER_DESC . '"' . (($value == ARCADE_ORDER_DESC) ? ' selected="selected"' : '') . '>' . $user->lang['DESCENDING'] . '</option>';
       }

       function download_list_per_page_select($value, $key = '')
       {
          global $user;

          return '<option value="50"' . (($value == 50) ? ' selected="selected"' : '') . '>50</option><option value="100"' . (($value == 100) ? ' selected="selected"' : '') . '>100</option><option value="200"' . (($value == 200) ? ' selected="selected"' : '') . '>200</option>';
       }

       function cm_currency_select($value, $key = '')
       {
          global $user, $cash;

          return $cash->get_currencies($value, true);
       }

       function points_detect($value, $key)
       {
          global $arcade, $user;

          $point_status = ($arcade->points['enabled']) ? 'ENABLED': 'DISABLED';
          $detect = '';
          switch($arcade->points['type'])
          {
             case CASH_MOD:
                $detect = sprintf($user->lang['ARCADE_POINTS_DETECT_' . $point_status], $user->lang['ARCADE_CASH_MOD']);
             break;

             case POINTS_SYSTEM:
                $detect = sprintf($user->lang['ARCADE_POINTS_DETECT_' . $point_status], $user->lang['ARCADE_POINTS_SYSTEM']);
             break;

             case SIMPLE_POINTS_SYSTEM:
                $detect = sprintf($user->lang['ARCADE_POINTS_DETECT_' . $point_status], $user->lang['ARCADE_SIMPLE_POINTS_SYSTEM']);
             break;

             case ULTIMATE_POINTS_SYSTEM:
                $detect = sprintf($user->lang['ARCADE_POINTS_DETECT_' . $point_status], $user->lang['ARCADE_ULTIMATE_POINTS_SYSTEM']);
             break;

             default:
             break;
          }

          $radio_ary = array(1 => 'YES', 0 => 'NO');
          return $detect . '<br />' . h_radio('config[use_points]', $radio_ary, $value);
       }

       /**
       * Arcade disable option and message
       */
       function arcade_disable($value, $key)
       {
          global $user;

          $radio_ary = array(1 => 'YES', 0 => 'NO');

          return h_radio('config[arcade_disable]', $radio_ary, $value) . '<br /><input id="' . $key . '" type="text" name="config[arcade_disable_msg]" maxlength="255" size="40" value="' . $this->new_config['arcade_disable_msg'] . '" />';
       }


    }
    ?>

DonGrif
Registered User
Posts: 1
Joined: Sun Feb 21, 2010 2:34 pm

Re: Ultimate Points

Post by DonGrif » Sun Feb 21, 2010 2:36 pm

Hello.
I have a question: can I use UP to have my members get point for voting in polls only?

User avatar
Wuerzi
Registered User
Posts: 60
Joined: Fri Aug 15, 2008 11:38 pm
Location: Germany/Würzburg
Contact:

Re: Ultimate Points

Post by Wuerzi » Sun Feb 21, 2010 3:31 pm

Ok again, only for you... :?

This have nothing todo with Ultimate Points :?

Check your lang files from the Arcade Mod!
Have you as lang english or a other lang? :?
I think the files are not for the newest Arcade Version :roll:

User avatar
spyro567
Registered User
Posts: 207
Joined: Wed Feb 17, 2010 8:43 pm
Contact:

Re: Ultimate Points

Post by spyro567 » Sun Feb 21, 2010 7:21 pm

SELECT ALL
Support Request Template
What version of phpBB are you using? phpBB 3.0.6
What is your board's URL? http://www.darkspyroandcynder.net/
Who do you host your board with? host gator
How did you install your board? Someone else installed my board for me
Is your board a fresh install or a conversion? Fresh Install
Do you have any MODs installed? No
Is registration required to reproduce this issue? No
What styles do you currently have installed? etech
What language(s) is your board currently using? english
Which database type/version are you using? I Don't Know
What is your level of experience? New to PHP and phpBB
When did your problem begin? No answer given
Please describe your problem. installing ultimate points
Generated by SRT Generator ($Rev: 3603 $)

gennyna
Registered User
Posts: 72
Joined: Mon Apr 06, 2009 7:29 pm

Re: Ultimate Points

Post by gennyna » Sun Feb 21, 2010 8:25 pm

Ok again, only for you... :?

This have nothing todo with Ultimate Points :?

Check your lang files from the Arcade Mod!
Have you as lang english or a other lang? :?
I think the files are not for the newest Arcade Version :roll:
so I have to check if you have made all changes to the language file for the arcade mod ?

User avatar
keith10456
Registered User
Posts: 2315
Joined: Thu Feb 24, 2005 6:55 pm
Contact:

Re: Ultimate Points

Post by keith10456 » Sun Feb 21, 2010 9:50 pm

gennyna wrote:
Ok again, only for you... :?

This have nothing todo with Ultimate Points :?

Check your lang files from the Arcade Mod!
Have you as lang english or a other lang? :?
I think the files are not for the newest Arcade Version :roll:
so I have to check if you have made all changes to the language file for the arcade mod ?
The Arcade Mod automatically detects the UPM.

Double-check each of your file edits and check your language files (especially if you are using a different language from the default).

gennyna
Registered User
Posts: 72
Joined: Mon Apr 06, 2009 7:29 pm

Re: Ultimate Points

Post by gennyna » Sun Feb 21, 2010 10:46 pm

I will use the Italian translation for this mod. . allgare if I have some files because if I put tell me which hand I'm just doing my troubles forum

Locked

Return to “[3.0.x] MOD Database Releases”

cron