[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

Nabbe
Registered User
Posts: 2
Joined: Thu Nov 30, 2006 9:57 pm

Post by Nabbe »

I downloaded this cash-mod. But now I cant find any add-ons to fit it, like shop or bank. I tried the shop at www.phpbbhacks.com but it did not work...

Anyone can help me out here, finding a shop thats compatible? I tried the one listed in one of the first messages, but it did not work either...

Apoxol
I've Been Banned!
Posts: 35
Joined: Thu Nov 30, 2006 1:42 pm

Post by Apoxol »

This is a great mod, I'm using it, good job on it! :wink:

User avatar
Jackanape
Registered User
Posts: 1076
Joined: Wed Oct 13, 2004 6:01 am
Location: Capitol of the Great State of New York
Name: Jack Drury
Contact:

Post by Jackanape »

Nabbe wrote: I downloaded this cash-mod. But now I cant find any add-ons to fit it, like shop or bank. I tried the shop at www.phpbbhacks.com but it did not work...

Anyone can help me out here, finding a shop thats compatible? I tried the one listed in one of the first messages, but it did not work either...


http://www.phpbb.com/phpBB/viewtopic.php?t=361469

Great mod, and getting better by the day!
~Extending the rule of meticulous exactitude to exaspirating punctillio...still.~
Treat your phpBB like a member of the family--Update and MOD her by hand, with HTML-Kit
: : Wanna Talk Poker? : : Image : :

Sachiko
Registered User
Posts: 36
Joined: Tue Feb 24, 2004 4:51 am
Contact:

Post by Sachiko »

Hi,

[nevermind, fixed]

Although, I'd like to ask what ARE ways to reward people 8O? I mean, rather than the admins manually rewarding the members cash?
Last edited by Sachiko on Fri Dec 01, 2006 9:17 am, edited 2 times in total.

Nabbe
Registered User
Posts: 2
Joined: Thu Nov 30, 2006 9:57 pm

Post by Nabbe »

Thank you ever so much! I will try that one out!

User avatar
Jackanape
Registered User
Posts: 1076
Joined: Wed Oct 13, 2004 6:01 am
Location: Capitol of the Great State of New York
Name: Jack Drury
Contact:

Post by Jackanape »

A dilemma:

I'm tweaking my Cashmod install, and I'm trying to add commas, and eliminate decimals in my displayed user cash. So, looking at the "number_format" function, I tried making some changes to my functions_cash file. On line 835, I altered the following function:
function display($amount,$surpress_image = false,$quotes = false)
{
if( $this->mask(CURRENCY_PREFIX) )
{
return ($this->name($surpress_image,$quotes,$bbcode) . ' ' . $amount);
}
else
{
return ($amount . ' ' . $this->name($surpress_image,$quotes));
}
}


to read:
function display($amount,$surpress_image = false,$quotes = false)
{
$amount = number_format($amount);
if( $this->mask(CURRENCY_PREFIX) )
{
return ($this->name($surpress_image,$quotes,$bbcode) . ' ' . $amount);
}
else
{
return ($amount . ' ' . $this->name($surpress_image,$quotes));
}
}


Which should work, but I immediately get the following error, which seems pretty insane:
Parse error: parse error in c:\program files\easyphp1-8\www\forum\includes\functions_cash.php on line 168


I'm using easyPHP as my testing grounds, but what's really weird, is that even after I remove that line and save the file, it still gives me tha same error...I actually have to overwrite the file with my backup to restore things...

Any ideas???

update:
I tried it on my live site, and got this error:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/wtpoker/domains/wannatalkpoker.com/public_html/forum/includes/functions_cash.php on line 168


What the???
~Extending the rule of meticulous exactitude to exaspirating punctillio...still.~
Treat your phpBB like a member of the family--Update and MOD her by hand, with HTML-Kit
: : Wanna Talk Poker? : : Image : :

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

Post by Brf »

I dont know where your parse error came from, but $amount is passed by-value, so you shouldnt be trying to change it. You are better off using a different variable.

That line is 836...
168 is in the quotes section that you were messing around with in your other thread.

User avatar
Jackanape
Registered User
Posts: 1076
Joined: Wed Oct 13, 2004 6:01 am
Location: Capitol of the Great State of New York
Name: Jack Drury
Contact:

Post by Jackanape »

Right, but I haven't started touching the quotes variable yet.

In fact, this is the first edit I've made to functions_cash...

What I'm trying to do is round up my displayed number, and add a comma for the thousands...this should be the way to make it work...
~Extending the rule of meticulous exactitude to exaspirating punctillio...still.~
Treat your phpBB like a member of the family--Update and MOD her by hand, with HTML-Kit
: : Wanna Talk Poker? : : Image : :

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

Post by Brf »

Yes. But your error is on line 168, which in mine is in quoteslash. The line you are displaying above is line 836.

User avatar
Jackanape
Registered User
Posts: 1076
Joined: Wed Oct 13, 2004 6:01 am
Location: Capitol of the Great State of New York
Name: Jack Drury
Contact:

Post by Jackanape »

Same here...which is why I'm so blasted confused. This function I'm editing does contain reference to quotes, could that be it? Here, in my travels, I found some similar posts in this topic:

Someone trying the exact same thing, with apparent success:

http://www.phpbb.com/phpBB/viewtopic.ph ... at#1900367

And something similar, where you helped point in the right direction, brf:

http://www.phpbb.com/phpBB/viewtopic.ph ... at#2379194

Now, my functions cash has this function at 168, I've highlighted 168 itself:
function quoteslash($text,$quotes)
{
if ( is_array($quotes) )
{
for ($i = 0; $i < count($quotes); $i++ )
{
if ( $quotes[$i] == '\'' )
{
$text = str_replace('\'',''',$text);
}
else if ( $quotes[$i] == '"' )
{
$text = str_replace('"','"',$text);
}
else if ( $quotes[$i] != '' )
{
$text = str_replace($quotes[$i],'\\' . $quotes[$i],$text);
}
}



And, again, I haven't edited this file before today...I'm just completely at sea here...it's bizarre...and the worst part is, even when i undo the edit and return the file to its original state, I need to actually overwrite it with another file before I can get past the error again...

If it had only happened on my local test forum, I would think something is wrong there...
~Extending the rule of meticulous exactitude to exaspirating punctillio...still.~
Treat your phpBB like a member of the family--Update and MOD her by hand, with HTML-Kit
: : Wanna Talk Poker? : : Image : :

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

Post by Brf »

Ah.... Does yours really look like that? Or like this, without the extra spaces?

Code: Select all

function quoteslash($text,$quotes) 
{ 
	if ( is_array($quotes) )
	{
		for ($i = 0; $i < count($quotes); $i++ )
		{
			if ( $quotes[$i] == '\'' )
			{
				$text = str_replace('\'','& # 0 3 9 ; ',$text);
			}
			else if ( $quotes[$i] == '"' )

User avatar
Jackanape
Registered User
Posts: 1076
Joined: Wed Oct 13, 2004 6:01 am
Location: Capitol of the Great State of New York
Name: Jack Drury
Contact:

Post by Jackanape »

let's see, I used the quote function before to highlight the right line...

Code: Select all

function quoteslash($text,$quotes) 
{ 
	if ( is_array($quotes) )
	{
		for ($i = 0; $i < count($quotes); $i++ )
		{
			if ( $quotes[$i] == '\'' )
			{
				$text = str_replace('\'',''',$text);
			}
			else if ( $quotes[$i] == '"' )
Looks the same, except I see you've modified yours a bit?

Ultimately, I suppose I can get by without what is really a cosmetic change, but now it's just a frustrating puzzle...
~Extending the rule of meticulous exactitude to exaspirating punctillio...still.~
Treat your phpBB like a member of the family--Update and MOD her by hand, with HTML-Kit
: : Wanna Talk Poker? : : Image : :

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

Post by Brf »

Brf wrote:

Code: Select all

			{
				$text = str_replace('\'','& # 0 3 9 ; ',$text);


I put spaces in that code, because bbcode was converting it to a single-quote. Does yours have a single-quote, or the code displayed above?

User avatar
Jackanape
Registered User
Posts: 1076
Joined: Wed Oct 13, 2004 6:01 am
Location: Capitol of the Great State of New York
Name: Jack Drury
Contact:

Post by Jackanape »

Code: Select all

{
				$text = str_replace('\'',' & # 0 3 9 ; ',$text);
Mine is as displayed above, cut and pasted...I had to add spaces, too.
~Extending the rule of meticulous exactitude to exaspirating punctillio...still.~
Treat your phpBB like a member of the family--Update and MOD her by hand, with HTML-Kit
: : Wanna Talk Poker? : : Image : :

Yego
Registered User
Posts: 4
Joined: Sat Dec 02, 2006 12:02 am

Post by Yego »

Just a quick question ... b/c I don't want to read 600 pages...
I have phpBB 2.0.21 , which Cash Mod version do I have to install?

Post Reply

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