[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

Q-Zar
Registered User
Posts: 779
Joined: Sun Nov 17, 2002 8:30 pm
Location: Brussels
Contact:

Post by Q-Zar »

Emberem wrote: How do I run it? I uploaded it and it doesn't work yet.


To install the tables you need to open the file from your browser, i.e. http://notquitecamelot.com/forum/mysql_install.php

It should give you a message about what he installed, saying if it succeeded or not.

Xore : just thinking you won't get fed up that quickly if someone else answers basic questions ;) Also I live in a different time zone so there is more support :P
Traductions : Cash Mod v2.2.2 (Getting Started) / Dice Mod v1.2.3 / Activity Mod Plus 1.0.8
Remember this. Please read the F.A.Q/Troubleshooting of a mod before asking questions.
Image
Xore
Former Team Member
Posts: 2594
Joined: Wed Apr 16, 2003 7:42 pm
Location: the wastelands between insomnia and clairvoyance
Contact:

Post by Xore »

Emberem wrote:

Code: Select all

SQL Error : 1146 Table 'notquite_xmb1.phpbb_cash' doesn't exist

SELECT cash_dbfield, cash_name, cash_image, cash_imageurl FROM phpbb_cash WHERE cash_enabled = 1 AND cash_postdisplay = 1 ORDER BY cash_order ASC

Line : 393
File : /websites/notquite/public_html/forum/viewtopic.php
Is the code by the way, i think I posted it before but I'm not sure.


yea, you definately need to run that file

assuming it's in your phpbb main directory (it won't work anywhere else), just go to your browser www.yourdomain.com/phpbb_directory/sql_install.php
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod
Emberem
Registered User
Posts: 98
Joined: Fri Aug 08, 2003 11:17 am
Location: UK
Contact:

Post by Emberem »

*stunned* wow you guys are great! Only thing I'm asking now is does ot show up in the profile or anything. Its not showing up anywhere so far.

Thanks in advance!

The pages seem to be working touchwood. I'm so happy, should I configure the money stuff now? :D
Xore
Former Team Member
Posts: 2594
Joined: Wed Apr 16, 2003 7:42 pm
Location: the wastelands between insomnia and clairvoyance
Contact:

Post by Xore »

Emberem wrote: *stunned* wow you guys are great! Only thing I'm asking now is does ot show up in the profile or anything. Its not showing up anywhere so far.

Thanks in advance!

The pages seem to be working touchwood. I'm so happy, should I configure the money stuff now? :D


Yea. for the most part, before anything shows up in profile or topics, you need to create currencies via Cash Currencies admin panel. If you're interested in using other mods (ie shop, rpg, etc) most of them will require that the currency you use to interact with them has the database field 'user_points'. Keep this in mind, when creating currencies.

Cheers
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod
Emberem
Registered User
Posts: 98
Joined: Fri Aug 08, 2003 11:17 am
Location: UK
Contact:

Post by Emberem »

Code: Select all

Parse error: parse error, expecting `'{'' in /websites/notquite/public_html/forum/includes/functions_post.php on line 494
here is what I have

Code: Select all

        if ( !$board_config['cash_disable'] )
for 494!

This shows up on private messages. help!
Emberem
Registered User
Posts: 98
Joined: Fri Aug 08, 2003 11:17 am
Location: UK
Contact:

Post by Emberem »

And when i try to post.

Code: Select all

Parse error: parse error, expecting `'{'' in /websites/notquite/public_html/forum/includes/functions_post.php on line 494

Fatal error: Call to undefined function: generate_smilies() in /websites/notquite/public_html/forum/posting.php on line 934

For the fatal error my code is

Code: Select all

        'pollbody' => 'posting_poll_body.tpl',
and for the parse error file the line is

Code: Select all

        if ( !$board_config['cash_disable'] ){
Xore
Former Team Member
Posts: 2594
Joined: Wed Apr 16, 2003 7:42 pm
Location: the wastelands between insomnia and clairvoyance
Contact:

Post by Xore »

Emberem wrote:

Code: Select all

Parse error: parse error, expecting `'{'' in /websites/notquite/public_html/forum/includes/functions_post.php on line 494
here is what I have

Code: Select all

        if ( !$board_config['cash_disable'] )
for 494!


can you also post maybe 10 lines above and below this line?
The actual errors can happen nearly anywhere (usually within this range) of the line it gives off as being the error, because of the way the php interpretter works. (likewise, that's why you're getting the generate smilies error... it's defined later in the file, and later php code can't find it)
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod
Emberem
Registered User
Posts: 98
Joined: Fri Aug 08, 2003 11:17 am
Location: UK
Contact:

Post by Emberem »

Code: Select all

                        message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
                }
        }

        return;
}

//
// Delete a post/poll
//
function delete_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id)
        if ( !$board_config['cash_disable'] ){
        cash_update($mode,$forum_id,$post_id,$post_message);
        }
{
        global $board_config, $lang, $db, $phpbb_root_path, $phpEx;
        global $userdata, $user_ip;

        if ($mode != 'poll_delete')
        {
              
for the parse error.

Code: Select all

                $hidden_form_fields .= '<input type="hidden" name="' . POST_TOPIC_URL . '" value="' . $topic_id . '" />';
                break;

        case 'editpost':
                $page_title = $lang['Edit_Post'];
                $hidden_form_fields .= '<input type="hidden" name="' . POST_POST_URL . '" value="' . $post_id . '" />';
                break;
}

// Generate smilies listing for page output
generate_smilies('inline', PAGE_POSTING);

//
// Include page header
//
include($phpbb_root_path . 'includes/page_header.'.$phpEx);

$template->set_filenames(array(
        'body' => 'posting_body.tpl',
        'pollbody' => 'posting_poll_body.tpl',
        'reviewbody' => 'posting_topic_review.tpl')
);
for the fatal error.
Xore
Former Team Member
Posts: 2594
Joined: Wed Apr 16, 2003 7:42 pm
Location: the wastelands between insomnia and clairvoyance
Contact:

Post by Xore »

Before:
//
// Delete a post/poll
//
function delete_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id)
if ( !$board_config['cash_disable'] ){
cash_update($mode,$forum_id,$post_id,$post_message);
}

{
global $board_config, $lang, $db, $phpbb_root_path, $phpEx;
global $userdata, $user_ip;


if ($mode != 'poll_delete')
{


After:
//
// Delete a post/poll
//
function delete_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id)
{
global $board_config, $lang, $db, $phpbb_root_path, $phpEx;
global $userdata, $user_ip;

if ( !$board_config['cash_disable'] ){
cash_update($mode,$forum_id,$post_id,$post_message);
}


if ($mode != 'poll_delete')
{
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod
Emberem
Registered User
Posts: 98
Joined: Fri Aug 08, 2003 11:17 am
Location: UK
Contact:

Post by Emberem »

Its come up with more errors. :( Can someone send me a file with the whole code for 2.0.6 includes/functions_post.php and posting.php thats right. Because I dont know whats going on.
Emberem
Registered User
Posts: 98
Joined: Fri Aug 08, 2003 11:17 am
Location: UK
Contact:

Post by Emberem »

Code: Select all

                        }

                        if ( !($row = $db->sql_fetchrow($result)) )
                        {
                                $sql = "UPDATE " . VOTE_RESULTS_TABLE . "
                                        SET vote_result = vote_result + 1
                                        WHERE vote_id = $vote_id
                                                AND vote_option_id = $vote_option_id";
                                if ( !$db->sql_query($sql, BEGIN_TRANSACTION) )
                                {
                                        message_die(GENERAL_ERROR, 'Could not update poll result', '', __LINE__, __FILE__, $sql);
                                }

                                $sql = "INSERT INTO " . VOTE_USERS_TABLE . " (vote_id, vote_user_id, vote_user_ip)
                                        VALUES ($vote_id, " . $userdata['user_id'] . ", '$user_ip')";
                                if ( !$db->sql_query($sql, END_TRANSACTION) )
                                {
                                        message_die(GENERAL_ERROR, "Could not insert user_id for poll", "", __LINE__, __FILE__, $sql);
                                }

                                $message = $lang['Vote_cast'];
Thats what I get for code the error code says is wrong.

And for the reply I get there is an error on 1083 in another file but there isn't any line 1083

these are are the last 10 files of posting.php (without 1083)

Code: Select all

        $template->assign_block_vars('switch_inline_mode', array());
        $template->assign_var_from_handle('TOPIC_REVIEW_BOX', 'reviewbody');
}

$template->pparse('body');

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>
Xore
Former Team Member
Posts: 2594
Joined: Wed Apr 16, 2003 7:42 pm
Location: the wastelands between insomnia and clairvoyance
Contact:

Post by Xore »

are you manually installing these yourself or are you using a script?

because i honestly don't see how you could have gotten the error that i showed you the fix for unless you had used a script to install it.

Please, double/triple check that all the edits that cashmod202.txt tells you to make, and take special care at the beginning and end of each section, that you have the proper amount of brackets {} and semicolons ; etc.

fyi: Cash Mod does not edit in any way posting.php, or the section of usercp_viewprofile that you have recently posted. If the edits were applied properly, there should be no errors.
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod
Emberem
Registered User
Posts: 98
Joined: Fri Aug 08, 2003 11:17 am
Location: UK
Contact:

Post by Emberem »

Is it imcompatible with the quick reply mod for 2.0.4? i have the simple one installed.
Xore
Former Team Member
Posts: 2594
Joined: Wed Apr 16, 2003 7:42 pm
Location: the wastelands between insomnia and clairvoyance
Contact:

Post by Xore »

Emberem wrote: Is it imcompatible with the quick reply mod for 2.0.4? i have the simple one installed.


Not that i know of. On the other hand, Cash Mod has a history of people who don't install it properly. 50%+ of the content of this (what is it, 70+ pages) thread, has been helping out people who failed to install it properly. I've gone on far too many bughunts just to find that someone missed a peice of code, or accidentally didn't copy a bracket, or some such similar. It saves a lot of time and frustration on both our parts.
Camels in the Mist
<noise type="random" source="camel" />
Cash Mod
Emberem
Registered User
Posts: 98
Joined: Fri Aug 08, 2003 11:17 am
Location: UK
Contact:

Post by Emberem »

Ok sorry I think I installed that code fix into the wonrg files. I installed the fic into two files. I didn't realise that you were showing my original mistake. I'll correct the onw I edited and so far I have edited the one I'm on.

can you tell me which files those fixes were for?
Post Reply

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