FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


phpbb cash mod problemos





madsencarl
Ok, I installed phpbb recently, everthing worked brilliant. I then installed a different template (Charcoal2), everything worked brilliant. I installed EasyMod, everything worked brilliant. I installed the Cash Mod using Easy Mod. CRAP.

Now, whenever I try to view a topic, I get this error message:

Fatal error: Call to a member function on a non-object in /home/madsenca/domains/thecrib.frih.net/public_html/forum/includes/functions_cash.php on line 338

And whenever I try to go to the admin panel, I get this message:

Fatal error: Cannot instantiate non-existent class: cash_menucat in /home/madsenca/domains/thecrib.frih.net/public_html/forum/admin/admin_cash.php on line 31

Can anyone help me? I know nothing about php (hence my use of EasyMod) and am completely lost. Any help would be greatly appreciated.
Loathing in Fear
What are the codes of line 338 of "functions_cash.php"
and line 31 of "admin_cash.php"?
maybe i could help you. I also have installed the cash mod.
Not with easy mod though...

------------------------------
Loathing Wink
madsencarl
Line 338 of funtions_cash
Code:
         while ( $c_cur = &$cash->currency_next($cm_i,CURRENCY_ENABLED | CURRENCY_VIEWTOPIC,$forum_id) )



Line 31 of admin_cash
Code:
      $menu[$i] = new cash_menucat($lang['Cmcat_main']);



All of functions_cash
Code:
<?php
/***************************************************************************
 *                          classes_cash.php
 *                            -------------------
 *   begin                : Tuesday, Oct 07, 2003
 *   copyright            : (C) 2003 Xore
 *   email                : mods@xore.ca
 *
 *   $Id: classes_cash.php,v 1.0.0.0 2003/10/07 19:54:52 Xore $
 *
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   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 ( !defined('IN_PHPBB') )
{
   die("Hacking attempt");
}

if ( defined('CASH_CLASSES_INCLUDE') )
{
   return;
}

define('CASH_CLASSES_INCLUDE',TRUE);


//
//=============[ Template extended functionality ]=========================
//

class Template_plus extends Template
{
   var $classname = "Template";
   var $_tpldata = array();
   var $files = array();
   var $root = "";
   var $compiled_code = array();
   var $uncompiled_code = array();
   function set(&$template)
   {
      $this->classname = &$template->classname;
      $this->_tpldata = &$template->_tpldata;
      $this->files = &$template->files;
      $this->root = &$template->root;
      $this->compiled_code = &$template->compiled_code;
      $this->uncompiled_code = &$template->uncompiled_code;
   }

   /**
    * Inserts the uncompiled code for $handle as the
    * value of $varname in the block-level. This can be used
    * to effectively include a template in the middle of another
    * template.
    * Note that all desired assignments to the variables in $handle should be done
    * BEFORE calling this function.
    */
   function assign_block_var_from_handle($varname, $handle)
   {
      if (!$this->loadfile($handle))
      {
         die("Template->assign_var_from_handle(): Couldn't load template file for handle $handle");
      }

      // Compile it, with the "no echo statements" option on.
      $_str = "";
      $code = $this->compile($this->uncompiled_code[$handle], true, '_str');

      // evaluate the variable assignment.
      eval($code);
      // assign the value of the generated variable to the given varname.
      if (strstr($varname, '.'))
      {
         $lastposition = strrpos($varname,'.');
         $blockname = substr($varname,0,$lastposition);
         $varname = substr($varname,$lastposition+1);
         $this->reassign_block_vars($blockname,array($varname => $_str));
      }
      else
      {
         $this->assign_var($varname, $_str);
      }

      return true;
   }


   /**
    * Block-level variable re-assignment. Prevents new block iteration with the given
    * variable assignments. Note that once you've iterated to a new block via assign_block_vars,
    * you won't be able to come back to an old block.
    */
   function reassign_block_vars($blockname, $vararray)
   {
      if (strstr($blockname, '.'))
      {
         // Nested block.
         $blocks = explode('.', $blockname);
         $blockcount = sizeof($blocks);
         $str = '$this->_tpldata';
         for ($i = 0; $i < $blockcount; $i++)
         {
            $str .= '[\'' . $blocks[$i] . '.\']';
            eval('$lastiteration = sizeof(' . $str . ') - 1;');
            $str .= '[' . $lastiteration . ']';
         }
         // Now we add the block that we're actually assigning to.
         reset ($vararray);
         while (list($key,$val) = each($vararray))
         {
            $current_string = $str . '[$key] = $val';
            // Now we evaluate this assignment we've built up.
            eval($current_string);
         }
      }
      else
      {
         // Top-level block.
         // Add a new iteration to this block with the variable assignments
         // we were given.
         $lastiteration = sizeof($this->_tpldata[$blockname . '.']) - 1;
         reset ($vararray);
         while (list($key,$val) = each($vararray))
         {
            $this->_tpldata[$blockname . '.'][$lastiteration][$key] = $val;
         }
      }

      return true;
   }


   /**
    * Block-level variable clearing. Removes a block of data so it can be re-written
    * fresh (for iterative file handled arrays, when different data is needed)
    */
   function clear_block_var($blockname)
   {
      if (strstr($blockname, '.'))
      {
         // i don't know how the heck this would be used, if ever.
         // i can't think of a situation where it would be useful personally
         // but, who knows... Only the top-level block makes sense to me
         // Nested block.
         $blocks = explode('.', $blockname);
         $blockcount = sizeof($blocks) - 1;
         $str = '$this->_tpldata';
         for ($i = 0; $i < $blockcount; $i++)
         {
            $str .= '[\'' . $blocks[$i] . '.\']';
            eval('$lastiteration = sizeof(' . $str . ') - 1;');
            $str .= '[' . $lastiteration . ']';
         }
         // Now we add the block that we're actually assigning to.
         // We're adding a new iteration to this block with the given
         // variable assignments.
         $str .= '[\'' . $blocks[$blockcount] . '.\'] = array();';

         // Now we evaluate this assignment we've built up.
         eval($str);
      }
      else
      {
         // Top-level block.
         // Add a new iteration to this block with the variable assignments
         // we were given.
         $this->_tpldata[$blockname . '.'] = array();
      }

      return true;
   }

}

//
//=============[ Events handler ]=========================
//

if ( defined('CM_EVENT') )
{
   class cash_events
   {
      var $events;
      function cash_events()
      {
         global $db;
         $this->events = array();
         $sql = "SELECT *
               FROM " . CASH_EVENTS_TABLE;
         if ( !$result = $db->sql_query($sql) )
         {
            message_die(CRITICAL_ERROR, "Could not query events information", "", __LINE__, __FILE__, $sql);
         }
         while ( $row = $db->sql_fetchrow($result) )
         {
            $this->events[$row['event_name']] = $row['event_data'];
         }
      }
      function get_event_data($string)
      {
         global $board_config;
         if ( $board_config['cash_disable'])
         {
            return array();
         }
         if ( isset($this->events[$string]) )
         {
            return cash_event_unpack($this->events[$string]);
         }
         else
         {
            return array();
         }
      }
   }
   $cm_events = new cash_events();
}

//
//=============[ Memberlist handler ]=========================
//

if ( defined('CM_MEMBERLIST') )
{
   class cash_memberlist
   {
      function droplists(&$mode_types_text,&$mode_types)
      {
         global $board_config, $cash;
         if ( $board_config['cash_disable'])
         {
            return;
         }
         while ( $c_cur = &$cash->currency_next($cm_i,CURRENCY_ENABLED | CURRENCY_VIEWMEMBERLIST) )
         {
            $mode_types_text[] = $c_cur->name(true);
            $mode_types[] = 'cash_' . $c_cur->id();
         }
      }
      function modecheck($mode)
      {
         global $board_config, $cash;
         if ( $board_config['cash_disable'])
         {
            return 'cash_mod';
         }
         while ( $c_cur = &$cash->currency_next($cm_i,CURRENCY_ENABLED | CURRENCY_VIEWMEMBERLIST) )
         {
            if ( $mode == 'cash_' . $c_cur->id() )
            {
               return $mode;
            }
         }
         return 'cash_mod';
      }
      function getfield($mode)
      {
         global $cash;
         $id = substr($mode,5);
         $c_cur = &$cash->currency($id);
         return $c_cur->db();
      }
      function generate_columns(&$template,&$sql,$num_columns = 8)
      {
         global $board_config, $cash;
         if ( $board_config['cash_disable'] )
         {
            $template->assign_var('NUM_COLUMNS',$num_columns);
            return;
         }
         // whee! now that we have the $template, we can do whatever we want with it! yay!
         $cash_field = "";
         $count = $cash->currency_count(CURRENCY_ENABLED | CURRENCY_VIEWMEMBERLIST);
         $template->assign_var('NUM_COLUMNS',$count + $num_columns);
         while ( $c_cur = &$cash->currency_next($cm_i,CURRENCY_ENABLED | CURRENCY_VIEWMEMBERLIST) )
         {
            $template->assign_block_vars('cashrow',array('NAME' => $c_cur->name()));
            $cash_field .= $c_cur->db() . ', ';
         }
         if ( strstr($sql,'*') )
         {
            return;
         }
         $insertpoint = strpos($sql,'user_id');
         $sql = substr($sql,0,$insertpoint) . $cash_field . substr($sql,$insertpoint);
      }
      function listing(&$template,&$row)
      {
         global $board_config, $cash;
         if ( $board_config['cash_disable'])
         {
            return;
         }
         while ( $c_cur = &$cash->currency_next($cm_i,CURRENCY_ENABLED | CURRENCY_VIEWMEMBERLIST) )
         {
            $template->assign_block_vars('memberrow.cashrow', array('CASH_DISPLAY' => $c_cur->display($row[$c_cur->db()])));
         }
      }
   }
   $cm_memberlist = new cash_memberlist();
}

//
//=============[ Viewtopic handler ]=========================
//

if ( defined('CM_VIEWTOPIC') )
{
   class cash_viewtopic
   {
      var $template;
      function generate_columns(&$template,$forum_id,&$sql)
      {
         global $board_config, $cash;
         if ( $board_config['cash_disable'])
         {
            return '';
         }
         $this->template = new Template_plus();
         $this->template->set($template);
         $this->template->set_filenames(array(
            'cm_viewtopic' => 'cash_viewtopic.tpl')
         );
         
         if ( strstr($sql,'u.*') )
         {
            return;
         }
         $cash_field = "";
         while ( $c_cur = &$cash->currency_next($cm_i,CURRENCY_ENABLED | CURRENCY_VIEWTOPIC,$forum_id) )
         {
            $cash_field .= 'u.' . $c_cur->db() . ', ';
         }
         $insertpoint = strpos($sql,'u.user_id');
         $sql = substr($sql,0,$insertpoint) . $cash_field . substr($sql,$insertpoint);
      }
      function post_vars(&$postdata,&$userdata,$forum_id)
      {
         $template = &$this->template;
         global $board_config, $lang, $phpEx, $cash;
         if ( $board_config['cash_disable'])
         {
            return;
         }
         $mask = false;
         if ( $userdata['user_level'] != ADMIN )
         {
            $mask = CURRENCY_ENABLED;
            if ( $postdata['user_id'] != $userdata['user_id'] )
            {
               $mask &= CURRENCY_VIEWTOPIC;
            }
         }
         else
         {
            $forum_id = false;
         }

         while ( $c_cur = &$cash->currency_next($cm_i,$mask,$forum_id) )
         {
            $template->assign_block_vars('cashrow', array(   'CASH_DISPLAY' => $c_cur->display($postdata[$c_cur->db()])));
         }
         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&amp;ref=viewtopic&'.POST_USERS_URL.'='.$postdata['user_id'].'&amp;'.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&amp;ref=viewtopic&'.POST_USERS_URL.'='.$postdata['user_id'].'&amp;'.POST_POST_URL.'='.$postdata['post_id']),
                                                'L_NAME' => sprintf($lang['Mod_usercash'],$postdata['username'])));
         }
         $template->assign_block_var_from_handle('postrow.CASH', 'cm_viewtopic');
         $template->clear_block_var('cashrow');
         $template->clear_block_var('cashlinks');
      }
   }
   $cm_viewtopic = new cash_viewtopic();
}

//
//=============[ Viewprofile handler ]=========================
//

if ( defined('CM_VIEWPROFILE') )
{
   class cash_viewprofile
   {
      function post_vars(&$old_template,&$profiledata,&$userdata)
      {
         global $board_config, $lang, $phpEx, $cash;
         if ( $board_config['cash_disable'])
         {
            return;
         }
         $template = new Template_plus();
         $template->set($old_template);
         $mask = false;
         if ( $userdata['user_level'] != ADMIN )
         {
            $mask = CURRENCY_ENABLED;
            if ( $profiledata['user_id'] != $userdata['user_id'] )
            {
               $mask &= CURRENCY_VIEWPROFILE;
            }
         }
         $template->set_filenames(array(
            'cm_viewprofile' => 'cash_viewprofile.tpl')
         );
         while ( $c_cur = &$cash->currency_next($cm_i,$mask) )
         {
            $template->assign_block_vars('cashrow', array(   'CASH_NAME' => $c_cur->name(),
                                                'CASH_AMOUNT' => $profiledata[$c_cur->db()]));
         }
         if ( $userdata['session_logged_in'] && (($cash->currency_count(CURRENCY_ENABLED | CURRENCY_EXCHANGEABLE) >= 2) || ($cash->currency_count(CURRENCY_ENABLED | CURRENCY_DONATE) && ($userdata['user_id'] != $profiledata['user_id'])) || ($cash->currency_count() && (($userdata['user_level'] == ADMIN) || (($userdata['user_level'] == MOD) && $cash->currency_count(CURRENCY_ENABLED | CURRENCY_MODEDIT))))) )
         {
            $template->assign_block_vars('switch_cashlinkson',array());
            if ( $cash->currency_count(CURRENCY_ENABLED | CURRENCY_EXCHANGEABLE) >= 2 )
            {
               $template->assign_block_vars('switch_cashlinkson.cashlinks',array(   'U_LINK' => append_sid("cash.$phpEx"),
                                                                  'L_NAME' => $lang['Exchange']));
            }
            if ( $cash->currency_count(CURRENCY_ENABLED | CURRENCY_DONATE) && ($userdata['user_id'] != $profiledata['user_id']) )
            {
               $template->assign_block_vars('switch_cashlinkson.cashlinks',array(   'U_LINK' => append_sid('cash.'.$phpEx.'?mode=donate&amp;ref=viewprofile&amp;'.POST_USERS_URL.'='.$profiledata['user_id']),
                                                                  'L_NAME' => $lang['Donate']));
            }
            if ( $cash->currency_count() && (($userdata['user_level'] == ADMIN) || (($userdata['user_level'] == MOD) && $cash->currency_count(CURRENCY_ENABLED | CURRENCY_MODEDIT))) )
            {
               $template->assign_block_vars('switch_cashlinkson.cashlinks',array(   'U_LINK' => append_sid('cash.'.$phpEx.'?mode=modedit&amp;ref=viewprofile&amp;'.POST_USERS_URL.'='.$profiledata['user_id']),
                                                                  'L_NAME' => sprintf($lang['Mod_usercash'],$profiledata['username'])));
            }
         }
         $template->assign_block_var_from_handle('CASH', 'cm_viewprofile');
      }
   }
   $cm_viewprofile = new cash_viewprofile();
}

//
//=============[ Posting handler ]=========================
//

if ( defined('CM_POSTING') )
{
   class cash_posting
   {
      function update_post($mode, &$post_data, $forum_id, $topic_id, $post_id, $topic_type, $bbcode_uid, $post_username, &$post_message)
      {
         global $board_config, $userdata;
         if ( $board_config['cash_disable'] || (($mode != 'newtopic') && ($mode != 'reply') && ($mode != 'editpost')) )
         {
            return '';
         }
         $first_post = $post_data['first_post'];
         $poster_id = $userdata['user_id'];
         $old_message = '';
         $new_bbcode = $bbcode_uid;
         $old_bbcode = '';
         if ( $mode == 'editpost' )
         {
            $poster_id = $post_data['poster_id'];
            $old_message = &$post_data['post_text'];
            $old_bbcode = $post_data['bbcode_uid'];
         }
         if ( $mode == 'reply' )
         {
            $topic_starter = $post_data['topic_poster'];
         }
         else
         {
            $topic_starter = false;
         }
         return $this->cash_update($mode, $poster_id, $first_post, $old_message, $post_message, $forum_id, $topic_id, $post_id, $new_bbcode, $topic_starter, $old_bbcode);
      }
      function update_delete($mode, &$post_data, $forum_id, $topic_id, $post_id)
      {
         global $board_config;
         if ( $board_config['cash_disable'] || ($mode != 'delete') )
         {
            return;
         }
         $first_post = $post_data['first_post'];
         $poster_id = $post_data['poster_id'];
         $new_message = '';
         $new_bbcode = '';
         $old_bbcode = $post_data['bbcode_uid'];
         $topic_starter = ANONYMOUS;
         $this->cash_update($mode, $poster_id, $first_post, $post_data['post_text'], $new_message, $forum_id, $topic_id, $post_id, $new_bbcode, $topic_starter, $old_bbcode);
      }
      function cash_update($mode, $poster_id, $first_post, &$old_message, &$new_message, $forum_id, $topic_id, $post_id, $new_bbcode, $topic_starter, $old_bbcode)
      {
         global $board_config, $lang, $db, $phpbb_root_path, $phpEx, $userdata, $cash;

         if ( ($mode == 'reply') && ($poster_id != $topic_starter) && ($topic_userdata = get_userdata($topic_starter)) )
         {
            $topic_creator = new cash_user($topic_starter,$topic_userdata);
            $topic_creator->give_bonus($topic_id);
         }
         if ( $poster_id == ANONYMOUS )
         {
            return;
         }
         if ( $userdata['user_id'] == $poster_id )
         {
            $posting_user = new cash_user($userdata['user_id'], $userdata);
         }
         else
         {
            $posting_user = new cash_user($poster_id);
         }
         $all_active = true;
         $forumcount = array();
         $forumlist = array();
         if ( (($mode == 'newtopic') || ($mode == 'reply')) && (intval($board_config['cash_disable_spam_num']) > 0) )
         {
            $all_active = false;
            $interval = time() - (3600 * intval($board_config['cash_disable_spam_time']));
            $sum = 0;
            $sql = "SELECT forum_id, count(post_id) as postcount
               FROM " . POSTS_TABLE . "
               WHERE poster_id = $poster_id
                  AND post_time > $interval
               GROUP BY forum_id";
            if ( !($result = $db->sql_query($sql)) )
            {
               message_die(GENERAL_ERROR, 'Error retrieving post data', '', __LINE__, __FILE__, $sql);
            }
            while ( $row = $db->sql_fetchrow($result) )
            {
               $forumlist[] = $row['forum_id'];
               $forumcount[$row['forum_id']] = $row['postcount'];
               $sum += $row['postcount'];
            }
            if ( $sum < $board_config['cash_disable_spam_num'] )
            {
               $all_active = true;
            }
         }
         $new_len = array(strlen($new_message),cash_quotematch($new_message,$new_bbcode));
         $old_len = array(strlen($old_message),cash_quotematch($old_message,$old_bbcode));
         $sql_clause = array();
         $message_clause = array();
         $reply_bonus = array();
         $all_spam = !$all_active;
         while ( $c_cur = &$cash->currency_next($cm_i,CURRENCY_ENABLED,$forum_id) )
         {
            $this_enabled = $all_active;
            if ( !$all_active )
            {
               $sum = 0;
               for ( $i = 0; $i < count($forumlist); $i++ )
               {
                  if ( $c_cur->forum_active($forumlist[$i]) )
                  {
                     $sum += $forumcount[$forumlist[$i]];
                  }
               }
               if ( $sum < $board_config['cash_disable_spam_num'] )
               {
                  $this_enabled = true;
                  $all_spam = false;
               }
            }
            if ( $this_enabled )
            {
               $base = ( $first_post ) ? $posting_user->get_setting($c_cur->id(),'cash_perpost') : $posting_user->get_setting($c_cur->id(),'cash_perreply');
               $perchar = $posting_user->get_setting($c_cur->id(),'cash_perchar',PERCHAR_DEC_BONUS);
               $max = $posting_user->get_setting($c_cur->id(),'cash_maxearn');
               $quotes = ( $c_cur->mask(CURRENCY_INCLUDEQUOTES) ) ? 0 : 1;

               $total_added = ( $mode != 'delete' ) ? min($max,$base + ($perchar * $new_len[$quotes])) : 0;
               $total_removed = ( ($mode != 'newtopic') && ($mode != 'reply') ) ? min($max,$base + ($perchar * $old_len[$quotes])) : 0;
               $total_change = $total_added - $total_removed;
               if ( $total_change != 0 )
               {
                  $change_sign = ($total_change > 0);
                  $change_amount = ( ( $change_sign ) ? $total_change : (-$total_change) );
                  $change_sign = ( ( $change_sign ) ? " + " : " - " );
                  $sql_clause[] = $c_cur->db() . " = " . $c_cur->db() . $change_sign . $change_amount;
                  $message_clause[] = $c_cur->display($change_amount);
               }
            }
         }
         if ( $all_spam )
         {
            return $board_config['cash_disable_spam_message'];
         }
         if ( count($sql_clause) > 0 )
         {
            $sql = "UPDATE " . USERS_TABLE . "
               SET " . implode(', ',$sql_clause) . "
               WHERE user_id = " . $poster_id;
            if ( !$db->sql_query($sql) )
            {
               message_die(GENERAL_ERROR, 'Error in updating cash', '', __LINE__, __FILE__, $sql);
            }
         }
         return ( ($userdata['user_id'] == $poster_id) && ($board_config['cash_display_after_posts'] == 1) ) ? sprintf($board_config['cash_post_message'],implode(', ',$message_clause)) : '';
      }
   }
   $cm_posting = new cash_posting();
}

//
//=============[ END Page-Specific Classes ]=========================
//

?>



All of admin_cash
Code:
<?php
/***************************************************************************
 *                              admin_cash.php
 *                            -------------------
 *   begin                : Monday, Aug 18, 2003
 *   copyright            : (C) 2003 Xore
 *   email                : mods@xore.ca
 *
 *   $Id: admin_cash.php,v 1.1.0.0 2003/09/18 23:03:34 Xore $
 *
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   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 ( !defined('ADMIN_MENU') )
{
   define('ADMIN_MENU',1);
   function admin_menu(&$menu)
   {
      global $lang;
      $i = 0;
      $j = 0;
      $menu[$i] = new cash_menucat($lang['Cmcat_main']);
      $menu[$i]->additem(new cash_menuitem($j,   'Cash_Configuration',   'cash_config',      $lang['Cmenu_cash_config']));
      $menu[$i]->additem(new cash_menuitem($j,   'Cash_Currencies',      'cash_currencies',   $lang['Cmenu_cash_currencies']));
      $menu[$i]->additem(new cash_menuitem($j,   'Cash_Forums',         'cash_forums',      $lang['Cmenu_cash_forums']));
      $menu[$i]->additem(new cash_menuitem($j,   'Cash_Settings',      'cash_settings',   $lang['Cmenu_cash_settings']));
      $i++;
      $menu[$i] = new cash_menucat($lang['Cmcat_addons']);
      $menu[$i]->additem(new cash_menuitem($j,   'Cash_Events',         'cash_events',      $lang['Cmenu_cash_events']));
      $menu[$i]->additem(new cash_menuitem($j,   'Cash_Reset',         'cash_reset',      $lang['Cmenu_cash_reset']));
      $i++;
      $menu[$i] = new cash_menucat($lang['Cmcat_other']);
      $menu[$i]->additem(new cash_menuitem($j,   'Cash_Exchange',      'cash_exchange',   $lang['Cmenu_cash_exchange']));
      $menu[$i]->additem(new cash_menuitem($j,   'Cash_Groups',         'cash_groups',      $lang['Cmenu_cash_groups']));
      $menu[$i]->additem(new cash_menuitem($j,   'Cash_Logs',         'cash_log',         $lang['Cmenu_cash_log']));
      $i++;
      $menu[$i] = new cash_menucat($lang['Cmcat_help']);
      $menu[$i]->additem(new cash_menuitem($j,   'Cash_Help',         'cash_help',      $lang['Cmenu_cash_help']));
   }
}

if ( !empty($navbar) && defined('IN_PHPBB') )
{
   $menu = array();
   if ( !defined('CASH_INCLUDE') )
   {
      message_die(GENERAL_ERROR,'functions_cash.php has not been included.<br /><br />Please make sure you have properly installed Cash Mod, including all the necessary file edits as found in cm_install_22x.txt');
   }
   admin_menu($menu);

   $template->set_filenames(array(
      "navbar" => "admin/cash_navbar.tpl")
   );

   $class = 0;
   for ( $i = 0; $i < count($menu); $i++ )
   {
      $template->assign_block_vars("navcat",array(   "L_CATEGORY" => $menu[$i]->category,
                                          "WIDTH" => $menu[$i]->num()));
      for ( $j = 0; $j < $menu[$i]->num(); $j++ )
      {
         $template->assign_block_vars("navitem",$menu[$i]->items[$j]->data($phpEx,$class+1,''));
         $class = ($class + 1)%2;
      }
   }
   $template->assign_var_from_handle('NAVBAR', 'navbar');
   return;
}

if ( !empty($setmodules) && defined('IN_PHPBB') )
{
   if ( empty($table_prefix) )
   {
      // jr admin mod
      /*
         since this gets included from within a function,
         and we require these base-scope variables, we
         copy them in from the global scope
      */
      $table_prefix = $GLOBALS['table_prefix'];
      $phpbb_root_path = $GLOBALS['phpbb_root_path'];
      $phpEx = $GLOBALS['phpEx'];
      $board_config = $GLOBALS['board_config'];
      $lang = $GLOBALS['lang'];
   }
   include($phpbb_root_path . 'includes/functions_cash.'.$phpEx);
   $menu = array();
   admin_menu($menu);

   if ( $board_config['cash_adminbig'] )
   {
      for ( $i = 0; $i < count($menu); $i++ )
      {
         for ( $j = 0; $j < $menu[$i]->num(); $j++ )
         {
            $module['Cash Mod'][$menu[$i]->items[$j]->title] = $menu[$i]->items[$j]->linkage($phpEx);
            if ( ($j == $menu[$i]->num() - 1) && !($i == count($menu) - 1) )
            {
               $lang[$menu[$i]->items[$j]->title] = $lang[$menu[$i]->items[$j]->title] . '</a></span></td></tr><tr><td class="row2" height="7"><span class="genmed"><a name="cm' . $menu[$i]->num() . '">';
            }
         }
      }
   }
   else
   {
      $file = basename(__FILE__);
      $module['Cash Mod']['Cash_Admin'] = "$file";
      $module['Cash Mod']['Cash_Help'] = "cash_help.$phpEx";
   }
   return;
}

define('IN_PHPBB', 1);
define('IN_CASHMOD', 1);

//
// Let's set the root dir for phpBB
//
$phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc');
require('./pagestart.' . $phpEx);
include($phpbb_root_path . 'includes/functions_selects.'.$phpEx);

if ( $board_config['cash_adminnavbar'] )
{
   $navbar = 1;
   include('./admin_cash.'.$phpEx);
}

//$menu = array();
admin_menu($menu);

$template->set_filenames(array(
   "body" => "admin/cash_menu.tpl")
);

for ( $i = 0; $i < count($menu); $i++ )
{
   $template->assign_block_vars("menucat",array("L_CATEGORY" => $menu[$i]->category));
   for ( $j = 0; $j < $menu[$i]->num(); $j++ )
   {
      $template->assign_block_vars("menucat.menuitem",$menu[$i]->items[$j]->data($phpEx,1,''));
   }
}

$template->pparse("body");

include('./page_footer_admin.'.$phpEx);

?>
n0obie4life
Did you run sql_install.php ? Easymod doesn't do mySQL Queries.

Upload the sql_install.php file ( found in cash mod package ), to the root of your forum. Then execute the file. and then DELETE the file or it will pose a security risk.
madsencarl
Yeh I ran that (not from that directory though - it says if you install using EasyMod (which I did) you run it from the directory you find it) and got all the green "complete" messages.
To make sure I ran it again. Got red "duplicate" messages. Still no cigar.
To make surey sure I ran it from my root forum directory. See above result.
n0obie4life
Are you using the Extreme Styles Modification?
madsencarl
No. I am not.
BTW: does the Extreme Styles Mod only have specific styles, or can you put your own in?
n0obie4life
Try uploading the functions_cash.php and classes_cash.php file again MANUALLY through FTP (filezilla or whatever). Just overwrite.

The Extreme Stlyes mod enables PHP to be used within templates and a better template system. Some styles are made for Extreme Styles and therefore works better.
Mr. McCoy
it sounds like you didn't follow the guide step by step

did you backup your forum?


try to do it all over again!... i just did that modification yestoday, so i know it!


With Plus there is some trouble with the veiwing part! but it works fine

wiith original phpbb it works perfect!


remember every time you make a MOD, backup the hole sh*t!!


i forgot ";" many times yestoday, and even THAT can fu*k up your site!


so try again and be sure to get it 100% right!.

pm me if u want some help


btw. are u danish? ur name looks danish ..hehe Very Happy


McCoy
madsencarl
Ok I used my FileZilla and just re-uploaded all that seemed feasible into the forum folders.
And it worked! Thanks a bunch mate.
Related topics
Scripting Admin Needed
Cash Mod Settings
Cash-Mod
Cash Mod
Cash Mod Help
phpBB cash mod question
HELP WITH TRANSFERING PHPBB CASH MOD to PHPNUKE
Cash Mod Usage
cash mod
Help with Cash Mod on My Site!
Cash Mod Install
Cash mod phpbb problem
Cash Mod phpbbb
Need Cash Mod install phpBB2
This topic is locked: you cannot edit posts or make replies.    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.