Wiadomości forum (2.0.1) i Additional Groups Images (2.0) nie działa po migracji

Założony przez  Piratenus.

nazwa i wersja skryptu, z którego migrowano: najnowsza
wersja skryptu MyBB: najnowsza
adres forum: rapmania.com.pl
opis problemu: po migracji wszystko po za 2 modyfikacjami działa

na forum miałem modyfikacje
Wiadomości forum (2.0.1) którą później chciałem wgrać na forum po połączeniu, z początku były błędy ale wgrałem zapytanie z starego msql i modyfikacja działa ale w Panelu admina w zakładce konfiguracja nie ma linku do edycji newsów (jak to dodać)

miałem też modyfikacje Additional Groups Images (2.0) ale gdy teraz chcę ją aktywować to wywala błąd

[Obrazek: x.png]

jak to naprawić ?
Matslom napisał 09.02.2014, 19:04:
Proszę poprawić tytuł tematu! Zapozna się z -> [Obrazek: modnotice_howto.png]
Pokaż plik /inc/plugins/agi.php
Utwórz także folder np. test w inc/plugins i przerzuć tam ten plik agi.php. Sprawdź czy błąd zniknął.
nic to nie zmieniło, wydaje mi się że to jakiś problem z bazą, pewnie po połączeniu myśli że plugin jest dodany a go nie ma albo coś takiego

a tu plik agi

<?php
/**
 * Additional Groups Images
 * Copyright TECHEX - The Site
 * http://www.thetechex.net
 */

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

$plugins->add_hook("member_profile_end""agi_profile");

function 
agi_info()
{
    return array(
        
'name'            => 'Additional Groups Images',
        
'description'    => 'Displays all the additional groups\' images in the user\'s post and profile.',
        
'website'        => 'http://www.thetechex.net',
        
'author'        => 'Zaher1988',
        
'authorsite'    => 'http://www.thetechex.net',
        
'version'        => '2.0',
    );
}

function 
agi_activate()
{
        require 
MYBB_ROOT.'/inc/adminfunctions_templates.php';
        
find_replace_templatesets("member_profile"'#'.preg_quote('{$groupimage}').'#''{$groupimage} {$groupimg2}');

    
$fh fopen(MYBB_ROOT.'/inc/functions_post.php'"r") or cperror("Could not open file!"); //OPEN FILE
    
$data fread($fhfilesize(MYBB_ROOT.'/inc/functions_post.php')) or cperror("Could not read file!"); //MAKE TEMPORARY STRING
    
fclose($fh); //CLOSE FILE AGAIN
    
$newdata preg_replace('#'.preg_quote('if($post[\'userusername\'])
    { // This post was made by a registered user'
).'#','$addi_groups = explode(\',\',$post[\'additionalgroups\']);
    for($i=0;$i<count($addi_groups);$i++)
    {
        $query2 = $db->query("SELECT gid, title, image FROM ".TABLE_PREFIX."usergroups WHERE gid=\'".$addi_groups[$i]."\'");
        $ginfo = $db->fetch_array($query2);
        $title = $ginfo[\'title\'];
        $image = $ginfo[\'image\'];

        if(!empty($image))
        {
            if($image != $usergroup[\'image\'])
            {
                if(!strstr($images_list, $image))
                {
                    $images_list .= "<!-- Start: sec groups image --><img src=\"{$image}\" alt=\"{$title}\"><!-- End: sec groups image --><br />";
                }
            }
        }
    }
    $post[\'groupimage\'] .= "<br />".$images_list;
    
    if($post[\'userusername\'])
    { // This post was made by a registered user'
,$data); //REPLACE IN STRING
    
$fw fopen(MYBB_ROOT.'/inc/functions_post.php'"w") or cperror('Could not open file!'); //OPEN FILE AGAIN
    
$fb fwrite($fw$newdata) or cperror('Could not write to file'); //WRITE STRING TO FILE
    
fclose($fw); //CLOSE FILE AGAIN
}

function 
agi_deactivate()
{
    require 
MYBB_ROOT.'/inc/adminfunctions_templates.php';
    
    
find_replace_templatesets("member_profile"'#'.preg_quote('{$groupimg2}').'#''',0);


    
$fh fopen(MYBB_ROOT.'/inc/functions_post.php'"r") or cperror("Could not open file!"); //OPEN FILE
    
$data fread($fhfilesize(MYBB_ROOT.'/inc/functions_post.php')) or cperror("Could not read file!"); //MAKE TEMPORARY STRING
    
fclose($fh); //CLOSE FILE AGAIN
    
$newdata preg_replace('#'.preg_quote('$addi_groups = explode(\',\',$post[\'additionalgroups\']);
    for($i=0;$i<count($addi_groups);$i++)
    {
        $query2 = $db->query("SELECT gid, title, image FROM ".TABLE_PREFIX."usergroups WHERE gid=\'".$addi_groups[$i]."\'");
        $ginfo = $db->fetch_array($query2);
        $title = $ginfo[\'title\'];
        $image = $ginfo[\'image\'];

        if(!empty($image))
        {
            if($image != $usergroup[\'image\'])
            {
                if(!strstr($images_list, $image))
                {
                    $images_list .= "<!-- Start: sec groups image --><img src=\"{$image}\" alt=\"{$title}\"><!-- End: sec groups image --><br />";
                }
            }
        }
    }
    $post[\'groupimage\'] .= "<br />".$images_list;
    
    if($post[\'userusername\'])
    { // This post was made by a registered user'
).'#','if($post[\'userusername\'])
    { // This post was made by a registered user'
,$data); //REPLACE IN STRING
    
$fw fopen(MYBB_ROOT.'/inc/functions_post.php'"w") or cperror('Could not open file!'); //OPEN FILE AGAIN
    
$fb fwrite($fw$newdata) or cperror('Could not write to file'); //WRITE STRING TO FILE
    
fclose($fw); //CLOSE FILE AGAIN
}

function 
agi_profile()
{    
    global 
$db$mybb$groupimg2$displaygroup;

    
$uid intval($mybb->input['uid']);
    
    
$query $db->query("select uid, usergroup, additionalgroups FROM ".TABLE_PREFIX."users where uid='$uid'");
    
$info $db->fetch_array($query);
    
$addi_groups explode(',',$info['additionalgroups']);
    for(
$i=0;$i<count($addi_groups);$i++)
    {
        
$query2 $db->query("SELECT gid, title, image FROM ".TABLE_PREFIX."usergroups WHERE gid='".$addi_groups[$i]."'");
        
$ginfo $db->fetch_array($query2);
        
$title $ginfo['title'];
        
$image $ginfo['image'];
        
        if(!empty(
$image))
        {
            if(
$image != $displaygroup['image'])
            {
                if(!
strstr($images_list$image))
                {
                    
$images_list .= "<!-- Start: sec groups image --><img src=\"{$image}\" alt=\"{$title}\"><br /><!-- End: sec groups image -->";
                }
            }
        }
    }
    
$images_list .= "<br />";
    
    
$groupimg2 $images_list
}
?>



Użytkownicy przeglądający ten wątek:

1 gości