Page 699 of 798

Posted: Sat Jan 20, 2007 2:38 pm
by MarioSimpson
well thats the only one i can find o.O

Posted: Sat Jan 20, 2007 4:25 pm
by thunder88
How do I get rid of the [ Change usernames Cash ] for admins while keeping [Donate] ?

Posted: Sat Jan 20, 2007 5:00 pm
by MarioSimpson
I dont know if you can remove it for admins, but you can remove it for moderators :D

Posted: Sat Jan 20, 2007 6:34 pm
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.

Posted: Sun Jan 21, 2007 3:37 am
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...

Posted: Sun Jan 21, 2007 10:22 am
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:

Posted: Sun Jan 21, 2007 11:21 am
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??

Posted: Sun Jan 21, 2007 1:05 pm
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.

Posted: Sun Jan 21, 2007 1:07 pm
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.

Posted: Sun Jan 21, 2007 6:19 pm
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.

Posted: Sun Jan 21, 2007 8:53 pm
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.

Posted: Sun Jan 21, 2007 9:31 pm
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

Posted: Sun Jan 21, 2007 9:47 pm
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');

Posted: Sun Jan 21, 2007 10:09 pm
by falafelboy
It worked.

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

:oops:

Posted: Mon Jan 22, 2007 1:38 am
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?