Page 141 of 798

Posted: Thu Dec 11, 2003 3:44 am
by Soth
okay, in checking more carefully what the heck i did wrong, i see i posted in error. The sql table i was trying to install is :

INSERT INTO phpbb_config (config_name, config_value) VALUES
('cash_disable',0),
('cash_display_after_posts',1),
('cash_post_message','You earned %s for that post'),
('cash_disable_spam_num',10),
('cash_disable_spam_time',24),
('cash_disable_spam_message','You have exceeded the alloted amount of posts and will not earn anything for your post'),
('cash_installed','yes'),
('cash_version','2.0.0'),
('points_name','Points')



this is the error that i get when i run that:

SQL-query :

INSERT INTO phpbb_config( config_name, config_value )
VALUES (

'cash_disable', 0
), (
'cash_display_after_posts', 1
), (
'cash_post_message', 'You earned %s for that post'
), (
'cash_disable_spam_num', 10
), (
'cash_disable_spam_time', 24
), (
'cash_disable_spam_message', 'You have exceeded the alloted amount of posts and will not earn anything for your post'
), (
'cash_installed', 'yes'
), (
'cash_version', '2.0.0'
), (
'points_name', 'Points'
)

MySQL said:


Table 'elite_nuke69.phpbb_config' doesn't exist

Posted: Thu Dec 11, 2003 5:54 am
by Xore
Soth wrote:
('cash_version','2.0.0'),


...

wtf?

O_o ;;

um.

sorry, i'm no longer supporting versions of cash mod previous to version 2.2.1

Posted: Thu Dec 11, 2003 6:03 am
by Soth
okay, ill upgrade to 2.2.1

Uninstall!!

Posted: Thu Dec 11, 2003 6:32 am
by zingysaturn
How do i uninstall Store Mod without destroying all my other mods? :P


-Zingysaturn

Re: Uninstall!!

Posted: Thu Dec 11, 2003 7:44 am
by Xore
zingysaturn wrote: How do i uninstall Store Mod without destroying all my other mods? :P


-Zingysaturn


what does this have to do with Cash Mod?

Posted: Thu Dec 11, 2003 2:03 pm
by Finalturismo
i need lotto mod for cash add on

I don't know if this has been fixed.

Posted: Thu Dec 11, 2003 2:47 pm
by shi
I've searched for more than an hour before posting. And then I decided to post since nothing was found. If it has been fixed I'd like to say sorry.

My friend told me a bug with Cash MOD 2.2.1. The issues was experienced during exchanging. The amount of each currency displayed on the exchanging page won't be updated after submiting. Actually the database has been updated at that moment, but user may think there's something wrong and then press refresh. The result is another exchanging was proceeded. I read the codes and did some change for it.

Code: Select all

#
#-----[ OPEN ]------------------------------------------
#
cash.php

#
#-----[ FIND ]------------------------------------------
#
$exchanger->give_by_id_array(array($c_cur_to->id() => $converted_amount));

#
#-----[ AFTER, ADD ]------------------------------------------
#
$userdata[$c_cur_from->db()] = $exchanger->amount($from_id); 
$userdata[$c_cur_to->db()] = $exchanger->amount($to_id);
If you have the same problem, try it. And I hope to get Xore's validating.

There's one more question about the different version of cash mod since version 2.0. I'm trying to make my mod Advanced Hide Post supporting cash mod better. The following is my guess:
  • For all versions like 2.0.x
    • The field cash_enabled in cash table is used to control enabling or disabling the currency.
    • The currency settings are done in admin_cash_settings.php
  • For all versions like 2.2.x
    • The lowest bit of the field cash_settings in cash table to control enabling or disabling the currency.
    • The currency settings are done in cash_settings.php
Am I right? Is there any other version disobey the rules? (Seems version 2.1.x have never been mentioned.)

Re: I don't know if this has been fixed.

Posted: Thu Dec 11, 2003 10:34 pm
by Xore
shi wrote: I've searched for more than an hour before posting. And then I decided to post since nothing was found. If it has been fixed I'd like to say sorry.

My friend told me a bug with Cash MOD 2.2.1. The issues was experienced during exchanging. The amount of each currency displayed on the exchanging page won't be updated after submiting. Actually the database has been updated at that moment, but user may think there's something wrong and then press refresh. The result is another exchanging was proceeded. I read the codes and did some change for it.

Code: Select all

#
#-----[ OPEN ]------------------------------------------
#
cash.php

#
#-----[ FIND ]------------------------------------------
#
$exchanger->give_by_id_array(array($c_cur_to->id() => $converted_amount));

#
#-----[ AFTER, ADD ]------------------------------------------
#
$userdata[$c_cur_from->db()] = $exchanger->amount($from_id); 
$userdata[$c_cur_to->db()] = $exchanger->amount($to_id);
If you have the same problem, try it. And I hope to get Xore's validating.


Good call. the mistake i made was this line:

Code: Select all

			$headercash = $c_cur->display($userdata[$c_cur->db()]);
which should have been

Code: Select all

			$headercash = $c_cur->display($exchanger->amount($c_cur->id()));
In addition, the line

Code: Select all

				$exchanger = new cash_user($userdata['user_id'],$userdata);
should be about 21 lines higher, just before

Code: Select all

		if ( isset($HTTP_POST_VARS['exchange']) &&
Your solution works equally well as this.
There's one more question about the different version of cash mod since version 2.0. I'm trying to make my mod Advanced Hide Post supporting cash mod better. The following is my guess:
  • For all versions like 2.0.x
    • The field cash_enabled in cash table is used to control enabling or disabling the currency.
    • The currency settings are done in admin_cash_settings.php
  • For all versions like 2.2.x
    • The lowest bit of the field cash_settings in cash table to control enabling or disabling the currency.
    • The currency settings are done in cash_settings.php
Am I right? Is there any other version disobey the rules? (Seems version 2.1.x have never been mentioned.)


2.1.x was a development version and never was released. (just like 2.3.x) In 2.2.x, you have the right idea. This is most easily determined by iterating through the list of enabled currencies:
while($c_cur = &$cash->currency_next($cm_i,CURRENCY_ENABLED) ) {}

or just iterating through them all and testing whether it's enabled inside...

while ($c_cur = &$cash->currency_next($cm_i) )
{
$enabled = $c_cur->mask(CURRENCY_ENABLED);
}

Posted: Thu Dec 11, 2003 10:56 pm
by TimeVirus
Xore, I was just trying your new line mentioned above for the exchange headers to update and I get this error from it:

Code: Select all

Fatal error: Call to a member function on a non-object in /home/mysite/public_html/forum/cash.php on line 563
Is there another step as well?

I will use Shi's fix if you say it's ok to, but I didnt want to confuse myself later applying new updates or something like that by using a fix you didn't consider standard.


Edit: Thanks, works great now. :D

Posted: Thu Dec 11, 2003 11:31 pm
by Alias2345
i get following errors:(

Fatal error: Class template_plus: Cannot inherit from undefined class template in /home/rlrl/domains/rap-legends.com/public_html/battleboard/includes/classes_cash.php on line 40

Fatal error: Call to a member function on a non-object in /home/rlrl/domains/rap-legends.com/public_html/battleboard/includes/functions_cash.php on line 655

Posted: Thu Dec 11, 2003 11:32 pm
by Xore
TimeVirus wrote: Xore, I was just trying your new line mentioned above for the exchange headers to update and I get this error from it:

Code: Select all

Fatal error: Call to a member function on a non-object in /home/mysite/public_html/forum/cash.php on line 563
Is there another step as well?

I will use Shi's fix if you say it's ok to, but I didnt want to confuse myself later applying new updates or something like that by using a fix you didn't consider standard.


I just updated the above post. I missed a detail. Alternatively, Shi's fix should be sufficient.

Posted: Thu Dec 11, 2003 11:39 pm
by Xore
Alias2345 wrote: i get following errors:(

Fatal error: Class template_plus: Cannot inherit from undefined class template in /home/rlrl/domains/rap-legends.com/public_html/battleboard/includes/classes_cash.php on line 40

Fatal error: Call to a member function on a non-object in /home/rlrl/domains/rap-legends.com/public_html/battleboard/includes/functions_cash.php on line 655


This probably has one or two causes:

either you're using a non-standard template class, ie, are using a template system different from the default phpbb system, or you included functions_cash.php in common.php before template.php

Do you know which is the case?

Posted: Thu Dec 11, 2003 11:52 pm
by Alias2345
this how i installed it!
i uploaded everything first then started the sql install
then i started the php code

everything was successful then after i finished the phpingcode i got the fatal error :(

Posted: Fri Dec 12, 2003 12:04 am
by Xore
Alias2345 wrote: this how i installed it!
i uploaded everything first then started the sql install
then i started the php code

everything was successful then after i finished the phpingcode i got the fatal error :(


Congratulations on answering my question

Posted: Fri Dec 12, 2003 12:19 am
by Alias2345
lol so how do i fix it??