[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

RusselHarvey
Registered User
Posts: 31
Joined: Fri Aug 30, 2002 6:17 pm

Post by RusselHarvey »

I've modified the admin piece (admin\admin_cash.php) to be like other mod's admin_xxx.php since the way CASH MOD generate menu has cause conflict with the portal system I am using MX-system.

Instead of

Code: Select all

if ( !defined('ADMIN_MENU') )
{
        define('ADMIN_MENU',1);
        function admin_menu(&$menu)
        {
                global $lang;
                $i = 0;
                $j = 0;
                $menu[$i] = new cash_menucat($lang['Cmcat_main']);
                $menu[$i]->additem(new cash_menuitem($j,        'Cash_Configuration',        'cash_config',                $lang['Cmenu_cash_config']));
                $menu[$i]->additem(new cash_menuitem($j,        'Cash_Currencies',                'cash_currencies',        $lang['Cmenu_cash_currencies']));
                $menu[$i]->additem(new cash_menuitem($j,        'Cash_Forums',                        'cash_forums',                $lang['Cmenu_cash_forums']));
                $menu[$i]->additem(new cash_menuitem($j,        'Cash_Settings',                'cash_settings',        $lang['Cmenu_cash_settings']));
                $i++;
                $menu[$i] = new cash_menucat($lang['Cmcat_addons']);
                $menu[$i]->additem(new cash_menuitem($j,        'Cash_Events',                        'cash_events',                $lang['Cmenu_cash_events']));
                $menu[$i]->additem(new cash_menuitem($j,        'Cash_Reset',                        'cash_reset',                $lang['Cmenu_cash_reset']));
                $i++;
                $menu[$i] = new cash_menucat($lang['Cmcat_other']);
                $menu[$i]->additem(new cash_menuitem($j,        'Cash_Exchange',                'cash_exchange',        $lang['Cmenu_cash_exchange']));
                $menu[$i]->additem(new cash_menuitem($j,        'Cash_Groups',                        'cash_groups',                $lang['Cmenu_cash_groups']));
                $menu[$i]->additem(new cash_menuitem($j,        'Cash_Logs',                        'cash_log',                        $lang['Cmenu_cash_log']));
                $i++;
                $menu[$i] = new cash_menucat($lang['Cmcat_help']);
                $menu[$i]->additem(new cash_menuitem($j,        'Cash_Help',                        'cash_help',                $lang['Cmenu_cash_help']));
        }
}

Changed to :

Code: Select all

if ( !empty($setmodules) )
{
                $file = basename(__FILE__);
        $module['Cash Mod']['Cash_Configuration'] = append_sid("cash_config.$phpEx");
        $module['Cash Mod']['Cash_Currencies'] = append_sid("cash_currencies.$phpEx");
        $module['Cash Mod']['Cash_Forums'] = append_sid("cash_forums.$phpEx");
        $module['Cash Mod']['Cash_Settings'] = append_sid("cash_settings.$phpEx");
        $module['Cash Mod']['Cash_Events'] = append_sid("cash_events.$phpEx");
        $module['Cash Mod']['Cash_Reset'] = append_sid("cash_reset.$phpEx");
        $module['Cash Mod']['Cash_Exchange'] = append_sid("cash_exchange.$phpEx");
        $module['Cash Mod']['Cash_Groups'] = append_sid("cash_groups.$phpEx");
        $module['Cash Mod']['Cash_Logs'] = append_sid("cash_log.$phpEx");
        $module['Cash Mod']['Cash_Help'] = append_sid("cash_help.$phpEx");

        return;
}

However, it's still preferred to have the official cash mod modified to this way. There is no incentive to implement the menu system as it is in current cash mod, IMHO.
User avatar
JooK
Registered User
Posts: 28
Joined: Sun Oct 05, 2003 4:55 pm
Location: LA, CA, USA
Contact:

Post by JooK »

you can take a look at my forums, which currently have it enabled.
you can see the cash...umm...options, I guess, at the top of the page
of every post. I think I pretty much installed it right, because I went
over it.

Check it out http://thejook.com/forum

go to any post. In big ones, for EACH post there is a set of 2 options,
modify, and donate.

Kind of wierd, if you are a guest, you just see the cash, but no name,
for every user in the order they posted (it does repeat for second posts).

Any idea why?

thanks Xore.
.: TheJooK :.
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 »

JooK wrote: you can take a look at my forums, which currently have it enabled.
you can see the cash...umm...options, I guess, at the top of the page
of every post. I think I pretty much installed it right, because I went
over it.

Check it out http://thejook.com/forum

go to any post. In big ones, for EACH post there is a set of 2 options,
modify, and donate.

Kind of wierd, if you are a guest, you just see the cash, but no name,
for every user in the order they posted (it does repeat for second posts).

Any idea why?

thanks Xore.


you made a mistake when putting the cash entry into the template. make sure you put it before the </td> , not after
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod
User avatar
JooK
Registered User
Posts: 28
Joined: Sun Oct 05, 2003 4:55 pm
Location: LA, CA, USA
Contact:

Post by JooK »

Haha, you know your stuff, but then again, I guess you should, you
scripted the damn thing. Thanks a bunch Xore, I will love you forever.
.: TheJooK :.
Q-Zar
Registered User
Posts: 779
Joined: Sun Nov 17, 2002 8:30 pm
Location: Brussels
Contact:

Post by Q-Zar »

scoomey2354 wrote: under the Database field for currency can it be user_*anything*.


It depends what you plan to use it for, if you name it user_points you will be able to use a lot of mods with it, like activity mod, advanced dungeons and rabbits, rabbitoshi, ...
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
hcteks
Registered User
Posts: 126
Joined: Wed Jan 07, 2004 9:09 pm

Post by hcteks »

Xore wrote: what dbms (database) are you using?

if you want to be absolutely certain what your default is, open up your user table under phpmyadmin, look at the custom cash column, and change it's default accordingly.


I use MySQL and that worked like a charm from what I can tell. Thanks alot for your help, for the best phpBB mod there is.
Adam Mills
Registered User
Posts: 121
Joined: Tue Aug 19, 2003 7:56 pm
Contact:

functions_post.php on line 358

Post by Adam Mills »

I am getting this messege whenever I try to post a new topic ... and checked the update for this page over and over again and am still getting it ....
Fatal error: Call to a member function on a non-object in /var/hsphere/local/home/rookie/fable.abuseadam.com/phpBB2/includes/functions_post.php on line 358


here is the code on those lines....

Code: Select all


//(lines 346 - 356)

		if ($delete_option_sql != '')
		{
			$sql = "DELETE FROM " . VOTE_RESULTS_TABLE . " 
				WHERE vote_option_id IN ($delete_option_sql) 
					AND vote_id = $poll_id";
			if (!$db->sql_query($sql))
			{
				message_die(GENERAL_ERROR, 'Error deleting pruned poll options', '', __LINE__, __FILE__, $sql);
			}
		}
	}

//(line 358)

$cash_message = $GLOBALS['cm_posting']->update_post($mode, $post_data, $forum_id, $topic_id, $post_id, $topic_type, $bbcode_uid, $post_username, $post_message);

//(line 359)

$meta = '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">';

//(line 360)

$message = $lang['Stored'] . '<br />' . $cash_message . '<br /><br />' . sprintf($lang['Click_view_message'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a>');

I tried commenting out line 358 ... but then go an error on 492. which is this

Code: Select all

$GLOBALS['cm_posting']->update_delete($mode, $post_data, $forum_id, $topic_id, $post_id);
The second change to this page .... I comment that out and all works hunky dory .... help?
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 »

@Adam Mills

you'll need to uncomment those lines (your users won't be able to earn cash in their present state)

Then, open up posting.php, and make sure you've properly added everything, most specifically,

Code: Select all

# 
#-----[ FIND ]------------------------------------------ 
# 
define('IN_PHPBB', true);

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
define('IN_CASHMOD', true);
define('CM_POSTING', true);
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod
gball
Registered User
Posts: 52
Joined: Sat Mar 06, 2004 6:54 pm
Contact:

Post by gball »

Ok I have read through most of the pages here and can't seem to fine if this question has been asked before.


I would like to give a certain amount of points to users when they register. So I set my first rank at 0 and tried to make a cash event to where when they make that rank it gives them x amount of points but I can never get the right settings to get it to work.

Anyone know what I need to do in cash events to make this work?


many thanks
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 »

gball wrote: Ok I have read through most of the pages here and can't seem to fine if this question has been asked before.


I would like to give a certain amount of points to users when they register.


cash currencies -> cash default. just change that and update, and that should be the amount your users get when they sign up on your board.
So I set my first rank at 0 and tried to make a cash event to where when they make that rank it gives them x amount of points but I can never get the right settings to get it to work.

Anyone know what I need to do in cash events to make this work?

many thanks


(many thanks, your post has given me a couple other ideas ;-) )
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod
gball
Registered User
Posts: 52
Joined: Sat Mar 06, 2004 6:54 pm
Contact:

Post by gball »

cash currencies -> cash default. just change that and update, and that should be the amount your users get when they sign up on your board.


Thats so obvious its embarrassing.... :oops:

many thanks, your post has given me a couple other ideas


can't wait..
User avatar
vrflyer
Registered User
Posts: 503
Joined: Mon Feb 17, 2003 8:27 pm

Post by vrflyer »

Question under the "Cash MOD Settings" section...

I think I'm misunderstanding this option:

"Maximum amount of cash earned for posting"

Does that equal to the MAX $$$'s/Points/Etc..., an user can earn ???

... in conjunction with the SPAM Prevention, set to 15-Posts MAX ???

This is how I have my "Cash Settings"...
Amount of cash earned per new topic = 2
Amount of bonus cash earned per reply for topic author = 1
Amount of cash earned per reply = 1
Amount of cash earned per character = 0
Maximum amount of cash earned for posting = 15
Amount of cash earned per private message = 0
Always Under Construction !
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 »

vrflyer wrote: Question under the "Cash MOD Settings" section...


Maximum amount is the most you can make for 1 post.

for example, if you had more than 0 per character, you could technically gain an arbitrarily large amount of points just by plugging in enough spam. This prevents you from gaining that much, and sets an upper bound on how much you can earn.

perhaps 'for posting' would be better written 'per post'
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod
RusselHarvey
Registered User
Posts: 31
Joined: Fri Aug 30, 2002 6:17 pm

Post by RusselHarvey »

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.
DaMaNRoB
Registered User
Posts: 135
Joined: Thu Apr 03, 2003 6:02 am

Post by DaMaNRoB »

nice mod!
Post Reply

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