[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
MarioSimpson
Registered User
Posts: 71
Joined: Mon Dec 25, 2006 4:24 pm
Contact:

Post by MarioSimpson »

well thats the only one i can find o.O

thunder88
Registered User
Posts: 158
Joined: Wed Dec 03, 2003 7:38 am

Post by thunder88 »

How do I get rid of the [ Change usernames Cash ] for admins while keeping [Donate] ?

User avatar
MarioSimpson
Registered User
Posts: 71
Joined: Mon Dec 25, 2006 4:24 pm
Contact:

Post by MarioSimpson »

I dont know if you can remove it for admins, but you can remove it for moderators :D

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

Post by Brf »

thunder88 wrote: How do I get rid of the [ Change usernames Cash ] for admins while keeping [Donate] ?


I found that whole thing annoying and cluttering the viewtopic....

I figured anyone could always Donate by clicking on the users' Profile link and donating from there.

So, I removed that whole section (other than the currency display) from viewtopic...

in cash_viewtopic.tpl

Remove this:

Code: Select all

<!-- BEGIN cashlinks -->
[ <a href="{cashlinks.U_LINK}" class="genmed">{cashlinks.L_NAME}</a> ]<br />
<!-- END cashlinks -->

If you want to keep some of the links, you need to go to includes/classes_cash and look for this block:

Code: Select all

			if ( ($cash->currency_count(CURRENCY_ENABLED | CURRENCY_EXCHANGEABLE) >= 2) && $userdata['session_logged_in'] )
			{
				$template->assign_block_vars('cashlinks',array(	'U_LINK' => append_sid("cash.$phpEx"),
																'L_NAME' => $lang['Exchange']));
			}
			if ( $cash->currency_count(CURRENCY_ENABLED | CURRENCY_DONATE,$forum_id) && ($userdata['user_id'] != $postdata['user_id']) && $userdata['session_logged_in'] )
			{
				$template->assign_block_vars('cashlinks',array(	'U_LINK' => append_sid('cash.'.$phpEx.'?mode=donate&ref=viewtopic&'.POST_USERS_URL.'='.$postdata['user_id'].'&'.POST_POST_URL.'='.$postdata['post_id']),
																'L_NAME' => $lang['Donate']));
			}
			if ( $cash->currency_count() && (($userdata['user_level'] == ADMIN) || (($userdata['user_level'] == MOD) && $cash->currency_count(CURRENCY_ENABLED | CURRENCY_MODEDIT | CURRENCY_VIEWTOPIC, $forum_id))) )
			{
				$template->assign_block_vars('cashlinks',array(	'U_LINK' => append_sid('cash.'.$phpEx.'?mode=modedit&ref=viewtopic&'.POST_USERS_URL.'='.$postdata['user_id'].'&'.POST_POST_URL.'='.$postdata['post_id']),
																'L_NAME' => sprintf($lang['Mod_usercash'],$postdata['username'])));
			}
and take out whichever blocks you do not want....There are three of them there: Exchange, Donate, and Moderate Cash.

falafelboy
Registered User
Posts: 29
Joined: Fri Oct 06, 2006 10:36 pm
Location: canada
Contact:

Post by falafelboy »

One more stupid question: what page does 'profile_view_body.tpl' correspond to?

I know we are supposed to add '{CASH}' to that page, but when I delete the whole file, it doesn't seem to change anything on my forum.

Logically, it would be the page for the 'profile' link in the user menu.

What does that '{CASH}' do?

thanks again.

fighting the never ending battle against confusion...

jerx
Registered User
Posts: 167
Joined: Fri Sep 02, 2005 4:27 am

Post by jerx »

falafelboy wrote: One more stupid question: what page does 'profile_view_body.tpl' correspond to?

I know we are supposed to add '{CASH}' to that page, but when I delete the whole file, it doesn't seem to change anything on my forum.

Logically, it would be the page for the 'profile' link in the user menu.

What does that '{CASH}' do?

thanks again.

fighting the never ending battle against confusion...


{Cash} displays your cash amount. Delete the files in cache directory and you will notice that profile_view_body.tpl is a very important file. :lol:

readme88
Registered User
Posts: 5
Joined: Wed Dec 06, 2006 11:43 pm
Location: Sydney

Post by readme88 »

Sorry for asking a stupid question, but I just installed cashMOD.
Everything is fine with it at the moment....

But what exactly does it do ?? Other than display your cash as a sign of rewards..

As is can you spend it on something??
Your help is much appreciated.

Rob

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

Post by Brf »

falafelboy wrote: One more stupid question: what page does 'profile_view_body.tpl' correspond to?

I know we are supposed to add '{CASH}' to that page, but when I delete the whole file, it doesn't seem to change anything on my forum.

Logically, it would be the page for the 'profile' link in the user menu.


That is the viewprofile, for viewing another user's profile. The script is profile + includes/usercp_viewprofile.
The Profile link takes you to your own editprofile.

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

Post by Brf »

readme88 wrote: As is can you spend it on something??


Yes. But you would need to install add-ons to spend it.

On my own forum, I have wGEric Store, and my own Virtual Casino.

tacofish
Registered User
Posts: 51
Joined: Sat Dec 23, 2006 4:05 pm

Post by tacofish »

Brf wrote:
tacofish wrote: Okay, I edited the file, but it didn't change anything. Any ideas?


I dont have much to go on, without even knowing your website url....

Did you put {CASH} in your profile-view_body.tpl?


haven't had time for admin work lately. But checking this now, I am
not sure what you mean by put {CASH} in profile-view_body.tpl

What exactly should I put where? Exactly this: {CASH} and where
in profile-view_body.tpl does it go? I'm confused, sorry.

falafelboy
Registered User
Posts: 29
Joined: Fri Oct 06, 2006 10:36 pm
Location: canada
Contact:

Post by falafelboy »

jerx wrote:
falafelboy wrote:One more stupid question: what page does 'profile_view_body.tpl' correspond to?

I know we are supposed to add '{CASH}' to that page, but when I delete the whole file, it doesn't seem to change anything on my forum.

Logically, it would be the page for the 'profile' link in the user menu.

What does that '{CASH}' do?

thanks again.

fighting the never ending battle against confusion...


{Cash} displays your cash amount. Delete the files in cache directory and you will notice that profile_view_body.tpl is a very important file. :lol:



O.K. in that case, the {CASH} function is not working properly then. It doesn't display anything in the person's profile.

This is how my file looks right now:

...
<tr>
<td valign="middle" align="right" nowrap="nowrap"><span class="gen">{L_OCCUPATION}:&nbsp;</span></td>
<td><b><span class="gen">{OCCUPATION}</span></b></td>
</tr>
<tr>
<td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_INTERESTS}:</span></td>
<td> <b><span class="gen">{INTERESTS}</span></b></td>
</tr>
<tr>
<td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_REPUTATION}:</span></td>
<td> <span class="gen">{REPUTATION}</span></td>
</tr>{CASH}
</table>
</td>
</tr>


...

just followed what the instructions said.

thx.

User avatar
Dean Saliba
Registered User
Posts: 15
Joined: Tue Jul 29, 2003 4:23 am
Location: London, UK
Contact:

Post by Dean Saliba »

Absolutely brillient!

I managed to get it working first time! GO ME! :wink:

If anyone wants to check out what it looks like, before they install it, then they can check out the links below from my demo board:

How it looks in posts:
http://eastlondonhosting.co.uk/phptest/ ... ic.php?t=1

And how it looks on the profile:
http://eastlondonhosting.co.uk/phptest/ ... rofile&u=2
Need Webhosting? Forum Mods Installed?
Fantastic prices!
East London Hosting

jerx
Registered User
Posts: 167
Joined: Fri Sep 02, 2005 4:27 am

Post by jerx »

falafelboy wrote: O.K. in that case, the {CASH} function is not working properly then. It doesn't display anything in the person's profile.


Try this:

open includes/classes_cash.php:

find:

Code: Select all

         global $board_config, $lang, $phpEx, $cash; 
         if ( $board_config['cash_disable']) 
         { 
            return; 
         } 
         $template = new Template_plus(); 
         $template->set($old_template);


replace with:

Code: Select all

         global $board_config, $lang, $phpEx, $cash, $template; 
         if ( $board_config['cash_disable']) 
         { 
            return; 
         }


find:

Code: Select all

$template->assign_block_var_from_handle('CASH', 'cm_viewprofile'); 
replace with:

Code: Select all

$template->assign_var_from_handle('CASH', 'cm_viewprofile');
Last edited by jerx on Mon Jan 22, 2007 12:40 am, edited 1 time in total.

falafelboy
Registered User
Posts: 29
Joined: Fri Oct 06, 2006 10:36 pm
Location: canada
Contact:

Post by falafelboy »

It worked.

Amazing thanks. Now...onto my other mods and problems.

:oops:

tacofish
Registered User
Posts: 51
Joined: Sat Dec 23, 2006 4:05 pm

Post by tacofish »

I am still having a problem with cash not showing up in profiles. Here is
what my code looks like:

<tr>
<td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_BANK}:</span></td>
<td> <span class="gen">{BANK_GOLD} {L_POINTS_NAME}</span></td>
</tr>

{CASH}

</table>
</td>
</tr>

So, it seems like it should be working right? What else could be wrong?

Post Reply

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