TinyPortal

Development => Support => Topic started by: thamar on June 02, 2009, 09:12:15 PM

Title: TP admin pages gone blank
Post by: thamar on June 02, 2009, 09:12:15 PM
TP 1b4 & SMF 1.1.9

Reinstalled everything today because of an upgrade gone horribly wrong.
Everything worked fine, until I activated a custom php block to show some random images from my gallery2. The same code worked fine on the previous install, and even now it works fine. The images show up nicely, they rotate and everything.

After I activated it, all of my admin sections for TP went blank. (except for the shoutbox thingie)
Searched the forum here allready, looked into the utf-8 language thingie but that's ok. So basicly I'm scratching my head on this one...

Nothing shows up on the error log.
Title: Re: TP admin pages gone blank
Post by: G6Cad on June 02, 2009, 09:16:16 PM
Deactivate the editor and paste the code in again with out it and see if it helps.
Title: Re: TP admin pages gone blank
Post by: thamar on June 02, 2009, 09:21:45 PM
Now I'm going to sound stupid, but how do I deactivate the editor? I can't access anything of the adminsection for tiny portal...



My first post wasn't really accurate, I do get an error but I don't think it has anything to do with the blank page problem
8: Undefined index: qub
File: /var/www/web16/web/Themes/default/languages/TPShout.english.php (main sub template - eval?)
Line: 358
Title: Re: TP admin pages gone blank
Post by: thamar on June 02, 2009, 10:12:41 PM
Removed it with phpmyadmin, it came to mind when watching some no brainer show on tv :D

And now it works again...

This is the code


echo '<div align="center"><b>Last weeks winner</b><br /></div>';

global $scripturl, $modSettings, $user_info, $ID_MEMBER;

$useImageFrames = true;
$imageFrameName = "shadow";

if($useImageFrames)
echo '<link rel="stylesheet" href="'.$modSettings['galleryUrl'].'/main.php?g2_controller=imageblock.ExternalCSS&g2_frames='.$imageFrameName.'"/>';

require_once($modSettings['galleryPath'].'/embed.php');
$ret = GalleryEmbed::init(array('fullInit' => true, 'baseUri' => $scripturl.'?action=gallery', 'g2Uri' => $modSettings['galleryUrl'].'/', 'activeUserId' => ($user_info['is_guest'] || !$user_info['is_gallery_user']) ? '' : $ID_MEMBER));
if ($ret) {
     print 'GalleryEmbed::init failed, here is the error message: ' . $ret->getAsHtml();
     exit;
}
/*
  * See "Site admin" -> "image block" for all available options. the parameters are the same
  * as for the external imageblock
  */
$blockData = array('blocks' =>
                                'recentImage',
                                'itemId' => '35',
                                'maxSize' => '120',
                                'show' => '');

if($useImageFrames)
{
$blockData['itemFrame'] = $imageFrameName;
$blockData['albumFrame'] = $imageFrameName;
}


list ($ret, $bodyHtml, $headHtml) = GalleryEmbed::getImageBlock($blockData );
if ($ret) {
     print 'GalleryEmbed::getImageBlock failed, here is the error message: ' . $ret->getAsHtml();
     exit;
}
/* $bodyHtml contains the image block. print it somewhere on your website */
echo '<center>';
print $bodyHtml;
echo '<br></center>';

echo '<div align="center"><b>Random Image</b><br /></div>';

global $scripturl, $modSettings, $user_info, $ID_MEMBER;

$useImageFrames = true;
$imageFrameName = "shadow";

if($useImageFrames)
echo '<link rel="stylesheet" href="'.$modSettings['galleryUrl'].'/main.php?g2_controller=imageblock.ExternalCSS&g2_frames='.$imageFrameName.'"/>';

require_once($modSettings['galleryPath'].'/embed.php');
$ret = GalleryEmbed::init(array('fullInit' => true, 'baseUri' => $scripturl.'?action=gallery', 'g2Uri' => $modSettings['galleryUrl'].'/', 'activeUserId' => ($user_info['is_guest'] || !$user_info['is_gallery_user']) ? '' : $ID_MEMBER));
if ($ret) {
     print 'GalleryEmbed::init failed, here is the error message: ' . $ret->getAsHtml();
     exit;
}
/*
  * See "Site admin" -> "image block" for all available options. the parameters are the same
  * as for the external imageblock
  */
$blockData = array('blocks' => 'randomImage',
                                'maxSize' => '120',
                                'show' => '');

if($useImageFrames)
{
$blockData['itemFrame'] = $imageFrameName;
$blockData['albumFrame'] = $imageFrameName;
}


list ($ret, $bodyHtml, $headHtml) = GalleryEmbed::getImageBlock($blockData );
if ($ret) {
     print 'GalleryEmbed::getImageBlock failed, here is the error message: ' . $ret->getAsHtml();
     exit;
}
/* $bodyHtml contains the image block. print it somewhere on your website */
echo '<center>';
print $bodyHtml;
echo '</center>';
Title: Re: TP admin pages gone blank
Post by: thamar on June 04, 2009, 09:54:59 AM
Found the error message with the qub. Something I hadn't declared yet in the fresh install. My bad.

And all of the sudden the image block works without a problem. Reactivated it and all is fine now...
Title: Re: TP admin pages gone blank
Post by: G6Cad on June 04, 2009, 12:20:11 PM
Great, i will mark this to solved then :)