Embedding in a custom layout/application

Tarken

Joined: 2005-01-04
Posts: 7
Posted: Fri, 2005-01-07 16:41

I posted a topic about this in the "Customizing Gallery" forum, because it really does fit under that topic, as well as this forum's topic.

First off, for a bit of background, here is that thread: http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=24624

I've noticed that a few other people seem to be trying something similar to this. Is there perhaps a need for a "custom" GALLERY_EMBEDDED_INSIDE_TYPE? That way, all of the header/footer code is handled by the encompassing page, but gallery still displays all of it's contents as well as still handling all users and everything else it normally does.

Or is there perhaps an easier way to do this?

 
Tarken

Joined: 2005-01-04
Posts: 7
Posted: Fri, 2005-01-07 17:00

P.S. If the answer is just "hack it yourself", I'm good with that :P
I just want to know if there's an easier way :)

 
signe
signe's picture

Joined: 2003-07-27
Posts: 2322
Posted: Fri, 2005-01-07 17:07

The way to do that is simply to use the files in the html_wrap folder to customize the layout. Since the html_wrap files are PHP, you can simply include any other files you want and do anything inside them.

Anything that specifies EMBEDDED_INSIDE must do its own userdb handling in G1, so it's pretty much out of the question without a major rewrite.

 
Tarken

Joined: 2005-01-04
Posts: 7
Posted: Fri, 2005-01-07 17:21

Well see, I've done that already.. but as I described in my other post, I get output like this:

<!-- Gallery generated code -->
<html>
    <head>
        etc etc etc
    </head>
    <body>
<!-- My generated code -->
<html>
    <head>
        etc etc etc
    </head>
    <body>
(Gallery is displayed here)
    </body>
</html>
<!-- End my generated code -->
<!-- Gallery generated code -->
    </body>
</html>

What I need is a way to escape the gallery generated html/head/body tags, and provide my own in their stead.

Oh and here's the contents of my html_wrap files, just for info purposes:

[jwilhelm@harmony html_wrap]$ cat wrapper.header.default
<?php

require( $_SERVER[ "DOCUMENT_ROOT" ] . "/standard.inc.php" );

start_page( "gallery", $omit_tracking=true );

?>
[jwilhelm@harmony html_wrap]$ cat wrapper.footer.default
<?php

end_page( $omit_tracking=true );

?>

 
maledictus

Joined: 2005-03-08
Posts: 23
Posted: Mon, 2005-04-11 16:02
Tarken wrote:
Well see, I've done that already.. but as I described in my other post, I get output like this:

<!-- Gallery generated code -->
<html>
    <head>
        etc etc etc
    </head>
    <body>
<!-- My generated code -->
<html>
    <head>
        etc etc etc
    </head>
    <body>
(Gallery is displayed here)
    </body>
</html>
<!-- End my generated code -->
<!-- Gallery generated code -->
    </body>
</html>

What I need is a way to escape the gallery generated html/head/body tags, and provide my own in their stead.

Oh and here's the contents of my html_wrap files, just for info purposes:

[jwilhelm@harmony html_wrap]$ cat wrapper.header.default
<?php

require( $_SERVER[ "DOCUMENT_ROOT" ] . "/standard.inc.php" );

start_page( "gallery", $omit_tracking=true );

?>
[jwilhelm@harmony html_wrap]$ cat wrapper.footer.default
<?php

end_page( $omit_tracking=true );

?>

Any luck with that? That is what I am searching for also :D

THX

 
Tarken

Joined: 2005-01-04
Posts: 7
Posted: Mon, 2005-04-11 16:10

Nope.. no luck. And in fact, my situation is worse now. I've converted my page to XHTML, so I'm surprised the page is even rendering right still. Now I've got this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
  <title>Tarken's Galleries</title>
    <link rel="stylesheet" type="text/css" href="http://tarken.lyrical.net/gallery/skins/tarken/css/embedded_style.css">
  <link rel="stylesheet" type="text/css" href="http://tarken.lyrical.net/gallery/skins/tarken/css/standalone_style.css">      <link rel="next" href="http://tarken.lyrical.net/gallery/albums.php?set_albumListPage=2" />
      <link rel="last" href="http://tarken.lyrical.net/gallery/albums.php?set_albumListPage=2" />
  </head>
<body dir="ltr">

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<link rel="stylesheet" type="text/css" href="/style.css" />
		<title>Tarken v42.8 :: gallery</title>
	</head>
	<body>

...as the page header. Pretty nasty.
I think the solution is going to be a "hack it yourself"... which I just haven't had the time for lately.

 
maledictus

Joined: 2005-03-08
Posts: 23
Posted: Thu, 2005-04-14 18:35

Is there a way, for example, to just include albums.php, view_album.php and view_photo.php to a custom made layout to include gallery into a site? :(

Something like this:

//Design code made by me..

include('albums.php');

//Close design code