[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

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

Re: [2.0.18] Cash Mod

Post by Brf »

Atari@Hankoupocho wrote:or rather, why easymod thinks it's already installed when I deleted the previous cashmod.

Therefore, it is an Easymod question.
Atari@Hankoupocho
Registered User
Posts: 5
Joined: Sat Nov 03, 2007 10:43 am

Re: [2.0.18] Cash Mod

Post by Atari@Hankoupocho »

Brf wrote:
Atari@Hankoupocho wrote:or rather, why easymod thinks it's already installed when I deleted the previous cashmod.

Therefore, it is an Easymod question.
>_> I really hate nest quoting....

at anyrate...perhaps I should have phrased my question differently
"instead of 'or rather' I retract it and subsitute it for "or perhaps, why easymod thinks it's already installed when I deleted the previous cashmod?

Hmm...I sincerely doubt that Easymod area is who I should ask....but since no one has answered here....I'll go ahead and try there again.... ~goes there~
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 »

"instead of 'or rather' I retract it and subsitute it for "or perhaps, why easymod thinks it's already installed when I deleted the previous cashmod?
Because the SQL entries in the database are still there?

If you don't know how to get rid of them just do the file edits by hand.
Former moderator and website team member | My MODs, and more (GitHub)
dotcommakers
Registered User
Posts: 17
Joined: Fri Nov 28, 2003 1:59 pm
Location: india
Contact:

Re: [2.0.18] Cash Mod

Post by dotcommakers »

hello buddy

I have installed this mod in my latest phpbb installtion 2.0.22 everything works fine!

but in view topic .. just "currency name" is appearing, not "amount" itself!!

check my forum at http://www.freesite.in/viewtopic.php?t=1

regards
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 »

dotcommakers wrote:hello buddy

I have installed this mod in my latest phpbb installtion 2.0.22 everything works fine!

but in view topic .. just "currency name" is appearing, not "amount" itself!!

check my forum at http://www.freesite.in/viewtopic.php?t=1

regards
Your forum should have the line "Powered by phpbb" in the footer or elsewhere, with phpbb linked to phpbb.com (an invisible image link to the top of the page is not sufficient) in order to receive support here.

That being said, recheck your edits to viewtopic_body.tpl and check the Cash MOD settings. Please add in the copyright, which can be found in the subSilver overall_footer.tpl file.
Former moderator and website team member | My MODs, and more (GitHub)
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52298
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: [2.0.18] Cash Mod

Post by Brf »

dotcommakers wrote: in view topic .. just "currency name" is appearing, not "amount" itself!!
You need to go into Cash Admin Cash Forums and enable that currency for that forum.
xorakjoken
Registered User
Posts: 30
Joined: Sat Jun 30, 2007 6:09 pm

Re: [2.0.18] Cash Mod

Post by xorakjoken »

Ok time for my error.
I installed Cash Mod using EasyMOD.

Now when I try to see someones profile i get.
Fatal error: Call to a member function post_vars() on a non-object in /home/.mitzi/xorakjoken/forum.xorajoken.com/includes/usercp_viewprofile.php on line 245

God HELP ME
The Joken Design Forum: http://www.forum.xorajoken.com
Like Programming? Like Role Playing? Join Today.
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52298
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: [2.0.18] Cash Mod

Post by Brf »

xorakjoken wrote: Now when I try to see someones profile i get.
Fatal error: Call to a member function post_vars() on a non-object in /home/.mitzi/xorakjoken/forum.xorajoken.com/includes/usercp_viewprofile.php on line 245
Brf wrote:
Brf wrote:
Fatal error: Call to a member function post_vars() on a non-object in
<server path>\includes\usercp_viewprofile.php on line 244
Do you have the proper edit to profile.php?

If so try this:
Brf wrote:
Brf wrote: In profile.php replace this:

Code: Select all

if ( (isset($HTTP_GET_VARS['mode']) && ($HTTP_GET_VARS['mode'] == 'viewprofile')) || (isset($HTTP_POST_VARS['mode']) && ($HTTP_POST_VARS['mode'] == 'viewprofile')) )
{
With this:

Code: Select all

if ( (isset($_GET['mode']) && ($_GET['mode'] == 'viewprofile')) || (isset($_POST['mode']) && ($_POST['mode'] == 'viewprofile')) )
{
TheAlpha
Registered User
Posts: 3
Joined: Thu Nov 08, 2007 11:58 am

Re: [2.0.18] Cash Mod

Post by TheAlpha »

can you please help me?

i started a new forum, and have the cash mod installed.
in Currencies, i have in
Field: user_tokens

in name of currency i have: tokens

in
Default=0

in
decimals==0

is this all i need in the currency field section to make cash mod work right?
or do i need 2 currencies,
one
user_points

and one

user_tokens

???

Thanks for your replys.

is there a manual that can walk you through this process as well??
Thanks again

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

Re: [2.0.18] Cash Mod

Post by Brf »

All you need is one currency for Cash Mod itself to work.
If you want it to work with another mod that expects to see "user_points", then you need a currency that uses that database name.
User avatar
570thusaag
Registered User
Posts: 122
Joined: Thu May 19, 2005 1:44 am

Re: [2.0.18] Cash Mod

Post by 570thusaag »

Hope this is a new one...

I have installed the mod "Double post merge". Essentially, what it does is what it says- merges posts that are responses to one self within a certain time frame into one post. In a way, it is similar to the mod that prevents one from responding to self within 48 hours- but you can respond in the thread once someone else does. Basically, it is very similar.

Problem working with that and Cash Mod is that when Cash Mod is on, and you post, then respond to self and trigger flood control message, then browser "back", and click submit again (once the flood time is elapsed), you get the following Error Message:

Code: Select all

Error retrieving group data

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND user_pending = 0 ORDER BY group_id ASC' at line 4

SELECT group_id FROM phpbb_user_group WHERE user_id = AND user_pending = 0 ORDER BY group_id ASC

Line : 1219
File : functions_cash.php
Now, I am not sure how important this is, but I was hoping to find a "solution" as I can see people who used to post responses to self (when they "remember" something right after they post but are not savvy enough to hit "edit"), I can see them possibly getting this error.

This does not happen when Cash is off... but oddly, it DOES happen when cash is ON, yet you have rewards for posts all set to zero...

I will post the Double post merge text here just in case someone needs it and wanted to look to see if they could find a fix around this--- it is a very short bit of mod text...

Code: Select all

############################################################## 
## MOD Title: Double post merge
## MOD Author: Mercuree < mercuree@moldova.cc > ( Igor )
## MOD Description: 	This mod merges post text on posting
##			to the last message in topic
##			instead of adding a new one, only if
##			the poster of the last message
##			and the poster of current text is the
##			same person (double post becomes one post)
## MOD Version: 1.0.1
## 
## Installation Level: Easy
## Installation Time: 1 Minute
## 
## Files To Edit: 	posting.php
##			includes\function_post.php
##			admin\admin_board.php
##			language\lang_english\lang_admin.php
##			templates\subSilver\admin\board_config_body.tpl
## 
## Included Files: double_post_merge_mod_install.php
############################################################## 
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the 
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code 
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered 
## in our MOD-Database, located at: http://www.phpbb.com/mods/ 
############################################################## 
## Author Notes:
## 		your comments appreciated
## 		mailto: mercuree@moldova.cc
## 
## Thanks to: 
##      x, Xpert, ra
## 
############################################################## 
## MOD History: 
## 
##   2004-09-08 - Version 1.0.2
## 
##      - fixed bug: sometimes "added after" was calculated
##	  		incorrectly
## 
##   2004-03-25 - Version 1.0.1
## 
##      - messages will join only if the time since last message
##	  		is no more than XX hours (new field in board settings)
## 
##      - comment (separator between joined messages) changed to:
##	  		"Added after XX hours XX minutes XX seconds"
##	  		was:
## 	  		"Posted {date_in_php_date()_format}",
## 
##			- the date/time of last message updates to date/time of
##	  		added message. the next "added after" will count from
##	  		this time.
## 
##			- fixed bug: some smilies of the joined messages not showed
## 
##			- fixed bug: with htmlspecialchars
## 
##   2004-01-13 - Version 1.0.0
## 
##      - Initial Release
## 
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 
#
#-----[ SQL ]------------------------------------------
#
# during 18 (you can change this) hours messages will join to the last
#
# if you don't know nothing about SQL just run double_post_merge_mod_install.php
#
INSERT INTO bbcc_config (config_name, config_value) VALUES ('join_interval', '18');
#
#-----[ OPEN ]------------------------------------------
#
posting.php
#
#-----[ FIND ]------------------------------------------
#
	//
	// Submit post/vote (newtopic, edit, reply, etc.)
	//
#
#-----[ AFTER, ADD ]------------------------------------------
#
	// double_post eliminate start
	if ( $mode == 'reply' && $userdata['user_id'] != ANONYMOUS )
	{
		$poster_id = $userdata['user_id'];
		$sql = "SELECT post_id, poster_id, post_time, MAX(post_time) FROM " . POSTS_TABLE . " WHERE topic_id = $topic_id GROUP BY post_time ORDER BY post_time DESC LIMIT 1";
	
		if ( !($result = $db->sql_query($sql)) )
		{
			message_die(GENERAL_ERROR, 'Could not obtain forums information', '', __LINE__, __FILE__, $sql);
		}
		$post_id_last_row = $db->sql_fetchrow($result);
		$post_id = $post_id_last_row['post_id'];
		$current_time = time(); 
		$difference_time = $current_time - $post_id_last_row['post_time'];
		$hours = floor($difference_time/60/60); 
		$minutes = floor($difference_time/60%60);
		$seconds = $difference_time%60;
		$separator = ' \n\n[size=9][color=#999999]Added after';
		if ( $hours != 0 )			$separator .= ' ' . $hours . ' hours';
		if ( $minutes != 0 )			$separator .= ' ' . $minutes . ' minutes';
		if ( $hours == 0 && $minutes == 0 )	$separator .= ' ' . $seconds . ' seconds';
							$separator .= ':[/color][/size]\n\n ';
		
		if ( $post_id_last_row['poster_id'] == $poster_id && ( $difference_time < ( $board_config['join_interval'] * 3600 ) ) )
		{			
			$mode = 'editpost';
			$sql = "SELECT post_text, bbcode_uid FROM " . POSTS_TEXT_TABLE . " WHERE post_id = $post_id";
			if ( !($result = $db->sql_query($sql)) )
				{
					message_die(GENERAL_ERROR, 'Could not obtain forums information', '', __LINE__, __FILE__, $sql);
				}
			$last_message_row = $db->sql_fetchrow($result);
			$bb_uid = ':' . $last_message_row['bbcode_uid'];
			
			// i don't know much about parsing the message, so it may well be that,
			// there are some wrongs, anyway all seems to work fine
			$last_message = str_replace($bb_uid, '', $last_message_row['post_text']);
			$last_message = preg_replace('/\:[0-9a-z\:]+\]/si', ']', $last_message);
			$last_message = undo_htmlspecialchars(addslashes($last_message));
			
		}	
	}
	// double_post eliminate end
#
#-----[ FIND ]------------------------------------------
#
$bbcode_uid = '';
#
#-----[ AFTER, ADD ]------------------------------------------
#
	
	if ( !empty($last_message) )
	{
		$message = ( $last_message != $message ) ? $last_message . $separator . $message : $message;
		$added = 1;
	}

#
#-----[ FIND ]------------------------------------------
#
submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, $bbcode_on, $html_on, $smilies_on, $attach_sig, $bbcode_uid, str_replace("\'", "''", $username), str_replace("\'", "''", $subject), str_replace("\'", "''", $message), str_replace("\'", "''", $poll_title), $poll_options, $poll_length);
# 
#-----[ IN-LINE FIND ]------------------------------------------
# 
, $poll_length
# 
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
# 
, $added
# 
#-----[ OPEN ]------------------------------------------
#  
includes\function_post.php
# 
#-----[ FIND ]------------------------------------------
#  
function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id, &$topic_type, &$bbcode_on, &$html_on, &$smilies_on, &$attach_sig, &$bbcode_uid, &$post_username, &$post_subject, &$post_message, &$poll_title, &$poll_options, &$poll_length)
# 
#-----[ IN-LINE FIND ]------------------------------------------
# 
, &$poll_length
# 
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
# 
, &$added
# 
#-----[ FIND ]------------------------------------------
#  
	if ($mode == 'editpost')
# 
#-----[ BEFORE, ADD ]------------------------------------------
# 

	if ( $added && $mode == 'editpost' )
	{
		$sql = "UPDATE " . POSTS_TABLE . " SET post_time = " . $current_time . " WHERE post_id = " . $post_id;
		if ( !($result = $db->sql_query($sql)) )
		{
			message_die(GENERAL_ERROR, 'Could not update last post time', '', __LINE__, __FILE__, $sql);
		}
	}

#
#-----[ OPEN ]------------------------------------------
#
admin\admin_board.php
#
#-----[ FIND ]------------------------------------------
#
	"L_FLOOD_INTERVAL" => $lang['Flood_Interval'],
	"L_FLOOD_INTERVAL_EXPLAIN" => $lang['Flood_Interval_explain'], 
#
#-----[ AFTER, ADD ]------------------------------------------
#
	"L_JOIN_INTERVAL" => $lang['Join_Interval'],
	"L_JOIN_INTERVAL_EXPLAIN" => $lang['Join_Interval_explain'], 
#
#-----[ FIND ]------------------------------------------
#
	"FLOOD_INTERVAL" => $new['flood_interval'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
	"JOIN_INTERVAL" => $new['join_interval'],
#
#-----[ OPEN ]------------------------------------------
#
language\lang_english\lang_admin.php
#
#-----[ FIND ]------------------------------------------
#
$lang['Flood_Interval'] = 'Flood Interval';
$lang['Flood_Interval_explain'] = 'Number of seconds a user must wait between posts'; 
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['Join_Interval'] = 'Join messages in: (hours)';
$lang['Join_Interval_explain'] = 'Join messages of the same poster if interval between them is less than this quantity in hours';
#
#-----[ OPEN ]------------------------------------------
#
templates\subSilver\admin\board_config_body.tpl
#
#-----[ FIND ]------------------------------------------
#
	<tr>
		<td class="row1">{L_FLOOD_INTERVAL} <br /><span class="gensmall">{L_FLOOD_INTERVAL_EXPLAIN}</span></td>
		<td class="row2"><input class="post" type="text" size="3" maxlength="4" name="flood_interval" value="{FLOOD_INTERVAL}" /></td>
	</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
	<tr>
		<td class="row1">{L_JOIN_INTERVAL} <br /><span class="gensmall">{L_JOIN_INTERVAL_EXPLAIN}</span></td>
		<td class="row2"><input class="post" type="text" size="3" maxlength="4" name="join_interval" value="{JOIN_INTERVAL}" /></td>
	</tr>
# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52298
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: [2.0.18] Cash Mod

Post by Brf »

570thusaag wrote:

Code: Select all

SELECT group_id FROM phpbb_user_group WHERE user_id = AND user_pending = 0 ORDER BY group_id ASC

Line : 1219
File : functions_cash.php
This does not happen when Cash is off... but oddly, it DOES happen when cash is ON, yet you have rewards for posts all set to zero...
Not odd at all, considering the error is occuring within the Cash Mod.

Apparently, you have broken the addition to posting.php that Cash Mod adds to retrieve the original author of a topic you are replying to. With out pulling up the cm_install, I would look for the lines involving topic_poster. I will tell you that it might be a little tricky, because there are similar-looking lines in posting.php, so modders often put the code in the wrong place.

Since your mod is adding some extra SELECTs, you might be able to simply add the topic_poster whereever that mod is selecting post info.
User avatar
570thusaag
Registered User
Posts: 122
Joined: Thu May 19, 2005 1:44 am

Re: [2.0.18] Cash Mod

Post by 570thusaag »

Brf wrote:
570thusaag wrote:

Code: Select all

SELECT group_id FROM phpbb_user_group WHERE user_id = AND user_pending = 0 ORDER BY group_id ASC

Line : 1219
File : functions_cash.php
This does not happen when Cash is off... but oddly, it DOES happen when cash is ON, yet you have rewards for posts all set to zero...
Not odd at all, considering the error is occuring within the Cash Mod.

Apparently, you have broken the addition to posting.php that Cash Mod adds to retrieve the original author of a topic you are replying to. With out pulling up the cm_install, I would look for the lines involving topic_poster. I will tell you that it might be a little tricky, because there are similar-looking lines in posting.php, so modders often put the code in the wrong place.

Since your mod is adding some extra SELECTs, you might be able to simply add the topic_poster whereever that mod is selecting post info.

I want to make sure I understand you-- since assumptions on my part could cause me problems...

First, some info-

With cash mod on (setting "Disable Cash Mod" to "No"), this happens (Error/Debug Mode message have posted above). With it off ("Disable" = "Yes"), it doesn't. Additionally, with it "on" but ALL of the "cash forums" set to "Off", an odd thing happens... the MERGE mod does not work. I mean, not only does it not work, but the REPONSE goes missing altogether! (It does not tag itself as a new entry below the original, as normal in the boards before the merge mod was installed.) It is like Magic! Had to chuckle when I saw that.

So, that, coupled with your response, I am assuming that you mean that the Merge Mod text is 'within' the Cash Mod text, and that text is in posting.php? I am assuming that what you mean is that the Cash Mod code edit is likely in the right place, but that when I modded the Merge in, I "found" an insert point that looked right, but was not, and inadvertantly placed it within a Cash mod code segment, therefore interrupting a cash mod execution???

I think I can triangulate where this happens by looking at the Cash Mod code first, tracking it down, and seeing if the Merge Mod text is 'within' some of that code... and then see if in fact I put it in the wrong place...

This is what you meant???
Your last comment I don't understand though:
Since your mod is adding some extra SELECTs, you might be able to simply add the topic_poster whereever that mod is selecting post info.
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52298
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: [2.0.18] Cash Mod

Post by Brf »

Ug....

You are not getting the error when cash mod is disabled, because the code in functions_cash is not called. Therefore, you could not have an error.

In posting.php, cash_mod adds some extra code to SELECT the topic_poster, since one of the options is to pay the topic poster for any replies. Your merge-mod is doing some extra SELECTs, to merge sequencial topics by the same poster. That SELECT is not getting the topic poster, so the cash mod is being sent a blank field.

Setting a cash forum to "no" should have no effect whatsoever on a post being made at all. Cash Mod does not add any "IF"s to posting. Therefore it cannot have any effect on posting itself.
joeydee
Registered User
Posts: 292
Joined: Tue Mar 07, 2006 2:05 am

Re: [2.0.18] Cash Mod

Post by joeydee »

Im trying to understand what this CashMOD is... is it where people donate money? Or the more post users make the more the CASHMOD gives them points?

-Joey
Post Reply

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