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.
jakk
Registered User
Posts: 31
Joined: Sun Jun 21, 2009 4:03 am

Re: Ultimate Points

Post by jakk »

hello, is there any way to display the winner of the lottery in the points statistics on board index?
ivemfinity.com | mundoforeros.com | support team member phpbb-es.com (Soporte en español)
Jamiee™
Registered User
Posts: 24
Joined: Tue Dec 15, 2009 11:33 am

Error:

Post by Jamiee™ »

I get this error (SQL):

Code: Select all

SQL ERROR [ mysql4 ]

Table 'web121-a-forum-5.POINTS_CONFIG_TABLE' doesn't exist [1146]

SQL

SELECT config_name, config_value FROM (POINTS_CONFIG_TABLE c)

BACKTRACE


FILE: includes/db/mysql.php
LINE: 174
CALL: dbal_mysql->sql_error()

FILE: includes/acp/acp_points.php
LINE: 38
CALL: dbal_mysql->sql_query()

FILE: includes/functions_module.php
LINE: 507
CALL: acp_points->main()

FILE: adm/index.php
LINE: 75
CALL: p_master->load_active()

Image

What do i need to do to fix it?

Thanks in advance.
User avatar
darkonia
Registered User
Posts: 1901
Joined: Tue May 13, 2008 1:10 pm
Location: Munich, Germany

Re: Ultimate Points

Post by darkonia »

you dont made the mysql edits in your database.
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.
wolfman24
Registered User
Posts: 387
Joined: Tue Mar 07, 2006 12:07 pm

Re: Ultimate Points

Post by wolfman24 »

darkonia wrote:you dont made the mysql edits in your database.
Wrong, the table name is never ending with TABLE (like POINTS_CONFIG_TABLE in this case) the table name ist like points_config. Also the upper case is typically for constants. So this error is mainly because you are missing the edits to the includes/constants.php.
User avatar
wang5555
Translator
Posts: 625
Joined: Wed Oct 27, 2004 2:57 pm
Location: Taiwan

Re: Ultimate Points

Post by wang5555 »

jakk wrote:hello, is there any way to display the winner of the lottery in the points statistics on board index?
If you have installed the Board3 Portal, refer this file following in the mod package:
  • contrib/AddOns/Board3_Portal_AddOns/Lottery_Block/install.xml
It is more blessed to give than to reveive, good luck! ^_^
Welcome to my forum
https://wang5555.dnsfor.me/phpBB3/
User avatar
darkonia
Registered User
Posts: 1901
Joined: Tue May 13, 2008 1:10 pm
Location: Munich, Germany

Re: Ultimate Points

Post by darkonia »

wolfman24 wrote:
darkonia wrote:you dont made the mysql edits in your database.
Wrong, the table name is never ending with TABLE (like POINTS_CONFIG_TABLE in this case) the table name ist like points_config. Also the upper case is typically for constants. So this error is mainly because you are missing the edits to the includes/constants.php.
yepp you´re right :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
RiddlerAskingRiddles
Registered User
Posts: 50
Joined: Mon Dec 29, 2003 4:10 pm

Re: Ultimate Points

Post by RiddlerAskingRiddles »

Good day,

I've installed the mod on my test site which went well but when installing it one my main forum
I run across this complication :

Code: Select all

Parse error: syntax error, unexpected T_DOUBLE_ARROW in /hermes/bosweb/web110/b1106/ipg.polxiccom/forum/posting.php on line 1186
Now the difference with the 2 forums is that on my main site I've got the
Arcade installed so the two
together may be coursing this, any suggestions ? And I don't know what I should be looking for in the
posting.php so any suggestions would be great, thanks.

And this is what I get when I click on the forums button in the admin panel

Code: Select all

Parse error: syntax error, unexpected T_DOUBLE_ARROW in /hermes/bosweb/web110/b1106/ipg.polxiccom/forum/includes/acp/acp_forums.php on line 153
femu
Registered User
Posts: 1070
Joined: Tue Sep 27, 2005 10:03 am

Re: Ultimate Points

Post by femu »

RiddlerAskingRiddles wrote:Good day,

I've installed the mod on my test site which went well but when installing it one my main forum
I run across this complication :

Code: Select all

Parse error: syntax error, unexpected T_DOUBLE_ARROW in /hermes/bosweb/web110/b1106/ipg.polxiccom/forum/posting.php on line 1186
Now the difference with the 2 forums is that on my main site I've got the
Arcade installed so the two
together may be coursing this, any suggestions ? And I don't know what I should be looking for in the
posting.php so any suggestions would be great, thanks.

And this is what I get when I click on the forums button in the admin panel

Code: Select all

Parse error: syntax error, unexpected T_DOUBLE_ARROW in /hermes/bosweb/web110/b1106/ipg.polxiccom/forum/includes/acp/acp_forums.php on line 153
Has definitly nothing to do with the Arcade. So both errors are surely coming from wrong edits. Please check the search/find places very carefully again, where you inserted the code of UPS.

So every bracket and before/after are important!
Regards, femu
_____________________________________________
[My development page] - [My normal homepage (German only)]
User avatar
RiddlerAskingRiddles
Registered User
Posts: 50
Joined: Mon Dec 29, 2003 4:10 pm

Re: Ultimate Points

Post by RiddlerAskingRiddles »

Well I went over it and was not able to tell if anything was wrong, so what I did was copy the posting.php
from my test site to my main site, that fixed the posting problem, now I can post which is great
just the "forums" tab in the admin panel is not working yet,

Code: Select all

Parse error: syntax error, unexpected T_DOUBLE_ARROW in /hermes/bosweb/web110/b1106/ipg.polxiccom/forum/includes/acp/acp_forums.php on line 153
which is strange. I'll go over it again
but I am not really sure as to what I should look for p=

Well I'll update you on how it's going as soon as I know more.

Antek



EDIT : Alright not sure what this means but I'd think it better to let you know, when i open
posting.php it gives me on line 153 :
147}
148 break;
149
150 default:
151 $sql = '';
152 break;
153}

Now I've tried adding a { on line 149 but that just messes up the posting again, also if I remove the } on line
153 it messes it up again and gives me a new error on a new line which is obvious. So yes
there is a mistake there somewhere, I am guessing only on thing that is missing but I really don't know where
to put it.
User avatar
RiddlerAskingRiddles
Registered User
Posts: 50
Joined: Mon Dec 29, 2003 4:10 pm

Re: Ultimate Points

Post by RiddlerAskingRiddles »

Holy hell, I can't belief it myself but it seems I've fixed it lol, the problem with acp_forums.php was
that I did not include the new coding for the points mod in the ); lol


But thanks a lot for the advice, took me some time to understand but I got there in the end which
helps a lot xD
jakk
Registered User
Posts: 31
Joined: Sun Jun 21, 2009 4:03 am

Re: Ultimate Points

Post by jakk »

wang5555 wrote:
jakk wrote:hello, is there any way to display the winner of the lottery in the points statistics on board index?
If you have installed the Board3 Portal, refer this file following in the mod package:
  • contrib/AddOns/Board3_Portal_AddOns/Lottery_Block/install.xml
yes, i have installed board3 portal and lottery block , but I want is to leave in a single line in the index... it's posible?
ivemfinity.com | mundoforeros.com | support team member phpbb-es.com (Soporte en español)
User avatar
Dangerell
Registered User
Posts: 89
Joined: Mon Oct 13, 2008 7:05 am
Location: Romania
Name: Cristi

Re: Ultimate Points

Post by Dangerell »

Hi femu,

Today i accidentally found a problem.. it seems that if a user has negative points... he cant see the attachments no more, how do i fix this ? cause in my forum i use negative values too. If i try to view image it says "You don't have enough points to download this attachment." and in admin panel attachments are set to 0 (zero).. so from what is says there, they should be disabled.

My question is why do attachments still ask for points (when they have negative values) if i disabled them and how to fix this?

Thanks in advance.
User avatar
Cr33per
Registered User
Posts: 366
Joined: Mon Aug 13, 2007 6:29 pm
Location: Illinois

Re: Ultimate Points

Post by Cr33per »

jakk wrote:
wang5555 wrote:
jakk wrote:hello, is there any way to display the winner of the lottery in the points statistics on board index?
If you have installed the Board3 Portal, refer this file following in the mod package:
  • contrib/AddOns/Board3_Portal_AddOns/Lottery_Block/install.xml
yes, i have installed board3 portal and lottery block , but I want is to leave in a single line in the index... it's posible?
If your looking do do something like i did i think i can help you.
Check out my index page.
http://www.clan33.net/forums/index.php
User avatar
Yukan
Registered User
Posts: 155
Joined: Mon Aug 27, 2007 5:06 pm
Location: http://localhost/

Re: Ultimate Points

Post by Yukan »

Cr33per wrote:
jakk wrote:
wang5555 wrote:
jakk wrote:hello, is there any way to display the winner of the lottery in the points statistics on board index?
If you have installed the Board3 Portal, refer this file following in the mod package:
  • contrib/AddOns/Board3_Portal_AddOns/Lottery_Block/install.xml
yes, i have installed board3 portal and lottery block , but I want is to leave in a single line in the index... it's posible?
If your looking do do something like i did i think i can help you.
Check out my index page.
http://www.clan33.net/forums/index.php
Actually, I'd love to know how ya did that. I could probably figure it out if i spent enough time looking through the code but... Why reinvent the wheel when I can ask for the instructions, right? lol
User avatar
Cr33per
Registered User
Posts: 366
Joined: Mon Aug 13, 2007 6:29 pm
Location: Illinois

Re: Ultimate Points

Post by Cr33per »

I'm not sure this is the best way but it works.

Open: root/index.php
Find:

Code: Select all

	// Run Lottery
	if ( $points_values['lottery_draw_period'] != 0 && $points_values['lottery_last_draw_time'] + $points_values['lottery_draw_period'] - time() < 0 )
	{
		if (!function_exists('run_lottery'))
		{
			include($phpbb_root_path . 'includes/points/functions_points.' . $phpEx);
		}
		if (!function_exists('send_pm'))
		{
			include($phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx);
		}
		run_lottery();
	}

	$template->assign_vars(array(
		'TOTAL_BANK_USER'			=> sprintf($user->lang['POINTS_BUPOINTS_TOTAL'], $bankusers, $points_values['bank_name']),
		'TOTAL_BANK_POINTS'			=> sprintf($user->lang['POINTS_BPOINTS_TOTAL'], number_format_points($bankholdings), $config['points_name'], $points_values['bank_name']),
		'TOTAL_POINTS_USER'			=> sprintf($user->lang['POINTS_TOTAL'], number_format_points($totalpoints), $config['points_name']),
		'LOTTERY_TIME'				=> sprintf($user->lang['POINTS_LOTTERY_TIME'], $lottery_time),
		'S_DISPLAY_LOTTERY'			=> ($points_config['display_lottery_stats']) ? true : false,
		'S_DISPLAY_POINTS_STATS'	=> ($points_config['stats_enable']) ? true : false,
		'S_DISPLAY_INDEX'			=> ($points_values['number_show_top_points'] > 0) ? true : false,
	));
}
Add After:

Code: Select all

// Set variables
$no_of_tickets = $no_of_players = $last_winner = $last_winner_id = '';

// Read out the config data
$sql_array = array(
	'SELECT'    => 'config_name, config_value',
	'FROM'      => array(
		POINTS_CONFIG_TABLE => 'c',
	),
);
$sql = $db->sql_build_query('SELECT', $sql_array);
$result = $db->sql_query($sql);

while ($row = $db->sql_fetchrow($result))
{
	$points_config[$row['config_name']] = $row['config_value'];
}
$db->sql_freeresult($result);

// Read out values data
$sql_array = array(
	'SELECT'    => '*',
	'FROM'      => array(
		POINTS_VALUES_TABLE => 'v',
	),
);
$sql = $db->sql_build_query('SELECT', $sql_array);
$result = $db->sql_query($sql);
$points_values = $db->sql_fetchrow($result);
$db->sql_freeresult($result);

// Select the total number of tickets
$sql_array = array(
	'SELECT'    => 'COUNT(ticket_id) AS number_of_tickets',
	'FROM'      => array(
		POINTS_LOTTERY_TICKETS_TABLE => 't',
	),
);
$sql = $db->sql_build_query('SELECT', $sql_array);
$result = $db->sql_query($sql);
$no_of_tickets = $db->sql_fetchfield('number_of_tickets');
$db->sql_freeresult($result);

// Select the total number of players
$sql_ary = array(
    'SELECT'    => 'user_id',
    'FROM'      => array(
        POINTS_LOTTERY_TICKETS_TABLE     => 't',
    ),
);
$sql = $db->sql_build_query('SELECT_DISTINCT', $sql_ary);
$result = $db->sql_query($sql);
$no_of_players = 0;
while ($row = $db->sql_fetchrow($result))
{
   $no_of_players += 1;
}
$db->sql_freeresult($result);

// Select the last winner id
$sql_array = array(
    'SELECT'    => 'user_id',
    'FROM'      => array(
        POINTS_LOTTERY_HISTORY_TABLE  => 'h',
    ),
    'ORDER_BY'  => 'id DESC'
);
$sql = $db->sql_build_query('SELECT', $sql_array);
$result = $db->sql_query_limit($sql, 1);
$last_winner_id = $db->sql_fetchfield('user_id');
$db->sql_freeresult($result);

// Check, if a user won or nobody
if ( $last_winner_id != 0 )
{
	// Select the usernames from the user table to reflect user colors
	$sql_array = array(
	    'SELECT'    => 'u.user_id, u.username, u.user_colour, l.id',

	    'FROM'      => array(
	        USERS_TABLE	=> 'u',
	    ),
	    'LEFT_JOIN' => array(
	        array(
	            'FROM'  => array(POINTS_LOTTERY_HISTORY_TABLE => 'l'),
	            'ON'    => 'u.user_id = l.user_id'
	        )
	    ),
	    'ORDER_BY'  => 'l.id DESC'
	);
	$sql = $db->sql_build_query('SELECT', $sql_array);
	$result = $db->sql_query_limit($sql, 1);
	$row = $db->sql_fetchrow($result);

	$winner_name = get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']);
}
else
{
	$winner_name = $user->lang['LOTTERY_NO_WINNER'];
}

// Send everything to the template
$template->assign_vars(array(
   'LAST_WINNER'       	=> $winner_name,
   'NO_OF_TICKETS'      => $no_of_tickets,
   'NO_OF_PLAYERS'      => $no_of_players,
   'JACKPOT'             => sprintf(number_format_points($points_values['lottery_jackpot']), $config['points_name']),
   'CASH_NAME'       	=> $config['points_name'],
   'NEXT_DRAWING'		=> $user->format_date($points_values['lottery_last_draw_time'] + $points_values['lottery_draw_period']),
   'S_DRAWING_ENABLED'	=> ($points_values['lottery_draw_period']) ? true : false,
   'U_LOTTERY'			=> append_sid("{$phpbb_root_path}points.$phpEx", 'mode=lottery'),
));
Open: root/prosilver/templates/index_body.html
Find:

Code: Select all

<!-- Start Ultimate Points -->
<!-- IF S_DISPLAY_POINTS_STATS -->
<h3>{L_POINTS_STATISTICS}</h3>
<p>{TOTAL_POINTS_USER} &bull; {TOTAL_BANK_USER} &bull; {TOTAL_BANK_POINTS} <!-- IF S_DISPLAY_LOTTERY--> &bull; {LOTTERY_TIME} <!-- ENDIF --></p>

<!-- IF S_DISPLAY_INDEX -->
<h3>{L_POINTS_MOST_RICH_USERS}</h3>
<p><!-- BEGIN rich_user --><!-- IF not rich_user.S_FIRST_ROW --> &bull; <!-- ENDIF -->{rich_user.USERNAME} ({rich_user.SUM_POINTS} {rich_user.SUM_POINTS_NAME})<!-- END rich_user --></p>
<!-- ENDIF -->
<!-- ENDIF -->
<!-- End Ultimate Points -->
Replace With:

Code: Select all

<!-- Start Ultimate Points -->
<!-- IF S_DISPLAY_POINTS_STATS -->
<h3>{L_POINTS_STATISTICS}</h3>
<p>{TOTAL_POINTS_USER} &bull; {TOTAL_BANK_USER} &bull; {TOTAL_BANK_POINTS} <!-- IF S_DISPLAY_LOTTERY--> &bull; {LOTTERY_TIME}<!-- ENDIF --></p>

<!-- IF S_DISPLAY_LOTTERY-->
<!-- IF U_LOTTERY --><h3><a href="{U_LOTTERY}">{L_LOTTERY_TITLE}</a></h3><!-- ELSE --><h3>{L_LOTTERY_TITLE}</h3><!-- ENDIF -->
<p>{L_LOTTERY_LAST_WINNER}: <strong>{LAST_WINNER}</strong> &bull; {L_LOTTERY_JACKPOT}: <strong>{JACKPOT}</strong> {CASH_NAME} &bull; {L_LOTTERY_PLAYERS}: <strong>{NO_OF_PLAYERS}</strong> &bull; {L_LOTTERY_TICKETS}: <strong>{NO_OF_TICKETS}</strong> &bull; <a href="{U_LOTTERY}">{L_LOTTERY_GOTO}</a></p>
<!-- ENDIF -->

<!-- IF S_DISPLAY_INDEX -->
<h3>{L_POINTS_MOST_RICH_USERS}</h3>
<p><!-- BEGIN rich_user --><!-- IF not rich_user.S_FIRST_ROW --> &bull; <!-- ENDIF -->{rich_user.USERNAME} ({rich_user.SUM_POINTS} {rich_user.SUM_POINTS_NAME})<!-- END rich_user --></p>
<!-- ENDIF -->
<!-- ENDIF -->
<!-- End Ultimate Points -->
Refresh your templates & cache
If you want POINTS_STATISTICS bold you will need to do that in the language/en/mods/points.php
If your using subsilver2 you will need to let me see your index_body.html

Edit: 10:26 pm
Changed the replace with code to have the lottery link also.
Last edited by Cr33per on Sun Jan 31, 2010 4:23 pm, edited 3 times in total.

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