TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 201
  • Total: 201

TP admin pages gone blank

Started by thamar, June 02, 2009, 09:12:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

thamar

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.

G6Cad

Deactivate the editor and paste the code in again with out it and see if it helps.

thamar

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

thamar

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>';

thamar

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...

G6Cad

Great, i will mark this to solved then :)

This website is proudly hosted on Crocweb Cloud Website Hosting.