Hat wirklich niemand eine Idee, oder das Verz. schonmal dynamsich geladen?
Bitte!
Ich hab jetzt in der spa_control.config.php mal den Blog geladen, statt die globalen Variablen zu verwenden.
if(MX_MODULE=='Userblog')
{
require('modules/Userblog/functions.php');
$BLOGDATA = fetchBlog($_GET['id']);
//die($BLOGDATA['subdomain']);
}
Das die($BLOGDATA['subdomain']) habe ich zum testen geschrieben, also das BGLOGDATA Array ist KORREKT gefüllt bis dahin.
Er geht nun in die wenn bLOGDATA nicht fals Bedingung,
allerdings sind dort nun $BLOGDATA['subdomain'] und $BLOGDATA['blogname'] LEER, so daß nur "Bilder von " als Verzeichnisname angezeigt wird.
if ((!empty($wysiwyg_userpath)) && ((WYSIWYG_IS_ADMIN) || (WYSIWYG_IS_USER && $wysiwyg_uploadallow == 2))) {
// image libraries
//-> BLOGDATA ist korrekt vorhanden
if($BLOGDATA!==FALSE)
{
$spaw_imglibs = array(
array("value" => "images/userpics/".$BLOGDATA['subdomain']."/",
"text" => "Bilder von ".$BLOGDATA['blogname'],
),
);
}else{
$spaw_imglibs = array(
array("value" => "images/userpics/",
"text" => "Benutzerbilder",
),
array("value" => $wysiwyg_userpath . "/",
'text' => "Mx-Uploads",
),
array("value" => "images/smilies/",
"text" => "Smilies",
),
);
}
//eof mx module nouserblog
} else {
if($BLOGDATA!==FALSE)
{
$spaw_imglibs = array(
array("value" => "images/userpics/".$BLOGDATA['subdomain']."/",
"text" => "Bilder von ".$BLOGDATA['blogname'],
),
);
}else{
// image libraries
$spaw_imglibs = array(
array("value" => "images/userpics/",
"text" => "Benutzerbilder",
),
array("value" => $wysiwyg_userpath . "/",
'text' => "Mx-Uploads",
),
array("value" => "images/smilies/",
"text" => "Smilies",
),
);
}
//eof mx module nouserblog
}
Wie kann das sein, ich fasse zusammen:
- Ich leses ein Array ein, ein paar Zeilenm tiefer (oder besser direkt darunter) sind die Arrayelemente/die Vaiable leer.
Hier der ganze Code:
if(MX_MODULE=='Userblog')
{
require('modules/Userblog/functions.php');
$BLOGDATA = fetchBlog($_GET['id']);
//die($BLOGDATA['subdomain']);
}
// end unset limits for superusers
if ((!empty($wysiwyg_userpath)) && ((WYSIWYG_IS_ADMIN) || (WYSIWYG_IS_USER && $wysiwyg_uploadallow == 2))) {
// image libraries
//-> BLOGDATA ist korrekt vorhanden
if($BLOGDATA!==FALSE)
{
//in diese if bedingung geht er nur wenn admin
$spaw_imglibs = array(
array("value" => "images/userpics/".$BLOGDATA['subdomain']."/",
"text" => "Bilder von ".$BLOGDATA['blogname'],
),
);
}else{
$spaw_imglibs = array(
array("value" => "images/userpics/",
"text" => "Benutzerbilder",
),
array("value" => $wysiwyg_userpath . "/",
'text' => "Mx-Uploads",
),
array("value" => "images/smilies/",
"text" => "Smilies",
),
);
}
//eof mx module nouserblog
} else {
if($BLOGDATA!==FALSE)
{
$spaw_imglibs = array(
array("value" => "images/userpics/".$BLOGDATA['subdomain']."/",
"text" => "Bilder von ".$BLOGDATA['blogname'],
),
);
}else{
// image libraries
$spaw_imglibs = array(
array("value" => "images/userpics/",
"text" => "Benutzerbilder",
),
array("value" => $wysiwyg_userpath . "/",
'text' => "Mx-Uploads",
),
array("value" => "images/smilies/",
"text" => "Smilies",
),
);
}
//eof mx module nouserblog
}
Ich wäre sehr dankbar wenn mir jemand helfen könnte.