[2.0.18] Cash Mod

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

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
1036
66%
Very Good
239
15%
Good
121
8%
Fair
36
2%
Poor
126
8%
 
Total votes: 1558

Soth
Registered User
Posts: 29
Joined: Wed Dec 10, 2003 11:42 pm
Contact:

Post by Soth » Thu Dec 11, 2003 3:44 am

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

Xore
Former Team Member
Posts: 2594
Joined: Wed Apr 16, 2003 7:42 pm
Location: the wastelands between insomnia and clairvoyance
Contact:

Post by Xore » Thu Dec 11, 2003 5:54 am

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
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod

Soth
Registered User
Posts: 29
Joined: Wed Dec 10, 2003 11:42 pm
Contact:

Post by Soth » Thu Dec 11, 2003 6:03 am

okay, ill upgrade to 2.2.1

zingysaturn
Registered User
Posts: 13
Joined: Wed Nov 19, 2003 6:29 am

Uninstall!!

Post by zingysaturn » Thu Dec 11, 2003 6:32 am

How do i uninstall Store Mod without destroying all my other mods? :P


-Zingysaturn

Xore
Former Team Member
Posts: 2594
Joined: Wed Apr 16, 2003 7:42 pm
Location: the wastelands between insomnia and clairvoyance
Contact:

Re: Uninstall!!

Post by Xore » Thu Dec 11, 2003 7:44 am

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?
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod

Finalturismo
I've Been Banned!
Posts: 5
Joined: Fri Dec 05, 2003 12:54 am
Location: dallas(d town)
Contact:

Post by Finalturismo » Thu Dec 11, 2003 2:03 pm

i need lotto mod for cash add on
finalturismo-check out my forums at www.hotforums.tk iam looking for traffic and memebers so help me out. its a good place to chat about games, such as unreal 2,ut2003 and more!

shi
Registered User
Posts: 58
Joined: Fri Sep 12, 2003 7:14 am
Location: Shanghai, China
Contact:

I don't know if this has been fixed.

Post by shi » Thu Dec 11, 2003 2:47 pm

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.)

Xore
Former Team Member
Posts: 2594
Joined: Wed Apr 16, 2003 7:42 pm
Location: the wastelands between insomnia and clairvoyance
Contact:

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

Post by Xore » Thu Dec 11, 2003 10:34 pm

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);
}
Last edited by Xore on Thu Dec 11, 2003 11:31 pm, edited 1 time in total.
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod

User avatar
TimeVirus
Registered User
Posts: 125
Joined: Sat Jul 12, 2003 12:17 am

Post by TimeVirus » Thu Dec 11, 2003 10:56 pm

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
Last edited by TimeVirus on Thu Dec 11, 2003 11:54 pm, edited 1 time in total.
I'm probably wrong again...

User avatar
Alias2345
Registered User
Posts: 19
Joined: Tue Dec 09, 2003 4:34 am

Post by Alias2345 » Thu Dec 11, 2003 11:31 pm

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

Xore
Former Team Member
Posts: 2594
Joined: Wed Apr 16, 2003 7:42 pm
Location: the wastelands between insomnia and clairvoyance
Contact:

Post by Xore » Thu Dec 11, 2003 11:32 pm

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.
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod

Xore
Former Team Member
Posts: 2594
Joined: Wed Apr 16, 2003 7:42 pm
Location: the wastelands between insomnia and clairvoyance
Contact:

Post by Xore » Thu Dec 11, 2003 11:39 pm

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?
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod

User avatar
Alias2345
Registered User
Posts: 19
Joined: Tue Dec 09, 2003 4:34 am

Post by Alias2345 » Thu Dec 11, 2003 11:52 pm

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 :(

Xore
Former Team Member
Posts: 2594
Joined: Wed Apr 16, 2003 7:42 pm
Location: the wastelands between insomnia and clairvoyance
Contact:

Post by Xore » Fri Dec 12, 2003 12:04 am

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
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod

User avatar
Alias2345
Registered User
Posts: 19
Joined: Tue Dec 09, 2003 4:34 am

Post by Alias2345 » Fri Dec 12, 2003 12:19 am

lol so how do i fix it??
http://www.rap-legends.com
Home Of The Illest Emcees.........

Post Reply

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