cash mod & parse error

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   cash mod & parse error
reddog
CZ Super Newbie
 Codezwiz Site Donator
reddog has been a member for over 20 year's 20 Year Member
usa.gif illinois.gif
Age: 56
Gender: Male
Fav. Sports Team: Da Bears
Website:
Status: Offline
Joined: Dec 27, 2003
0.01 posts per day
Posts: 86
Points: 12,465
  MSN Messenger ICQ Number
can someone tell me how to fix this? or possibly supply the correct code. i get this error whenever i click to "reply" to a message, and when i click "profile" in the forums.



Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/gruntz-c/public_html/includes/functions_post.php on line 398

and this is the code from the corresponding file:
   $cash_message = $GLOBALS['cm_posting']->update_post($mode, $post_data, $forum_id, $topic_id, $post_id, $topic_type, $bbcode_uid, $post_username, $post_message);
        $meta = '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">';
        $message = $lang['Stored'] . '<br />' . $cash_message '<br /><br />' . sprintf($lang['Click_view_message'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a>');


Thank you !!


Back to top Reply with quote
#2   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
Your missing a few things try this one:

$cash_message = $GLOBALS['cm_posting']->update_post($mode, $post_data, $forum_id, $topic_id, $post_id, $topic_type, $bbcode_uid, $post_username, $post_message);
        $meta = '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">';
        $message = $lang['Stored']. '<br />' . $cash_message . '<br /><br />' . sprintf($lang['Click_view_message'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a>');




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   re: cash mod & parse error
reddog
CZ Super Newbie
 Codezwiz Site Donator
reddog has been a member for over 20 year's 20 Year Member
usa.gif illinois.gif
Age: 56
Gender: Male
Fav. Sports Team: Da Bears
Website:
Status: Offline
Joined: Dec 27, 2003
0.01 posts per day
Posts: 86
Points: 12,465
  MSN Messenger ICQ Number
thank you sir !!, i may be back, i had a couple issues on the original install.



Back to top Reply with quote
#4   re: cash mod & parse error
reddog
CZ Super Newbie
 Codezwiz Site Donator
reddog has been a member for over 20 year's 20 Year Member
usa.gif illinois.gif
Age: 56
Gender: Male
Fav. Sports Team: Da Bears
Website:
Status: Offline
Joined: Dec 27, 2003
0.01 posts per day
Posts: 86
Points: 12,465
  MSN Messenger ICQ Number
ok, now im getting parse error:

"Parse error: parse error, unexpected '(', expecting ',' or ';' in /home/gruntz-c/public_html/includes/functions_post.php on line 530"


just a quick note: not all my code matched verbatum to the install file supplied with they're cash mod.

in the code below, "global $update_delete($mode,..........." , is line "530"


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 ($mode != 'poll_delete')
        {
      global $update_delete($mode, $post_data, $forum_id, $topic_id, $post_id);
        include("includes/functions_search.php");


Thanks Telli icon_exclaim.gif icon_exclaim.gif


Back to top Reply with quote
#5   re: cash mod & parse error
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
Change this line:

global $update_delete($mode, $post_data, $forum_id, $topic_id, $post_id);


To this:

//global $update_delete($mode, $post_data, $forum_id, $topic_id, $post_id);


Let me know what happens.



_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#6   re: cash mod & parse error
reddog
CZ Super Newbie
 Codezwiz Site Donator
reddog has been a member for over 20 year's 20 Year Member
usa.gif illinois.gif
Age: 56
Gender: Male
Fav. Sports Team: Da Bears
Website:
Status: Offline
Joined: Dec 27, 2003
0.01 posts per day
Posts: 86
Points: 12,465
  MSN Messenger ICQ Number
cool deal, Telli , it worked...one more thing is happening now,


Parse error: parse error, unexpected $ in /home/gruntz-c/public_html/modules/Forums/profile.php on line 173


lol, line 173 in profile.php is "?>", the very end of the file.

Thnak you for your help icon_exclaim.gif Telli, can you recommend a good beginners book for php, and mysql?



Back to top Reply with quote
#7   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
Paste the whole profile.php here.
[ Register or login to view links on this board. ]




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#8   re: cash mod & parse error
reddog
CZ Super Newbie
 Codezwiz Site Donator
reddog has been a member for over 20 year's 20 Year Member
usa.gif illinois.gif
Age: 56
Gender: Male
Fav. Sports Team: Da Bears
Website:
Status: Offline
Joined: Dec 27, 2003
0.01 posts per day
Posts: 86
Points: 12,465
  MSN Messenger ICQ Number
<?php
/***************************************************************************
*                                profile.php
*                            -------------------
*   begin                : Saturday, Feb 13, 2001
*   copyright            : (C) 2001 The phpBB Group
*   email                : [ Register or login to view links on this board. ]
*
*   $Id: profile.php,v 1.193.2.3 2003/03/02 23:16:17 acydburn Exp $
*
*
***************************************************************************/
/***************************************************************************
* phpbb2 forums port version 2.0.5 (c) 2003 - Nuke Cops (http://nukecops.com)
*
* Ported by Nuke Cops to phpbb2 standalone 2.0.5 Test
* and debugging completed by the Elite Nukers and site members.
*
* You run this package at your sole risk. Nuke Cops and affiliates cannot
* be held liable if anything goes wrong. You are advised to test this
* package on a development system. Backup everything before implementing
* in a production environment. If something goes wrong, you can always
* backout and restore your backups.
*
* Installing and running this also means you agree to the terms of the AUP
* found at Nuke Cops.
*
* This is version 2.0.5 of the phpbb2 forum port for PHP-Nuke. Work is based
* on Tom Nitzschner's forum port version 2.0.6. Tom's 2.0.6 port was based
* on the phpbb2 standalone version 2.0.3. Our version 2.0.5 from Nuke Cops is
* now reflecting phpbb2 standalone 2.0.5 that fixes some bugs and the
* invalid_session error message.
***************************************************************************/
/***************************************************************************
*   This file is part of the phpBB2 port to Nuke 6.0 (c) copyright 2002
*   by Tom Nitzschner (tom@toms-home.com)
*   http://bbtonuke.sourceforge.net (or http://www.toms-home.com)
*
*   As always, make a backup before messing with anything. All code
*   release by me is considered sample code only. It may be fully
*   functual, but you use it at your own risk, if you break it,
*   you get to fix it too. No waranty is given or implied.
*
*   Please post all questions/request about this port on http://bbtonuke.sourceforge.net first,
*   then on my site. All original header code and copyright messages will be maintained
*   to give credit where credit is due. If you modify this, the only requirement is
*   that you also maintain all original copyright messages. All my work is released
*   under the GNU GENERAL PUBLIC LICENSE. Please see the README for more information.
*
***************************************************************************/
/***************************************************************************
*
*   This program is free software; you can redistribute it and/or modify
*   it under the terms of the GNU General Public License as published by
*   the Free Software Foundation; either version 2 of the License, or
*   (at your option) any later version.
*
***************************************************************************/
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
    die ("You can't access this file directly...");
}
$module_name = basename(dirname(__FILE__));
require("modules/".$module_name."/nukebb.php");

define('IN_PHPBB', true);
if ( (isset($HTTP_GET_VARS['mode']) && ($HTTP_GET_VARS['mode'] == 'viewprofile')) || (isset($HTTP_POST_VARS['mode']) && ($HTTP_POST_VARS['mode'] == 'viewprofile')) )
{
   define('IN_CASHMOD', true);
   define('CM_VIEWPROFILE',true);
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_PROFILE, $nukeuser);
init_userprefs($userdata);
//
// End session management
//

// session id check
if (!empty($HTTP_POST_VARS['sid']) || !empty($HTTP_GET_VARS['sid']))
{
        $sid = (!empty($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : $HTTP_GET_VARS['sid'];
}
else
{
        $sid = '';
}

//
// Set default email variables
//
//$script_name = preg_replace('/^\/?(.*?)\/?$/', '\1', trim($board_config['script_path']));
//$script_name = ( $script_name != '' ) ? $script_name . '/profile.'.$phpEx : 'profile.'.$phpEx;
$script_name = 'modules.php?name=Forums&file=profile';
$server_name = trim($board_config['server_name']);
$server_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://';
$server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/';

$server_url = $server_protocol . $server_name . $server_port . $script_name;

// -----------------------
// Page specific functions
//
function gen_rand_string($hash)
{
        $chars = array( 'a', 'A', 'b', 'B', 'c', 'C', 'd', 'D', 'e', 'E', 'f', 'F', 'g', 'G', 'h', 'H', 'i', 'I', 'j', 'J',  'k', 'K', 'l', 'L', 'm', 'M', 'n', 'N', 'o', 'O', 'p', 'P', 'q', 'Q', 'r', 'R', 's', 'S', 't', 'T',  'u', 'U', 'v', 'V', 'w', 'W', 'x', 'X', 'y', 'Y', 'z', 'Z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0');

        $max_chars = count($chars) - 1;
        srand( (double) microtime()*1000000);

        $rand_str = '';
        for($i = 0; $i < 8; $i++)
        {
                $rand_str = ( $i == 0 ) ? $chars[rand(0, $max_chars)] : $rand_str . $chars[rand(0, $max_chars)];
        }

        return ( $hash ) ? md5($rand_str) : $rand_str;
}
//
// End page specific functions
// ---------------------------

//
// Start of program proper
//
if ( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
{
        $mode = ( isset($HTTP_GET_VARS['mode']) ) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];

        if ( $mode == 'viewprofile' )
        {
                include("includes/usercp_viewprofile.php");
                exit;
        }
        else if ( $mode == 'editprofile' || $mode == 'register' )
        {
                if ( !$userdata['session_logged_in'] && $mode == 'editprofile' )
                {
                        $header_location = ( @preg_match("/Microsoft|WebSTAR|Xitami/", $_SERVER["SERVER_SOFTWARE"]) ) ? "Refresh: 0; URL=" : "Location: ";
                        header($header_location . append_sid("login.$phpEx?redirect=profile.$phpEx&mode=editprofile", true));
                        exit;
                }

                include("includes/usercp_register.php");
                exit;
        }
        else if ( $mode == 'sendpassword' )
        {
                include("includes/usercp_sendpasswd.php");
                exit;
        }
        else if ( $mode == 'activate' )
        {
                include("includes/usercp_activate.php");
                exit;
        }
        else if ( $mode == 'email' )
        {
                include("includes/usercp_email.php");
                exit;
        }
}
else
{
        $header_location = ( @preg_match("/Microsoft|WebSTAR|Xitami/", $_SERVER["SERVER_SOFTWARE"]) ) ? "Refresh: 0; URL=" : "Location: ";
        header($header_location . append_sid("index.$phpEx", true));
        exit;
}

?>



Thanks for the reference


Back to top Reply with quote
#9   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
<?php
/***************************************************************************
*                                profile.php
*                            -------------------
*   begin                : Saturday, Feb 13, 2001
*   copyright            : (C) 2001 The phpBB Group
*   email                : [ Register or login to view links on this board. ]
*
*   $Id: profile.php,v 1.193.2.3 2003/03/02 23:16:17 acydburn Exp $
*
*
***************************************************************************/
/***************************************************************************
* phpbb2 forums port version 2.0.5 (c) 2003 - Nuke Cops (http://nukecops.com)
*
* Ported by Nuke Cops to phpbb2 standalone 2.0.5 Test
* and debugging completed by the Elite Nukers and site members.
*
* You run this package at your sole risk. Nuke Cops and affiliates cannot
* be held liable if anything goes wrong. You are advised to test this
* package on a development system. Backup everything before implementing
* in a production environment. If something goes wrong, you can always
* backout and restore your backups.
*
* Installing and running this also means you agree to the terms of the AUP
* found at Nuke Cops.
*
* This is version 2.0.5 of the phpbb2 forum port for PHP-Nuke. Work is based
* on Tom Nitzschner's forum port version 2.0.6. Tom's 2.0.6 port was based
* on the phpbb2 standalone version 2.0.3. Our version 2.0.5 from Nuke Cops is
* now reflecting phpbb2 standalone 2.0.5 that fixes some bugs and the
* invalid_session error message.
***************************************************************************/
/***************************************************************************
*   This file is part of the phpBB2 port to Nuke 6.0 (c) copyright 2002
*   by Tom Nitzschner (tom@toms-home.com)
*   http://bbtonuke.sourceforge.net (or http://www.toms-home.com)
*
*   As always, make a backup before messing with anything. All code
*   release by me is considered sample code only. It may be fully
*   functual, but you use it at your own risk, if you break it,
*   you get to fix it too. No waranty is given or implied.
*
*   Please post all questions/request about this port on http://bbtonuke.sourceforge.net first,
*   then on my site. All original header code and copyright messages will be maintained
*   to give credit where credit is due. If you modify this, the only requirement is
*   that you also maintain all original copyright messages. All my work is released
*   under the GNU GENERAL PUBLIC LICENSE. Please see the README for more information.
*
***************************************************************************/
/***************************************************************************
*
*   This program is free software; you can redistribute it and/or modify
*   it under the terms of the GNU General Public License as published by
*   the Free Software Foundation; either version 2 of the License, or
*   (at your option) any later version.
*
***************************************************************************/
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
    die ("You can't access this file directly...");
}
$module_name = basename(dirname(__FILE__));
require("modules/".$module_name."/nukebb.php");

define('IN_PHPBB', true);
if ( (isset($HTTP_GET_VARS['mode']) && ($HTTP_GET_VARS['mode'] == 'viewprofile')) || (isset($HTTP_POST_VARS['mode']) && ($HTTP_POST_VARS['mode'] == 'viewprofile')) )
{
   define('IN_CASHMOD', true);
   define('CM_VIEWPROFILE',true);
}
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_PROFILE, $nukeuser);
init_userprefs($userdata);
//
// End session management
//

// session id check
if (!empty($HTTP_POST_VARS['sid']) || !empty($HTTP_GET_VARS['sid']))
{
        $sid = (!empty($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : $HTTP_GET_VARS['sid'];
}
else
{
        $sid = '';
}

//
// Set default email variables
//
//$script_name = preg_replace('/^\/?(.*?)\/?$/', '\1', trim($board_config['script_path']));
//$script_name = ( $script_name != '' ) ? $script_name . '/profile.'.$phpEx : 'profile.'.$phpEx;
$script_name = 'modules.php?name=Forums&file=profile';
$server_name = trim($board_config['server_name']);
$server_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://';
$server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/';

$server_url = $server_protocol . $server_name . $server_port . $script_name;

// -----------------------
// Page specific functions
//
function gen_rand_string($hash)
{
        $chars = array( 'a', 'A', 'b', 'B', 'c', 'C', 'd', 'D', 'e', 'E', 'f', 'F', 'g', 'G', 'h', 'H', 'i', 'I', 'j', 'J',  'k', 'K', 'l', 'L', 'm', 'M', 'n', 'N', 'o', 'O', 'p', 'P', 'q', 'Q', 'r', 'R', 's', 'S', 't', 'T',  'u', 'U', 'v', 'V', 'w', 'W', 'x', 'X', 'y', 'Y', 'z', 'Z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0');

        $max_chars = count($chars) - 1;
        srand( (double) microtime()*1000000);

        $rand_str = '';
        for($i = 0; $i < 8; $i++)
        {
                $rand_str = ( $i == 0 ) ? $chars[rand(0, $max_chars)] : $rand_str . $chars[rand(0, $max_chars)];
        }

        return ( $hash ) ? md5($rand_str) : $rand_str;
}
//
// End page specific functions
// ---------------------------

//
// Start of program proper
//
if ( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
{
        $mode = ( isset($HTTP_GET_VARS['mode']) ) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];

        if ( $mode == 'viewprofile' )
        {
                include("includes/usercp_viewprofile.php");
                exit;
        }
        else if ( $mode == 'editprofile' || $mode == 'register' )
        {
                if ( !$userdata['session_logged_in'] && $mode == 'editprofile' )
                {
                        $header_location = ( @preg_match("/Microsoft|WebSTAR|Xitami/", $_SERVER["SERVER_SOFTWARE"]) ) ? "Refresh: 0; URL=" : "Location: ";
                        header($header_location . append_sid("login.$phpEx?redirect=profile.$phpEx&mode=editprofile", true));
                        exit;
                }

                include("includes/usercp_register.php");
                exit;
        }
        else if ( $mode == 'sendpassword' )
        {
                include("includes/usercp_sendpasswd.php");
                exit;
        }
        else if ( $mode == 'activate' )
        {
                include("includes/usercp_activate.php");
                exit;
        }
        else if ( $mode == 'email' )
        {
                include("includes/usercp_email.php");
                exit;
        }
}
else
{
        $header_location = ( @preg_match("/Microsoft|WebSTAR|Xitami/", $_SERVER["SERVER_SOFTWARE"]) ) ? "Refresh: 0; URL=" : "Location: ";
        header($header_location . append_sid("index.$phpEx", true));
        exit;
}

?>




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#10   re: cash mod & parse error
reddog
CZ Super Newbie
 Codezwiz Site Donator
reddog has been a member for over 20 year's 20 Year Member
usa.gif illinois.gif
Age: 56
Gender: Male
Fav. Sports Team: Da Bears
Website:
Status: Offline
Joined: Dec 27, 2003
0.01 posts per day
Posts: 86
Points: 12,465
  MSN Messenger ICQ Number
i cant thank you enough, the link to your site is already up on mine, thanks again !!



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum