Welcome to Geeklog, Anonymous Friday, March 29 2024 @ 12:50 am EDT

Geeklog Forums

Geeklog & Gallery Issues: Problem with wrapper files?


Status: offline

rkgermano

Forum User
Newbie
Registered: 12/30/04
Posts: 5
confused
I have searched the forums and read the documentation and this seems to be a popular problem without a resolution that I can find. I am experiencing a problem with partial intergration of Geeklog 1.3.10 and Gallery 1.4.4 p14. I am experiencing a problem with the look and feel of the site and Geeklog is not wrapping completely around Gallery. As of right now, I can only get the bottom of Geeklog to wrap around gallery. Geeklog is passing the security back to Gallery and allowing Geeklog users that are logged in, to properly access and edit their photos in Gallery. I spent the last two days troubleshooting the issue without much luck. I installed Geeklog 1.3.10 first as a fresh install followed by a new install of Gallery 1.4.4. I followed the wizard in Gallery and setup Gallery to be embedded in Geeklog during Gallery's configuration process. No probelms with the install. Gallery and Geeklog are working great seperately. I saw some forum posts about issues with the Gallery wrapper.header, wrapper.header.default, wrapper.footer, wrapper.footer.default and a recommendation to delete these files to fix the problem. This did not help (got an error about missing files), but I did notice that 'GeekLog' in the wrapper.footer and wrapper.footer.default where two differenet alpha cases (GeekLog and geeklog). I changed this to match and the Geeklog footer now appears correctly. I tried the samething with the Header files, but no luck. I am stumped and looking for help. I have a feeling it has something to do wrapper.header files, but my coding skills are limited and am hacking along. I am posting my Gallery header and footer files out here for review. Any suggestion are appreciated. Thanks


wrapper.header


global $GALLERY_EMBEDDED_INSIDE;

if ($GALLERY_EMBEDDED_INSIDE == 'GeekLog) {
/* Display header and left blocks */
COM_siteHeader();
}

?>


wrapper.header.default

// $Id: wrapper.header.default,v 1.20 2004/03/31 21:11:43 jenst Exp $
// This header file detects whether Gallery is embedded in any
// known PHP applications and then decorates Gallery appropriately.

global $GALLERY_EMBEDDED_INSIDE;
global $GALLERY_EMBEDDED_INSIDE_TYPE;

if(isset($GALLERY_EMBEDDED_INSIDE)) {
global $PHP_SELF;

if (
($GALLERY_EMBEDDED_INSIDE_TYPE == 'postnuke' && !defined("LOADED_AS_MODULE")) ||
($GALLERY_EMBEDDED_INSIDE_TYPE == 'phpnuke' && !eregi("modules.php", $PHP_SELF)) ||
($GALLERY_EMBEDDED_INSIDE_TYPE == 'nsnnuke' && !eregi("modules.php", $PHP_SELF)) ||
($GALLERY_EMBEDDED_INSIDE_TYPE == 'phpBB2' && !defined("LOADED_AS_MODULE"))
) {
die ("You can't access this file directly...");
}

switch ($GALLERY_EMBEDDED_INSIDE_TYPE) {

case 'phpnuke':
case 'postnuke':

/*
* Nuke owns the tag and doesn't share. So, if we want to get our
* style sheet in place we've got to intercept Nuke's header and modify it
* to insert a few lines of our own in place. We could speed this process
* up greatly if we cached the results and saved it somewhere handy (like
* the session) but then we'd be vulnerable to attack by somebody who has
* write permissions in the directory that the session files live. They
* could create a bogus session file, set that ID into their cookie and
* then pass their own code into our eval() below.
*/
$header = "";
if ($fd = fopen("header.php", "r")) {
while (!feof($fd)) {
$line = fgets($fd, 1024);
$line = str_replace('
$line = str_replace(' ?>', '', $line);
$header .= $line;
if (strstr($line, "
$links = getStyleSheetLink();
$links = str_replace('"', '"', $links);
$header .= 'echo "' . $links . 'n";' . "n";
}
}
}

/*
* We can control whether we see the right side blocks
* by setting the value of the $index variable. To
* see the blocks, set $index to 1. To hide them set
* $index to 0. We default to 0 to leave more room for
* the photos. If you change this value, you should
* also change it in wrapper.footer
*
* Note that we save the current value of $index in
* $tmp_index and restore it when we're done. If we
* don't do this, navigation won't work!
*/
global $index;
$tmp_index = $index;
$index = 0;

eval($header);

OpenTable();

$index = $tmp_index;
break;

case 'phpBB2':
/*
* PhpBB2 uses a templating system and also owns the HEAD tags. The
* easiest way at the moment to tackle this issue is therefore to
* simply make sure we don't call this function if phpBB2 is being used
* and put the style sheet link into the template manually
*/

global $phpbb_root_path;
global $template;
global $db;
global $theme, $lang, $images;
global $board_config;
global $phpEx;
global $userdata, $u_login_logout;
global $s_privmsg_new, $s_last_visit;
global $l_privmsgs_text_unread, $l_privmsgs_text, $l_online_users;
global $page_title, $nav_links_html;

// Sort out the page title
$page_title .= $gallery->app->galleryTitle;

// Verify that the $phpbb_root_path isn't overwritten with a remote exploit
if (!realpath($phpbb_root_path)) {
print _("Security violation") ."n";
exit;
} else {
if (! defined("PHPBB_ROOT_PATH")) {
define("PHPBB_ROOT_PATH", $phpbb_root_path);
}
include (PHPBB_ROOT_PATH . "includes/page_header.php");
}
break;

case 'GeekLog':
/*
** Display header and left blocks
*/
echo COM_siteHeader( );
break;

}
}
?>

wrapper.footer


global $GALLERY_EMBEDDED_INSIDE;

if ($GALLERY_EMBEDDED_INSIDE == 'GeekLog') {
/*
* We can control whether we see the right side blocks
* by setting passing a parameter to COM_siteFooter.
* To see the blocks, pass true; to hide them pass false.
*/

echo COM_siteFooter( false );
}

?>

wrapper.footer.default

// $Id: wrapper.footer.default,v 1.11 2004/03/21 16:51:32 jenst Exp $
// This header file detects whether Gallery is embedded in any
// known PHP applications and then decorates Gallery appropriately.

global $GALLERY_EMBEDDED_INSIDE_TYPE;

switch($GALLERY_EMBEDDED_INSIDE_TYPE) {
case 'phpnuke':
case 'postnuke':

/*
* We can control whether we see the right side blocks
* by setting the value of the $index variable. To
* see the blocks, set $index to 1. To hide them set
* $index to 0. We default to 0 to leave more room for
* the photos. If you change this value, you should
* also change it in wrapper.header
*/
global $index;
$index = 0;

CloseTable();
include('footer.php');
break;

case 'phpBB2':
/*
** PhpBB2 doesn't require the OpenTable() function or any of the
** other functions that are native to Nuke.
*/

global $phpbb_root_path;
global $userdata;
global $phpEx;
global $gen_simple_header;
global $template;
global $board_config;
global $db;
global $do_gzip_compress;
global $lang;

include (PHPBB_ROOT_PATH . "includes/page_tail.php");
break;

case 'GeekLog':

/*
** We can control whether we see the right side blocks
** by setting passing a parameter to COM_siteFooter.
** To see the blocks, pass true; to hide them pass false.
*/

echo COM_siteFooter( false );
break;

}
?>
 Quote

Status: offline

rkgermano

Forum User
Newbie
Registered: 12/30/04
Posts: 5
Got a reply to the problem on the Gallery Forum. The recommendation was to delete only the non-default files and leave the wrapper.header.default and wrapper.footer.default files. That solved it. Here is the Gallery post and response: Link to Post
 Quote

All times are EDT. The time is now 12:50 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content