Page 237 of 798

Posted: Thu May 20, 2004 2:53 am
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...

Posted: Thu May 20, 2004 8:36 am
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.

Posted: Fri May 21, 2004 12:30 pm
by Splendifferous
Can this mod be adjusted to work with PhpBB 2.08a?

Posted: Fri May 21, 2004 2:01 pm
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

Posted: Fri May 21, 2004 2:02 pm
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

Posted: Fri May 21, 2004 3:19 pm
by stickerboy
*edit* never mind this post. it fixed itself :P
great mod anyway. can't believe i managed to install it myself :)

Posted: Sat May 22, 2004 2:32 am
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

Posted: Sat May 22, 2004 6:54 am
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

Posted: Sat May 22, 2004 7:43 am
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?

Posted: Sat May 22, 2004 8:22 am
by Xore
Splendifferous:

Did you run the sql installer?

Posted: Sat May 22, 2004 1:34 pm
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.

Posted: Sat May 22, 2004 3:53 pm
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

Posted: Sat May 22, 2004 6:33 pm
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.

Posted: Sun May 23, 2004 3:36 am
by Splendifferous
Xore wrote: Splendifferous:

Did you run the sql installer?


I do not think so, how would I do that?

Posted: Sun May 23, 2004 6:43 am
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.