[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

clockworkboarder
Registered User
Posts: 5
Joined: Mon Aug 11, 2008 6:54 am

Re: [2.0.18] Cash Mod

Post by clockworkboarder »

I know that is A linebreak.

I am not looking for that.

I am trying to find the area that constructs the {cashrow.CASH_DISPLAY}.

To make a little more sense of it, I have multiple currencies. I want to edit the display output of the cash_display so that it will not be PRE linebroken.

The linebreak you are referring to allows for the linebreak between the cash_display box and the links to modify or donate cash.
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53411
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: [2.0.18] Cash Mod

Post by Brf »

No.
That <br /> is the linebreak between individual currencies too.
clockworkboarder
Registered User
Posts: 5
Joined: Mon Aug 11, 2008 6:54 am

Re: [2.0.18] Cash Mod

Post by clockworkboarder »

BRF, I'm sorry!

Apparently I was over thinking this.

When I tested what you said originally it kept the cash displayed in a box form list.

Then I realized the postprofile was the width of the graphics I was using for the cash, causing it to automatically line break.

I got it working great.

Thanks for your persistance while faced with my idiocy!
FDSuprema
Registered User
Posts: 1
Joined: Thu Jun 12, 2008 3:32 am

Re: [2.0.18] Cash Mod

Post by FDSuprema »

Ok I'm having trouble installing this Mod, It says that it is easymod compatible... correct? yet whenever I Click "Process" in EasyMod, it redirects to a blank page... is this an EM glitch or is it caused by the Mods install file?
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53411
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: [2.0.18] Cash Mod

Post by Brf »

This is support for Cashmod, not Easymod.
Easymod support is at Area51 somewhere.
User avatar
Mooncow
Registered User
Posts: 263
Joined: Tue Feb 25, 2003 8:10 am
Location: This Post
Contact:

Re: [2.0.18] Cash Mod

Post by Mooncow »

im still having trouble on this last hurdle

im editing function cash_update in includes/classes_cash.php

i'm tryign to get the newly created spam settings to be run for each currency. so far i know that the code loops the currencies in the

Code: Select all

while ( $c_cur = &$cash->currency_next($cm_i,CURRENCY_ENABLED,$forum_id) )
loop

i tried myself and got as far as
http://rafb.net/p/qPILUP10.html

is the scale of this a lot bigger than i'm thinking..? id hate to have to just scrap it all =(
I love teh phpBB
User avatar
Mooncow
Registered User
Posts: 263
Joined: Tue Feb 25, 2003 8:10 am
Location: This Post
Contact:

Re: [2.0.18] Cash Mod

Post by Mooncow »

ok i sorted all of my problems except for one.

It says in the configuration "this should only include one "%s" "

so for example, "you earned %s for that post"
would be shown as "you earned 1 points for that post"

but i will only be increasing by 1, so i don't want the trailing "s"

I want "you earned % for that post", but when i do this it doesn't work

any ideas?
I love teh phpBB
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53411
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: [2.0.18] Cash Mod

Post by Brf »

"%s" means a string replacement, it does not add the "s" at the end.
User avatar
dellsystem
Former Team Member
Posts: 3879
Joined: Sat Apr 09, 2005 8:54 pm
Location: Montreal
Name: Wendy
Contact:

Re: [2.0.18] Cash Mod

Post by dellsystem »

cash_post_message is defined in classes_cash.php (that's where the message is generated), and the %s looks like it's replaced by $message_clause ... Ah, I got it. Replace
$message_clause[] = $c_cur->display($change_amount);
with
$message_clause = $change_amount;
and

return ( ($userdata['user_id'] == $poster_id) && ($board_config['cash_display_after_posts'] == 1) ) ? sprintf($board_config['cash_post_message'],implode(', ',$message_clause)) : '';

with
return ( ($userdata['user_id'] == $poster_id) && ($board_config['cash_display_after_posts'] == 1) ) ? sprintf($board_config['cash_post_message'],$message_clause) : '';
That way, instead of saying 'You earned 1 points for this post' it'll say 'You earned 1 for this post'. You can precede the %s with a $ in the ACP to make it look more natural.

Let me know if there are problems :)
Former moderator and website team member | My MODs, and more (GitHub)
oacblack
Registered User
Posts: 61
Joined: Tue Mar 27, 2007 6:33 am

Re: [2.0.18] Cash Mod

Post by oacblack »

I am running the latest version of cash mod and just installed the AI Forum bot and it works with the points system when posting using

Code: Select all

if( $board_config['points_post'] )
	{
		$points =  $board_config['points_reply'];

		$sql = "UPDATE " . USERS_TABLE . "
			SET user_points = user_points + $points
			WHERE user_id = $iai_id";
		if( !$db->sql_query($sql) )
		{
			message_die(GENERAL_ERROR, 'Could not update user points', '', __LINE__, __FILE__, $sql);
		}
        }
points are of course user_points for compatibility with all the other mods
User avatar
Mooncow
Registered User
Posts: 263
Joined: Tue Feb 25, 2003 8:10 am
Location: This Post
Contact:

Re: [2.0.18] Cash Mod

Post by Mooncow »

Hi, thanks. the fix for the message text isn't exactly ideal, but i'll come back to it later.
ive found a bigger problem now.

if i delete a post, the member gets a point/cash unit deducted also from their total.
any way to stop this?
I love teh phpBB
User avatar
Dog Cow
Registered User
Posts: 2507
Joined: Fri Jan 28, 2005 12:14 am
Contact:

Re: [2.0.18] Cash Mod

Post by Dog Cow »

Mooncow wrote: if i delete a post, the member gets a point/cash unit deducted also from their total.
any way to stop this?
If you can't find the option in the admin panel, then you'd have to modify the code directly. I don't believe there is such an option.
User avatar
Mooncow
Registered User
Posts: 263
Joined: Tue Feb 25, 2003 8:10 am
Location: This Post
Contact:

Re: [2.0.18] Cash Mod

Post by Mooncow »

Dog Cow wrote:
Mooncow wrote: if i delete a post, the member gets a point/cash unit deducted also from their total.
any way to stop this?
If you can't find the option in the admin panel, then you'd have to modify the code directly. I don't believe there is such an option.
yeah, i was wondering which part of the code performs the deduction when the post is deleted
I love teh phpBB
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53411
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: [2.0.18] Cash Mod

Post by Brf »

I would suppose it is this bottom line here:

Code: Select all

function delete_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id)
{
	global $board_config, $lang, $db, $phpbb_root_path, $phpEx;
	global $userdata, $user_ip;

	if ($mode != 'poll_delete')
	{
		$GLOBALS['cm_posting']->update_delete($mode, $post_data, $forum_id, $topic_id, $post_id);
in includes/functions_post.php
User avatar
Mooncow
Registered User
Posts: 263
Joined: Tue Feb 25, 2003 8:10 am
Location: This Post
Contact:

Re: [2.0.18] Cash Mod

Post by Mooncow »

yes, that seems to have done it, thanks

im now thinking how this system works

if i set the spam limit to 1 post
and the spam timer to 24 (hours)

does this mean, there has to be a gap of 24 hours to gain cash?
because i think at the moment, the user will stay on 1 cash until they dont post for 24 hours... (so if they post everyday they will stay on 1 cash)
I love teh phpBB
Post Reply

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