[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

Blisk
Registered User
Posts: 270
Joined: Wed Aug 20, 2003 10:43 am
Location: Slovenia

Post by Blisk » Thu Dec 14, 2006 9:49 pm

Brf wrote:
Blisk wrote: NO I get no error, just no nothing.

By "no nothing", do you mean you are getting a blank page, or a good page without cash?

Do you have the proper edits to profile.php, usercp_viewprofile.php, and profile_view_body.tpl?

I feel like I am a broken record. I fix someone with viewprofile at least every two pages....
And have you a clue why now cash mod wors when I move down this line?


No. Were you receiving an error before? You said something about a ajax mod? There might have been a conflict.


About that repairment I will check it.
files are moded ok, but this never works even in plain (not moded) forum.

About there is error in http log, about globals it is conflict with ajax mod because deleting doesn't work.
after moving down a line it works.

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51870
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Post by Brf » Thu Dec 14, 2006 9:59 pm

OK.... lets try the last fix I discovered last week for viewprofile.... Since putting in this patch has no effect on a board that is already working...

The changes are to classes_cash.php in cm_viewprofile->post_vars()
Brf wrote: Karl,

I still think there is something wrong with the way the template object is extended... although I am confused that it is not working properly.

It is funny that it is working in viewtopic, but not viewprofile... maybe it has to do with the lifetime of the extended object -- like it is not picking up the references from the original template object properly in a temporary scope, over a more permanent one... likely a bug in the way PHP is optimizing the result object....

In any case, the extended object is not even needed in the viewprofile, since it is subtemplating a single variable -- {CASH} -- rather than a loop variable like viewtopic is using.

I was thinking we could yank out the template redefine, and use the standard one, with the standard handle call.... This would require replacing a few lines:

In classes cash, replace:

Code: Select all

			global $board_config, $lang, $phpEx, $cash;
			if ( $board_config['cash_disable'])
			{
				return;
			}
			$template = new Template_plus();
			$template->set($old_template);  
with:

Code: Select all

			global $board_config, $lang, $phpEx, $cash, $template;
			if ( $board_config['cash_disable'])
			{
				return;
			}
and a few lines below that, replace:

Code: Select all

$template->assign_block_var_from_handle('CASH', 'cm_viewprofile');
with

Code: Select all

$template->assign_var_from_handle('CASH', 'cm_viewprofile');
If one of you guys is willing to try it out, put back in {CASH} and we will see what happens....

No_Mercy
Registered User
Posts: 115
Joined: Mon Dec 11, 2006 8:33 pm

Post by No_Mercy » Thu Dec 14, 2006 11:52 pm

Okay.

I got another question.

I have 2 currencies.

Experience and Dollars.

Is there a way to make either

A. Memberlist show experience and not dollars.

B. A second memberlist that shows only experience named 'roster.php'

Thanks all.

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51870
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Post by Brf » Fri Dec 15, 2006 12:33 am

You can do "A". Just set show-in-memberlist to No for the one currancy in Cash Settings/

"B" would be a custom page....

Lukage
Registered User
Posts: 28
Joined: Mon Jul 17, 2006 8:19 pm

Post by Lukage » Fri Dec 15, 2006 1:46 am

Brf wrote:
Lukage wrote: I was hoping I could have it display on posts the point amount for each of the two types I have


I am guessing you are not awarding head-crabs in that particular forum, so its amount is not showing.
One more question. How would I remove the icons for each user in the Memberlist? I would love to just see the images at the top.


in classes_cash, look for this line:

Code: Select all

$template->assign_block_vars('memberrow.cashrow', array('CASH_DISPLAY' => $c_cur->display($row[$c_cur->db()])));
and replace it with:

Code: Select all

$template->assign_block_vars('memberrow.cashrow', array('CASH_DISPLAY' => $row[$c_cur->db()]));


Well in any forum, the combined total is showing for users, not just the points for that forum.

Also, the replacement didn't do anything. :(

sakkiotto
Registered User
Posts: 228
Joined: Mon Jun 13, 2005 9:45 pm

Post by sakkiotto » Fri Dec 15, 2006 3:25 am

hi. it's possible show 2 separate cash system?

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51870
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Post by Brf » Fri Dec 15, 2006 4:07 am

Lukage wrote: Also, the replacement didn't do anything. :(


That is impossible. You would be replacing the display code with only the numeric value. Did you upload the changed script?

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51870
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Post by Brf » Fri Dec 15, 2006 4:08 am

sakkiotto wrote: hi. it's possible show 2 separate cash system?


You can set up as many currencies as you wish.

Blisk
Registered User
Posts: 270
Joined: Wed Aug 20, 2003 10:43 am
Location: Slovenia

Post by Blisk » Fri Dec 15, 2006 7:31 am

thanks, this now works OK, but still it would be fine that wariable for cash is the same like others in the profile_view_body.tpl.

because colour of font is not the same.

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51870
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Post by Brf » Fri Dec 15, 2006 11:59 am

Blisk wrote: it would be fine that wariable for cash is the same like others in the profile_view_body.tpl.

because colour of font is not the same.


The cash section is using

Code: Select all

class="gen"
the same as everything else on viewprofile... Are you using an unusual template that is using a different class?
If so, you can change it in cash_viewprofile.tpl

mathassam
Registered User
Posts: 24
Joined: Wed Nov 29, 2006 9:58 pm

Post by mathassam » Fri Dec 15, 2006 2:08 pm

how to fix this error i get it when installing was done

Code: Select all

# INSERT INTO phpbb_config (config_name, config_value) VALUES ('cash_disable',0);
+++ Error: Duplicate entry 'cash_disable' for key 1

# INSERT INTO phpbb_config (config_name, config_value) VALUES ('cash_display_after_posts',1);
+++ Error: Duplicate entry 'cash_display_after_posts' for key 1

# INSERT INTO phpbb_config (config_name, config_value) VALUES ('cash_post_message','You earned %s for that post');
+++ Error: Duplicate entry 'cash_post_message' for key 1

# INSERT INTO phpbb_config (config_name, config_value) VALUES ('cash_disable_spam_num',10);
+++ Error: Duplicate entry 'cash_disable_spam_num' for key 1

# INSERT INTO phpbb_config (config_name, config_value) VALUES ('cash_disable_spam_time',24);
+++ Error: Duplicate entry 'cash_disable_spam_time' for key 1

# INSERT INTO phpbb_config (config_name, config_value) VALUES ('cash_disable_spam_message','You have exceeded the alloted amount of posts and will not earn anything for your post');
+++ Error: Duplicate entry 'cash_disable_spam_message' for key 1

# INSERT INTO phpbb_config (config_name, config_value) VALUES ('cash_installed','yes');
+++ Error: Duplicate entry 'cash_installed' for key 1

# INSERT INTO phpbb_config (config_name, config_value) VALUES ('cash_version','2.2.3');
+++ Error: Duplicate entry 'cash_version' for key 1

# INSERT INTO phpbb_config (config_name, config_value) VALUES ('points_name','Points');
+++ Error: Duplicate entry 'points_name' for key 1

# INSERT INTO phpbb_config (config_name, config_value) VALUES ('cash_adminnavbar','1');
+++ Error: Duplicate entry 'cash_adminnavbar' for key 1

# INSERT INTO phpbb_config (config_name, config_value) VALUES ('cash_adminbig','0');
+++ Error: Duplicate entry 'cash_adminbig' for key 1
Last edited by mathassam on Fri Dec 15, 2006 2:10 pm, edited 1 time in total.

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51870
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Post by Brf » Fri Dec 15, 2006 2:09 pm

That means you tried to install its datatables twice.
Last edited by Brf on Fri Dec 15, 2006 2:24 pm, edited 1 time in total.

mathassam
Registered User
Posts: 24
Joined: Wed Nov 29, 2006 9:58 pm

Post by mathassam » Fri Dec 15, 2006 2:14 pm

after installing the sql_install.php..
what next?
i've done after that the cash.php and got the follow errors:

Code: Select all

Warning: main(./extension.inc): failed to open stream: No such file or directory in /home/www/sharehere.freehostia.com/phpBB2/admin/mods/CashMod223/cash.php on line 25

Warning: main(./extension.inc): failed to open stream: No such file or directory in /home/www/sharehere.freehostia.com/phpBB2/admin/mods/CashMod223/cash.php on line 25

Warning: main(./extension.inc): failed to open stream: No such file or directory in /home/www/sharehere.freehostia.com/phpBB2/admin/mods/CashMod223/cash.php on line 25

Warning: main(): Failed opening './extension.inc' for inclusion (include_path='.:/usr/local/lib/php') in /home/www/sharehere.freehostia.com/phpBB2/admin/mods/CashMod223/cash.php on line 25

Warning: main(./common.): failed to open stream: No such file or directory in /home/www/sharehere.freehostia.com/phpBB2/admin/mods/CashMod223/cash.php on line 26

Warning: main(./common.): failed to open stream: No such file or directory in /home/www/sharehere.freehostia.com/phpBB2/admin/mods/CashMod223/cash.php on line 26

Warning: main(./common.): failed to open stream: No such file or directory in /home/www/sharehere.freehostia.com/phpBB2/admin/mods/CashMod223/cash.php on line 26

Warning: main(): Failed opening './common.' for inclusion (include_path='.:/usr/local/lib/php') in /home/www/sharehere.freehostia.com/phpBB2/admin/mods/CashMod223/cash.php on line 26

Fatal error: Call to undefined function: session_pagestart() in /home/www/sharehere.freehostia.com/phpBB2/admin/mods/CashMod223/cash.php on line 31
how do i use the mod?
it doesnt appear in my forum or forum ACP

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51870
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Post by Brf » Fri Dec 15, 2006 2:23 pm

You need to install the mod. Follow the instructions in the install.txt

mathassam
Registered User
Posts: 24
Joined: Wed Nov 29, 2006 9:58 pm

Post by mathassam » Fri Dec 15, 2006 2:25 pm

must i edit every file that in there i heard with easymod it will be done for you..

Post Reply

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