MyBB Community Forums

Full Version: Own portal...installation probs
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey there,

its not really a mybb support, because it's my portal modification.
But i don't find an error.
Perhaps you can help me.

The Portal makes 3 querys (left , middle , right)
Code:
$queryl = $db->query("SELECT * FROM ".TABLE_PREFIX."myportal WHERE position = '1' ORDER BY ordering ASC");
        while($ausgabel = $db->fetch_array($queryl))
                {
                    $inhalt = $ausgabel['inhalt'];
                    $headname = $ausgabel['blockname'];
                    $position = 'l';
                        if($ausgabel['template'] != "0")
                    {
                           $query = $db->query("SELECT * FROM ".TABLE_PREFIX."myportalplugins WHERE portid ='".$ausgabel['template']."'");
        $mod = $db->fetch_array($query);
                if($mod['activate'] != "0")
                        {
                    require_once "./inc/portal/".$mod['datei'].".php";
                        }
                    }
                    else
                    {    
                            eval("\$boxenl .= \"".$templates->get("myportal_box")."\";");        
                        }    
                                        #eval("\$left = \"".$templates->get("myportal_left")."\";");    
                }
                eval("\$left = \"".$templates->get("myportal_left")."\";");
                 
        $queryc = $db->query("SELECT * FROM ".TABLE_PREFIX."myportal WHERE position = '2' ORDER BY ordering ASC");
        while($ausgabec = $db->fetch_array($queryc))
                {
                    $inhalt = $ausgabec['inhalt'];
                    $headname = $ausgabec['blockname'];
                    $position = 'c';
                        if($ausgabec['template'] != "0")
                    {
                           $query = $db->query("SELECT * FROM ".TABLE_PREFIX."myportalplugins WHERE portid ='".$ausgabec['template']."'");
        $mod = $db->fetch_array($query);
                if($mod['activate'] != "0")
                        {
                    require_once "./inc/portal/".$mod['datei'].".php";
                        }
                    }
                    else
                    {    
                            eval("\$boxenc .= \"".$templates->get("myportal_box")."\";");        
                        }        
                }
                eval("\$center = \"".$templates->get("myportal_center")."\";");
                $queryr = $db->query("SELECT * FROM ".TABLE_PREFIX."myportal WHERE position = '3' ORDER BY ordering ASC");
        while($ausgaber = $db->fetch_array($queryr))
                {
                    $inhalt = $ausgaber['inhalt'];
                    $headname = $ausgaber['blockname'];
                    $position = 'r';
                    if($ausgaber['template'] != "0")
                    {
                           $query = $db->query("SELECT * FROM ".TABLE_PREFIX."myportalplugins WHERE portid ='".$ausgaber['template']."'");
        $mod = $db->fetch_array($query);
                if($mod['activate'] != "0")
                        {
                    require_once "./inc/portal/".$mod['datei'].".php";
                        }
                    }
                    else
                    {    
                            eval("\$boxenr .= \"".$templates->get("myportal_box")."\";");        
                        }        
                }
            eval("\$right = \"".$templates->get("myportal_right")."\";");
        eval("\$myportal = \"".$templates->get("myportal_start")."\";");
        outputpage($myportal);

the "mods" are plugins , or half plugins Smile.
If one plugin is active it will be required.
A plugin look :
Code:
<?php
    function portal_myprofil_info()
{
      return array(
           "name"               => "MyProfil",
           "description"     => "Bietet die M�glichkeit Avatar anzeigen zu lassen und durch einen Klick auf die Wichtigsten Userspezifischen �nderungen zuzugreifen",
           "website"          => "http://www.mybboard.de",
           "author"          => "Samu - MyBBoard",
           "authorsite"     => "http://www.mybboard.de",
           "version"          => "Alpha",
      );
}

function portal_myprofil_activate()
{
    global $db;    
    $db->query("UPDATE ".TABLE_PREFIX."myportalplugins SET activate='1' WHERE datei='portal_myprofil'");
}

function portal_myprofil_deactivate()
{
    global $db;
    $db->query("UPDATE ".TABLE_PREFIX."myportalplugins SET activate='0' WHERE datei='portal_myprofil'");
}
global $mybb, $templates, $position;
    if($mybb->user['uid'] != "0")
    {
        $set_query = $db->query("SELECT settings FROM ".TABLE_PREFIX."myportalplugins WHERE datei = 'portal_myprofil'");
        $sett = $db->fetch_array($set_query);

        $settings = explode("|", $sett["settings"]);

        //Setting Erkl�rungen
        //0 = Avataranzeige
        //1 = Titel Anzeige
        if($settings['0'] !="0")
        {
            $avatar = '<td class="trow1"><div class="portal_ava" align="center"><a href="./usercp.php?action=avatar"><img src="'.$mybb->user['avatar'].'" border="0" alt="Dein Avatar" /></a></div></td>';
        }
        $user = $mybb->user['username'];
        $userlink = '&raquo; <a href="./member.php?action=profile&uid='.$mybb->user['uid'].'">'.$user.'</a>';
        $usercp = '&raquo; <a href="./usercp.php">Usercp</a>';
        $profillink = '&raquo; <a href="./member.php?action=profile&uid='.$mybb->user['uid'].'">Zum Profil</a>';
        $pnschreiben = '&raquo; <a href="./private.php?action=send">Pn erstellen</a>';
        $logout = '&raquo; <a href="./member.php?action=logout&uid='.$mybb->user['uid'].'"><b>Logout</b></a>';
            if($settings['1'] !="0")
            {
                $title = $mybb->user['usertitle'];
            }
            else
            {
                $title = '';
            }
        eval("\$inhalt = \"".$templates->get("myportal_myprofil_logged")."\";");
    }
    else
    {
        $registerlink = '&raquo; <a href="./member.php?action=register">Registrieren</a>';
    eval("\$inhalt = \"".$templates->get("myportal_myprofil_unlogged")."\";");    
    }
    eval("\$boxen$position .= \"".$templates->get("myportal_myprofil")."\";");
?>
But when it requires, i see a white page.

On my server the portal is shown.
Some people who installed it see a white page.

The debug shows that all is done ...

Please help.

Best regards
(bad english user Dominik)
No one knows an answer?

sh!t - i'm helpless ... i don't find the failure...