[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

eyedenigh
Registered User
Posts: 48
Joined: Tue May 25, 2004 10:29 am
Contact:

Post by eyedenigh » Sun May 01, 2005 8:01 am

hey there , im thinking of installing this on my board im just wondering if it will be able to do what I need it to :)

Basicly I run a large hiphop website , as part of that site there is a text battle forum. Basically people ' battle ' each other ( with typed out verses ) these battles are voted on then a winner decided.

Bascicly im wondering if I Have the cash mod only running in the battle forum and the cash people have earned only viewable in this forum. ie. When someone posts in another forum you cannot see they have any 'cash' only in the battle forum

sorry if that dident make any sense heh

helluvaguy
Registered User
Posts: 155
Joined: Fri Sep 07, 2001 12:06 pm

Post by helluvaguy » Sun May 01, 2005 8:34 am

eyedenigh wrote: hey there , im thinking of installing this on my board im just wondering if it will be able to do what I need it to :)

Basicly I run a large hiphop website , as part of that site there is a text battle forum. Basically people ' battle ' each other ( with typed out verses ) these battles are voted on then a winner decided.

Bascicly im wondering if I Have the cash mod only running in the battle forum and the cash people have earned only viewable in this forum. ie. When someone posts in another forum you cannot see they have any 'cash' only in the battle forum

sorry if that dident make any sense heh
With this mod the admin decides in which forums the mod is active. So if you want the users only to earn cash in that battleforum of yours, its doable. You also decide the amount each user gets for his/her post, based on a general amount per post and/or an amount per letter. You can also assign an bonus to the winner of the battle, but that wouldn't work automatically. The admin or mods can moderate the cash of each user. If you want you can also disable the visibility in those forums where nothing is earned.
You can also manage to let guests don't see a thing (code to this can be found with in this post, I think. :evilgrin:)
Hope that cleared it a bit

eyedenigh
Registered User
Posts: 48
Joined: Tue May 25, 2004 10:29 am
Contact:

Post by eyedenigh » Sun May 01, 2005 11:17 am

Thanks for that , well you sold me and installed it ( with easymod ) and all appeared to go though fine .. but .. heh

sorry if this has been brought up before , well I know it has cause I read though about 40 pages and saw the same error heaps but no fix

Anyway I installed this fine but got the following error when trying to view a topic ( view index / forum was fine )

Fatal error: Class template_plus: Cannot inherit from undefined class template in /forums/includes/classes_cash.php on line 40

Im usuing the extended template mod :)

helluvaguy
Registered User
Posts: 155
Joined: Fri Sep 07, 2001 12:06 pm

Post by helluvaguy » Sun May 01, 2005 11:39 am

Sorry, but i wouldn't know the answer to that.

rocez
Registered User
Posts: 1
Joined: Sun May 01, 2005 12:50 pm

Post by rocez » Sun May 01, 2005 12:53 pm

I Installed this, and everthing seems to work fine. No errors!

But I can't see the points anywhere. Not even in the user profiles, what to do?

helluvaguy
Registered User
Posts: 155
Joined: Fri Sep 07, 2001 12:06 pm

Post by helluvaguy » Sun May 01, 2005 9:17 pm

Did you activate the display in the ACP?

FlapCat
Registered User
Posts: 45
Joined: Tue Feb 15, 2005 12:30 pm

Post by FlapCat » Mon May 02, 2005 4:02 pm

Ok....I just got the new version (222). I have the category hierarchy mod installed, EasyMod, bank, shop and forum permissions. And if it matters, I have the myth2 template. When I try to view posts, I get this error message:
PHP Parse error: parse error in D:\hshome\flapcat\larionad.g2gm.net\lma\viewtopic.php on line 1383


I suppose, if there is no other choice, I can wipe down AGAIN (will make easily the 10th time) and reinstall everything one at a time, but if there is a way around that, I would LOVE to know what it is. Here is the link to the text document that is my viewtopic.php file I am sorry that the lines aren't numbered, for some reason, even though I have my server set to number them, it never does. Thanks in advance for your help!

Twiisted_Kaos
Registered User
Posts: 10
Joined: Mon May 02, 2005 9:07 am

Post by Twiisted_Kaos » Mon May 02, 2005 5:55 pm

Is there anyway i can disable the spam thing cause i'd like the user to get the point right after they ahve posted a message thanks in advance

Spooky_cz
Registered User
Posts: 2
Joined: Mon May 02, 2005 6:06 pm
Location: My chair
Contact:

Re: cash mod..

Post by Spooky_cz » Mon May 02, 2005 6:09 pm

otero wrote: i intalled cash mod on subsiver template and it works great , it works the way it should, but i having trouble intalling it in DutyGreen template... chash mod menu does show on the control panel but it doesnt show the points when a user writes a post :( it also doesnt show how many points a user has in their profile ... its like i never installed it but i can see the cash menu on the control panel...

thankss!!
you have to edit files in your new template again

Spooky_cz
Registered User
Posts: 2
Joined: Mon May 02, 2005 6:06 pm
Location: My chair
Contact:

Post by Spooky_cz » Mon May 02, 2005 6:12 pm

i cant find cash mod allowances plug-in,plz help me!

on1x1
Registered User
Posts: 1
Joined: Sun May 01, 2005 5:47 pm

Post by on1x1 » Mon May 02, 2005 10:50 pm

how can i add a donate button in the profile?
it's only available in viewtopic :cry:

JupiterPOI
Registered User
Posts: 42
Joined: Tue Mar 30, 2004 4:33 am

Post by JupiterPOI » Tue May 03, 2005 1:25 am

Since the search function sucks here and this thread is WAY TOO LONG....

How do I use minus points?

I basically want to charge people for creating a thread. Putting a minus in front of the points in the setup screen does not work. Any thoughts?

LordHogfFred
Registered User
Posts: 3
Joined: Tue May 03, 2005 11:29 pm

Post by LordHogfFred » Tue May 03, 2005 11:32 pm

Can someone please help me?
I'm trying to install Moogies RPG mod on my forum and want to use the new cash mod 2.2.2 with it.
I have a section of code that I need to add to support the cash mod however the code I need to alter that is related to the cash mod doesn't seem to exist in the new 2.2.2 version.
Here is the old code I need to find:

Code: Select all

   $cash_message = ""; 
   if ( !$board_config['cash_disable'] ) 
   { 
      $cash_message = cash_update($mode,$forum_id,$post_id,$post_message,$current_time); 
   } 
And this is what I need to add:

Code: Select all

//ADD POINTS & EXPERIENCE, check experience & gain level if necessary 
//create levelup message to be displayed after posting 

//get stats config 
   $c2sql = "select config_value from phpbb_config where config_name='statsconfig'"; 
   if ( !($c2result = $db->sql_query($c2sql)) ) { message_die(GENERAL_MESSAGE, 'Fatal Error!'); } 
   $c2row = $db->sql_fetchrow($c2result); 
$stats_config = explode(',',$c2row['config_value']); 


      $cash_message = ""; 
      if ( !$board_config['cash_disable'] ) 
      { 
         $cash_message = cash_update($mode,$forum_id,$post_id,$post_message,$current_time); 

//experience amounts for posting 
         $gainexp = abs( ( $mode == 'newtopic' ) ? rand($stats_config[10],$stats_config[11]) : rand($stats_config[8],$stats_config[9]) ); 
         if( $userdata['session_logged_in'] ) 
         { 

//levelup check 
$poster_expmax = $stats_config[0]; 
$new_exp = $userdata['user_exp']+$gainexp; 
$new_lvl_exp = $new_exp - $poster_expmax; 

//get level gains for user's class 
   $classsql = "select statgains from phpbb_classes where class='$userdata[user_class]'"; 
   if ( !($classresult = $db->sql_query($classsql)) ) { message_die(GENERAL_MESSAGE, 'Fatal Error!'); } 
   $classrow = $db->sql_fetchrow($classresult); 
$stat_gains = explode(',',$classrow['statgains']); 

//level gains 
$hpgain = rand($stat_gains[0],$stat_gains[1]); $mpgain = rand($stat_gains[2],$stat_gains[3]); $attgain = rand($stat_gains[4],$stat_gains[5]); $defgain = rand($stat_gains[6],$stat_gains[7]); 

//if they've gained a level, update level, hp, mp, att, def & experience, if not, just update experience. 
$islevelup = ($new_exp >= $poster_expmax) ? 'yes' : 'no'; 
$levelup = ($new_exp >= $poster_expmax) ? ', user_statlevel = user_statlevel + 1, user_hpmax = user_hpmax + '.$hpgain.', user_mpmax = user_mpmax + '.$mpgain.', user_att = user_att + '.$attgain.', user_def = user_def + '.$defgain.', user_exp = '.$new_lvl_exp.' ' : ', user_exp = '.$new_exp. ' '; 
//create message to be displayed after posting! 
$levelupmessage = ($islevelup == 'yes') ? "<b>You've gone up a level!</b><BR>Hit Points increased by ".$hpgain.", Magic Points increased by ".$mpgain.".<BR>Attack increased by ".$attgain.", Defence increased by ".$defgain.".<P>" : ""; 

            $sql = "UPDATE " . USERS_TABLE . " SET" . 
                  substr($levelup,1) . 
                  "WHERE user_id = $userdata[user_id]"; 

            if( !$db->sql_query($sql) ) 
            { 
               message_die(GENERAL_ERROR, 'Could not update user points, experience or statistics.', '', __LINE__, __FILE__, $sql); 
            } 
         } 
         $cash_message .= "<br /> " . $levelupmessage; 
      } 
I don't know how the code works so I was hoping that someone would be able to convert this code to work with the new cash mod?

Thanks,

LordHogfFred
Registered User
Posts: 3
Joined: Tue May 03, 2005 11:29 pm

Post by LordHogfFred » Wed May 04, 2005 4:32 am

Can anyone please direct me to where I can get the allowance mod for the cash plugin please?

Thanks :),

blinddruid
Registered User
Posts: 52
Joined: Thu Apr 15, 2004 3:17 pm

Post by blinddruid » Wed May 04, 2005 2:24 pm

I have installed the cash mod on my board and when users try to post anything they get the following error message -

Parse error: parse error, unexpected '=' in /home/sensne2/public_html/forum/posting.php on line 249

Thankfully I keep a backup of all files. Anyway here is the coding from posting.php in the general area of line 249. I ahve bolded and enlarged line 249 for reference. Any ideas? Please? I need this to run Fantasy Sports mod v3.2

case 'quote':
case 'editpost':
case 'delete':
case 'poll_delete':
if ( empty($post_id) )
{
message_die(GENERAL_MESSAGE, $lang['No_post_id']);
}
$temp = $submit;
$submit = !(!$submit || ( isset($board_config['cash_disable']) && !$board_config['cash_disable'] && (($mode == 'editpost') || ($mode == 'delete'))));

$select_sql = ( !$submit ) ? ", t.topic_title, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_draft, p.post_username, pt.post_subject, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig" : '';
// start mod save posts as drafts (and end mod too) ... in the preceding line (definition of $select_sql), add reference to post_draft column in table

$from_sql = ( !$submit ) ? ", " . POSTS_TEXT_TABLE . " pt, " . USERS_TABLE . " u" : '';
$where_sql = ( !$submit ) ? "AND pt.post_id = p.post_id AND u.user_id = p.poster_id" : '';
submit = $temp;
unset($temp);
$select_sql .= ( $mode == 'delete' ) ? ', p.reporter_id' : ''; // ADDED BY Report post hack

$sql = "SELECT f.*, t.topic_id, t.topic_status, t.topic_type, t.topic_first_post_id, t.topic_last_post_id, t.topic_vote, p.post_id, p.poster_id" . $select_sql . "
FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f" . $from_sql . "
WHERE p.post_id = $post_id
AND t.topic_id = p.topic_id
AND f.forum_id = p.forum_id
$where_sql";
break;

Post Reply

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