Not populated $g2data['headHtml']

c2h5oh

Joined: 2006-01-11
Posts: 11
Posted: Wed, 2006-01-11 23:04

Hi,

I'm trying to integrate gallery 2.0.2 into my custom php website. My embed file code header looks like this:

<?php

	require_once(dirname(__FILE__) . '/../gallery202/embed.php'); 
	
	$ret = GalleryEmbed::init(array('embedUri'=>'index.php', 'embedPath' => '/gallery/', 'relativeG2Path' => '../gallery202/',  'loginRedirect' => '/index.php', 'activeUserId' => ''));
	
	GalleryCapabilities::set('login', true);
	GalleryCapabilities::set('showSidebarBlocks', false);
	
	$g2data = GalleryEmbed::handleRequest(); 
	
	print_r($g2data);
	exit;
	
	if ($g2data['isDone']) {
		print "isDone;"; 
		exit; 	// Gallery 2 has already sent output (redirect or binary data) 
	} 

	if (isset($g2data['headHtml'])) { 
		list($headHtmltitle, $headHtmlcss, $headHtmljavascript) = GalleryEmbed::parseHead($g2data['headHtml']); 
	}
	
	if (isset($g2data['bodyHtml'])) { 
		list($bodyHtmltitle, $bodyHtmlcss, $bodyHtmljavascript) = GalleryEmbed::parseHead($g2data['bodyHtml']); 
	}
?>

After printing $g2data array I get 3 populated elements: 'bodyHtml', 'sidebarBlocksHtml' and 'isDone'. But I miss 'headHtml'.

Could anyone tell me, what I'm doing wrong and how to get this bloody header? :-D

Thank you for any kind of hint