MyBB-Plugins Forums

Full Version: Can you help me?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I'm using MyBB Merge System but when I convert something it appears this error: Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /membri/habboceanprova/cean/convert/resources/class_converter_module.php on line 20

class_converter_module.php
PHP Code:
<?php
/**
 * MyBB 1.4
 * Copyright Â© 2009 MyBB Group, All Rights Reserved
 *
 * Website: http://www.mybboard.net
  * License: http://www.mybboard.net/about/license
 *
 * $Id: class_converter.php 2707 2007-02-04 15:59:28Z CraKteR $
 */

// Disallow direct access to this file for security reasons
if(!defined("IN_MYBB"))
{
    die(
"Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}

class 
Converter_Module
{
    public 
$board null;
    
    public function 
__construct($board)
    }
        global 
$import_session;
        
        
// Setup & Share our variables and classes
        
require_once MERGE_ROOT."boards/".$import_session['board']."/bbcode_parser.php";
        require_once 
MERGE_ROOT.'resources/class_cache_handler.php';
        
$this->bbcode_parser = &new BBCode_Parser();
        
$this->get_import = &new Cache_Handler();
        
        
$this->board = &$board;
        
$this->old_db = &$this->board->old_db;
        
$this->board->settings = &$this->settings;
        
$this->board->get_import = &$this->get_import;
    }
    
    
/**
     * Fills an array of insert data with default MyBB values if they were not specified
     *
     */
    
public function process_default_values($values)
    {        
        return 
array_merge($this->default_values$values);
    }
    
    public function 
check_table_type($tables)
    {
        global 
$output;
        
        if(!
is_array($tables))
        {
            
$tables = array($tables);
        }
        
        if(
$this->old_db->type == "mysqli" || $this->old_db->type == "mysql")
        {
            foreach(
$tables as $table)
            {
                
$table_sql $this->old_db->show_create_table($table);
                if(
stripos($table_sql"ENGINE=InnoDB") !== false)
                {
                    
$output->print_warning("The table \"{$table}\" is currently in InnoDB format. We strongly recommend converting these databases to MyISAM otherwise you may experience major slow-downs while running the merge system.");
                }
            }
        }
    }
}

?>
This has nothing to do with MyBB-Plugins.com
Moved to General Support.
If you could tell us which line is line 20 and which PHP version you're using, it would be easier
is phpBB 3

I think line 20 is the bold one here


die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}

class Converter_Module
{
public $board = null;

public function __construct($board)
PHP Code:
public function __construct($board)
    } 
Should be:
PHP Code:
public function __construct($board)
    { 

Report back please. Is this a fresh copy of the MyBB Merge System or did you alter something?
It doesn't work Sad
You have two options:
1) Answer my questions and give more detailed information.
2) Ask at MyBB and it's no longer up to me to try to help you
It's a fresh copy
And did you re-upload the file to replace the old one? What error are you getting now?
I re-uploaded the file and it give me the same error;
if you want to see it go here http://habboceanprova.altervista.org/cea.../index.php and run the users Smile
I'm almost sure the problem is the } which should be { so you probably didn't overwrite the file. I've already made a thread at MyBB asking for a confirmation
Pages: 1 2