[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

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 »

RusselHarvey wrote: The way cash mod developed is so complicated, that even the sql statement are generated from programming. This mades any modification to cash mod very hard.

I simply want to display the cash point in the viewtopic page as: "Points: 120" instead of the "120 Points" as it's in the current cash mod. Then I found out it's simply impossible to modify the code as it's embedded and embedded deeply into other codes:

In "class_cash.php":

Code: Select all

                        while ( $c_cur = &$cash->currency_next($cm_i,$mask,$forum_id) )
                        {
                                $template->assign_block_vars('cashrow', array(        'CASH_DISPLAY' => $c_cur->display($postdata[$c_cur->db()])));
                        }
the 'CASH_DISPLAY' is the only clue I found from the tpl file, so it must be here, but how I can change the phrase from the line of code in above?

It's preferred that the cash mod works the same way as it's in point mod although cash mod brought more functionalities.


First of all, make sure you have your postfix / prefix settings set properly

Next, for viewtopic, do the following:

replace what you found: (around line 367)

Code: Select all

                        while ( $c_cur = &$cash->currency_next($cm_i,$mask,$forum_id) )
                        {
                                $template->assign_block_vars('cashrow', array(        'CASH_DISPLAY' => $c_cur->display($postdata[$c_cur->db()])));
                        }
with

Code: Select all

                        while ( $c_cur = &$cash->currency_next($cm_i,$mask,$forum_id) )
                        {
                                $template->assign_block_vars('cashrow', array(        'CASH_DISPLAY' => $c_cur->display($postdata[$c_cur->db()]),
                                                                                      'CASH_AMOUNT' => $postdata[$c_cur->db()],
                                                                                      'CASH_NAME' => $c_cur->name()  ));
                        }
Then, in your templates, you have the template file cash_viewtopic.tpl ...
you can change

Code: Select all

{cashrow.CASH_DISPLAY}<br />
to

Code: Select all

{cashrow.CASH_AMOUNT} {cashrow.CASH_NAME}<br />
or whatever you want...
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod
Q-Zar
Registered User
Posts: 779
Joined: Sun Nov 17, 2002 8:30 pm
Location: Brussels
Contact:

Post by Q-Zar »

RusselHarvey wrote: I simply want to display the cash point in the viewtopic page as: "Points: 120" instead of the "120 Points" as it's in the current cash mod.


You just need to select your currency as a prefix one.
Traductions : Cash Mod v2.2.2 (Getting Started) / Dice Mod v1.2.3 / Activity Mod Plus 1.0.8
Remember this. Please read the F.A.Q/Troubleshooting of a mod before asking questions.
Image
Splendifferous
Registered User
Posts: 38
Joined: Sun Apr 04, 2004 6:25 am

Post by Splendifferous »

Can this mod be adjusted to work with PhpBB 2.08a?
Image
"Why am I fighting to live, if i'm living to fight?"
(do not adopt Av & Sig)
drakky
Registered User
Posts: 66
Joined: Sun Apr 18, 2004 2:15 pm

Post by drakky »

cash mod roxxxxxxxxxxxxxxxxxxxxxxx!!!!!!!!!!!!!!!!!!!!
i had a small prob with it and easy mod but i worked it out then there was a prob in the acp but it was a known prob i just applied their fix and waalaa it works
thanks guys
drakky
Registered User
Posts: 66
Joined: Sun Apr 18, 2004 2:15 pm

Post by drakky »

Splendifferous wrote: Can this mod be adjusted to work with PhpBB 2.08a?


it works with 2.08a cause i got it running
User avatar
stickerboy
Former Team Member
Posts: 7349
Joined: Mon Mar 29, 2004 2:27 pm
Location: Airdrie, UK (127.0.0.1)
Name: Kenny Cameron
Contact:

Post by stickerboy »

*edit* never mind this post. it fixed itself :P
great mod anyway. can't believe i managed to install it myself :)
I'm a web-designing code-decrypting tech-support musician
|| Twitter || Flickr || phpBB Snippets ||
Formerly known as cherokee red
Splendifferous
Registered User
Posts: 38
Joined: Sun Apr 04, 2004 6:25 am

Post by Splendifferous »

drakky wrote:
Splendifferous wrote:Can this mod be adjusted to work with PhpBB 2.08a?


it works with 2.08a cause i got it running


Thanks so much! :D
Image
"Why am I fighting to live, if i'm living to fight?"
(do not adopt Av & Sig)
drakky
Registered User
Posts: 66
Joined: Sun Apr 18, 2004 2:15 pm

Post by drakky »

ok lol i might be thick but
does anyone know the settings to get the cash mod to work with the activity mod basically i have created 2 currency's 1 called dollars to reward posters this part works fine,
the other currency called tokens is to reward high score on any game i can't work out how to get the mod to give the high score winner 5 tokens everytime they get the highest score?


other info i have made 3 tokens = 1 dollars so that people can convert between the 2 currency's eventually i want to make games cost 1 token so that posters can buy tokens to play the games or convert tokens to dollars if they want to buy lottery tickets

any help would be most appreciated
thanks
Splendifferous
Registered User
Posts: 38
Joined: Sun Apr 04, 2004 6:25 am

Post by Splendifferous »

I tried installing this mod used EasyMOD 0.0.10a and I got this:
Error retrieving cash data

DEBUG MODE

SQL Error : 1146 Table 'lowente_phpb1.phpbb_cash' doesn't exist

SELECT * FROM phpbb_cash ORDER BY cash_order ASC

Line : 657
File : /home/lowente/public_html/includes/functions_cash.php

How can I fix this?
Image
"Why am I fighting to live, if i'm living to fight?"
(do not adopt Av & Sig)
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 »

Splendifferous:

Did you run the sql installer?
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod
Q-Zar
Registered User
Posts: 779
Joined: Sun Nov 17, 2002 8:30 pm
Location: Brussels
Contact:

Post by Q-Zar »

drakky wrote: ok lol i might be thick but
does anyone know the settings to get the cash mod to work with the activity mod


Create a currency with database field user_points, then select "use the points system" in the Activity Mod configuration.
Traductions : Cash Mod v2.2.2 (Getting Started) / Dice Mod v1.2.3 / Activity Mod Plus 1.0.8
Remember this. Please read the F.A.Q/Troubleshooting of a mod before asking questions.
Image
PsYpEr
Registered User
Posts: 328
Joined: Tue Sep 23, 2003 4:04 pm
Location: behind you
Contact:

Post by PsYpEr »

Q-Zar wrote:
drakky wrote:ok lol i might be thick but
does anyone know the settings to get the cash mod to work with the activity mod


Create a currency with database field user_points, then select "use the points system" in the Activity Mod configuration.


Wrong forum Drakky but to save time: Within the activity mod configuration you need to select that you have a reward system - hit submit and it will give you a new option of which reward system to use - select cash mod then hit submit. it should then give a new field asking you what the currency name is - normally user_dollar or whatever you called it
Kazumiya
Registered User
Posts: 16
Joined: Tue Aug 05, 2003 5:07 am

Post by Kazumiya »

Is there a way to display '0' currency value if I have disabled cash mod for a particular forum?

Looks weird with a 'blank' amount.
Splendifferous
Registered User
Posts: 38
Joined: Sun Apr 04, 2004 6:25 am

Post by Splendifferous »

Xore wrote: Splendifferous:

Did you run the sql installer?


I do not think so, how would I do that?
Image
"Why am I fighting to live, if i'm living to fight?"
(do not adopt Av & Sig)
Q-Zar
Registered User
Posts: 779
Joined: Sun Nov 17, 2002 8:30 pm
Location: Brussels
Contact:

Post by Q-Zar »

Did you read the installation file ? :roll:
-----[ SQL ]------------------------------------------

There is an automatic sql installer that works currently for mysql and mssql.
It is necessary to copy the file sql_install.php to your main phpbb directory and run it from there
After that, you want to delete the file immediately.


Kazumiya : I think that is something Xore wants to fix in the next release.
Traductions : Cash Mod v2.2.2 (Getting Started) / Dice Mod v1.2.3 / Activity Mod Plus 1.0.8
Remember this. Please read the F.A.Q/Troubleshooting of a mod before asking questions.
Image
Post Reply

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