Visual Integration using gallery2 embedded

shocksll
shocksll's picture

Joined: 2005-06-22
Posts: 352
Posted: Tue, 2005-09-20 18:14

This is taken from this thread.

http://gallery.menalto.com/node/36897

Valiant, is there anything wrong with doing it like it was embedded. That way they wouldn't have to mod any theme's. Something like below is what i'm thinking.

See http://codex.gallery2.org/index.php/Gallery2:How_to_visually_embed_G2_in_your_own_website_using_embedded_mode

Steve Lineberry

 
shocksll
shocksll's picture

Joined: 2005-06-22
Posts: 352
Posted: Tue, 2005-09-20 18:14

It seems to work as expected on my gallery2 test/demo site.

http://pictures.thelineberrys.com/gallery2/gallery2embedded.php

I just had to change my cookie path to / and delete my cookies.

Steve Lineberry

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-09-20 18:25

i wanted to keep the other thread simple = no programming, just HTML / templates. that's why.
IMO modding a theme is far less complicated than using GalleryEmbed.

embedPath should be '/gallery2/'
and
$g2_Config['embedUri'] = 'gallery2embedded.php';

you shouldn't have to tinker with the cookie path.

 
shocksll
shocksll's picture

Joined: 2005-06-22
Posts: 352
Posted: Tue, 2005-09-20 18:27

using the users html that he posted in the other thread and my embed colorpack I was able to come up with this:
http://pictures.thelineberrys.com/gallery2/gallery2embeddedtravel.php

I had to remove the doctype because his header was getting all screwed up.

Steve Lineberry

 
shocksll
shocksll's picture

Joined: 2005-06-22
Posts: 352
Posted: Tue, 2005-09-20 18:32

I guess I just feel like I see a lot of people asking how to get g2 inside their own site and I'm not sure if customizing the templates is the best way considering they will have to never change themes or add their own customization to every theme. And since they copied the theme.tpl into the local folder, any theme.tpl updates that are done won't get into their custom version when the upgrade. I was just asking if there is any downside to using embedding to accomplish the visual integration. My code above I feel like does visual integration only and provides all the same functionality that one can do in the standalone gallery2 (such as the login link).

Steve Lineberry

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-09-20 18:33

sorry, i didn't realize you wanted to help, i thought it was another question.
still, i think changing the look of a site in a single theme.tpl is a very intuitive concept. assembling the parts as in GalleryEmbed just for the visual integration is overkill IMO. also, you need to set paths and add some php code. for me it's fine, but for a designer, it would definitely be the more complicated method.

 
shocksll
shocksll's picture

Joined: 2005-06-22
Posts: 352
Posted: Tue, 2005-09-20 18:36
valiant wrote:
i wanted to keep the other thread simple = no programming, just HTML / templates. that's why.
IMO modding a theme is far less complicated than using GalleryEmbed.

embedPath should be '/gallery2/'
and
$g2_Config['embedUri'] = 'gallery2embedded.php';

you shouldn't have to tinker with the cookie path.

Thanks for the tips in the change to the embedded code. I had to change the cookie path so I could still be logged in while in both standalone and my gallery2embedded.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-09-20 18:36

btw: feel free to add your link to the codex.gallery2.org -> howtos page.

 
shocksll
shocksll's picture

Joined: 2005-06-22
Posts: 352
Posted: Tue, 2005-09-20 18:42

Ok, that's cool. I was just suggesting this method because I feel like it makes more sense to the G1 users who are used to the wrapper.footer.default and wrapper.header.default. Where this is one place to add/change your header and footer for the whole site no matter what theme you use. So, is there any downside to using my code above for visual integration only?

Steve Lineberry

 
shocksll
shocksll's picture

Joined: 2005-06-22
Posts: 352
Posted: Tue, 2005-09-20 18:54
valiant wrote:
$g2_Config['embedUri'] = 'gallery2embedded.php';

It actually didn't work when I changed it to this. I had to change it back to /gallery2/gallery2embedded.php

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-09-20 19:08

downside? yes,
- you have to create a new file (not just a customized theme)
- you have to use PHP code and find out what paths you need
- there are suddenly two entry points to your G2, i guess most users don't want that
- the need to to something with cookie paths

 
shocksll
shocksll's picture

Joined: 2005-06-22
Posts: 352
Posted: Tue, 2005-09-20 19:24

Ok, thanks for the response.

Steve Lineberry

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Fri, 2005-10-07 22:08

Is there a reason why this is only kept in this thread, and not moved to a proper ( http://codex.gallery2.org/index.php/Gallery2:How_to_visually_embed_G2_in_your_own_website_using_embedded_mode ) codex page?

h0bbel - Gallery Team
If you found my help useful, please consider donating to Gallery
http://h0bbel.p0ggel.org

 
shocksll
shocksll's picture

Joined: 2005-06-22
Posts: 352
Posted: Fri, 2005-10-21 14:41
 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Fri, 2005-10-21 15:13

Excellent! Thanks!


h0bbel - Gallery Team
If you found my help useful, please consider donating to Gallery
http://h0bbel.p0ggel.org

 
pasty901

Joined: 2006-01-13
Posts: 1
Posted: Fri, 2006-01-13 09:08

Wonderful - just what i was looking for - slight problems though...
I get the following error "Notice: Undefined index: PHPSESSID in d:\apache group\apache\htdocs\gallery\gallery2embedded.php on line 14" which causes my css to not be rendered correctly - if i silence the error the css works fine but i am unable to use the cart feature, i have changed the cookie path and cleared them as instructed to no avail. I would appreciate your thoughts on what could be wrong ?

Many thanks

Pasty

 
nedret

Joined: 2005-07-06
Posts: 17
Posted: Thu, 2006-01-19 10:51
Quote:
It seems to work as expected on my gallery2 test/demo site.

http://pictures.thelineberrys.com/gallery2/gallery2embedded.php

Hi shocksll,

Your gallery does not seem to be embedded in anything... Did you change it in the mean time?

I tried to apply your method, but unsuccessfully so far.

For one thing, when clicking on some links, there is a clash between the two headers:

Quote:
Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/sanp-staging/html/includes/tags/head1.php:13) in /var/www/vhosts/sanp-staging/html/gallery/modules/core/classes/GalleryPhpVm.class on line 125

Did you come across this problem too? Does anyone know how I can resolve this?

 
shocksll
shocksll's picture

Joined: 2005-06-22
Posts: 352
Posted: Fri, 2006-01-20 02:57
pasty901 wrote:
Wonderful - just what i was looking for - slight problems though...
I get the following error "Notice: Undefined index: PHPSESSID in d:\apache group\apache\htdocs\gallery\gallery2embedded.php on line 14" which causes my css to not be rendered correctly - if i silence the error the css works fine but i am unable to use the cart feature, i have changed the cookie path and cleared them as instructed to no avail. I would appreciate your thoughts on what could be wrong ?

Many thanks

Pasty

You may not need that line where it assigns the session id to the gallery ID. That's only if you have auto start session on. Since you are receiving this error that means that you haven't started a sessions so there isn't an ID or that you've changed the name of your session ID variable and you should use that variable name instead of phpsessid. Check out your phpinfo to see the correct settings for your environment.

Steve Lineberry

 
shocksll
shocksll's picture

Joined: 2005-06-22
Posts: 352
Posted: Fri, 2006-01-20 03:00
nedret wrote:
Quote:
It seems to work as expected on my gallery2 test/demo site.

http://pictures.thelineberrys.com/gallery2/gallery2embedded.php

Hi shocksll,

Your gallery does not seem to be embedded in anything... Did you change it in the mean time?

I tried to apply your method, but unsuccessfully so far.

For one thing, when clicking on some links, there is a clash between the two headers:

Quote:
Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/sanp-staging/html/includes/tags/head1.php:13) in /var/www/vhosts/sanp-staging/html/gallery/modules/core/classes/GalleryPhpVm.class on line 125

Did you come across this problem too? Does anyone know how I can resolve this?

Yea, I think I took off the embedding for that site. You can still see it embedded at http://eclecticthreads.thelineberrys.com

To fix your error you need to turn output buffering on.

 
nedret

Joined: 2005-07-06
Posts: 17
Posted: Thu, 2006-01-26 15:25
shocksll wrote:
To fix your error you need to turn output buffering on.

Wow! This resolved the error, indeed!
Thank you very much, shocksll!

I have 2 more problems, which I suspect are related to the embedding, so I'll take the liberty to ask them within this thread.

1) When applying a certain frame style (like shadow for example) it does not reflect on the embedded site, although it works if not embedded. Do you happen to know why that may be?

2) The mod_rewrite does not work. Could this be related to embedding the gallery, or not really?

 
shocksll
shocksll's picture

Joined: 2005-06-22
Posts: 352
Posted: Thu, 2006-01-26 16:35
nedret wrote:
Your gallery does not seem to be embedded in anything... Did you change it in the mean time?

Turns out it was embedded it just didn't look any different. I've change the text around it so you can tell that it's embedded but for the most part it still looks like the default.

nedret wrote:
1) When applying a certain frame style (like shadow for example) it does not reflect on the embedded site, although it works if not embedded. Do you happen to know why that may be?

Seems to work for me http://pictures.thelineberrys.com/gallery2/gallery2embedded.php?g2_view=core.ShowItem&g2_itemId=4156. What's your url?

nedret wrote:
2) The mod_rewrite does not work. Could this be related to embedding the gallery, or not really?

mod_rewrite should work but you have to enable it from the embedded version of the site. You probably need to resetup your mod_rewrite module in order for it to use the new embedded url.

 
nedret

Joined: 2005-07-06
Posts: 17
Posted: Thu, 2006-01-26 16:56

It is http://www.sanparks.org/gallery/
Thanks for taking the trouble to look into this!

 
shocksll
shocksll's picture

Joined: 2005-06-22
Posts: 352
Posted: Thu, 2006-01-26 22:33

Can you give me the url of a page that's supposed to have an image frame? Thanks.

Steve Lineberry

 
nedret

Joined: 2005-07-06
Posts: 17
Posted: Tue, 2006-01-31 14:39

Hi Steve,

I set the parent directories to have image frames - shadow.

Compare this (embedded):

http://www.sanparks.org/gallery/default.php?g2_view=core.ShowItem&g2_itemId=177

To this (not embedded):

http://www.sanparks.org/gallery/main.php?g2_view=core.ShowItem&g2_itemId=177

Thanks,
Nedret

 
nedret

Joined: 2005-07-06
Posts: 17
Posted: Tue, 2006-01-31 16:41
shocksll wrote:
mod_rewrite should work but you have to enable it from the embedded version of the site. You probably need to resetup your mod_rewrite module in order for it to use the new embedded url.

About mod_rewrite, I'll have to ask for help again.

This is what I did:

1. Re-installed the module mod_rewrite.
2. This is what I put in as .haccess path: /var/www/vhosts/sanp-staging/html/gallery/
3. This is what I put in as public path: /gallery
4. It gives me all Success when testing.
5. I copied /gallery/.htaccess file to /g1/albums/.htaccess
6. The rewrite does not work.
7. Here is the content of the .haccess file and I do not like what I see in there - the "/gallery//gallery/" part:

Quote:
RewriteBase /gallery/

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} gallery\_remote2\.php
RewriteCond %{REQUEST_FILENAME} !/gallery/default\.php
RewriteRule . - [L]

RewriteCond %{THE_REQUEST} \ /gallery/admin/(\?.|\ .)
RewriteCond %{REQUEST_FILENAME} !/gallery/default\.php
RewriteRule . /gallery//gallery/default.php?g2_view=core.SiteAdmin [QSA,L]

RewriteCond %{THE_REQUEST} \ /gallery/v/(\?.|\ .)
RewriteCond %{REQUEST_FILENAME} !/gallery/default\.php
RewriteRule . /gallery//gallery/default.php?g2_view=core.ShowItem [QSA,L]

RewriteCond %{THE_REQUEST} \ /gallery/d/([0-9]+)-([0-9]+)/([^\/]+)(\?.|\ .)
RewriteCond %{REQUEST_FILENAME} !/gallery/default\.php
RewriteRule . //gallery/main.php?g2_view=core.DownloadItem&g2_itemId=%1&g2_serialNumber=%2 [QSA,L]

RewriteCond %{THE_REQUEST} \ /gallery/v/([^?]+)(\?.|\ .)
RewriteCond %{REQUEST_FILENAME} !/gallery/default\.php
RewriteRule . /gallery//gallery/default.php?g2_view=core.ShowItem&g2_path=%1 [QSA,L]

What am I missing? I'm getting crazy with this - having spent so much time on it without success...

Thanks, Steve!

 
shocksll
shocksll's picture

Joined: 2005-06-22
Posts: 352
Posted: Tue, 2006-01-31 21:21

Can you post your default.php file?

Steve Lineberry

 
nedret

Joined: 2005-07-06
Posts: 17
Posted: Wed, 2006-02-01 06:52

Hi Steve,

Here is default.php:

Quote:
<? include($_SERVER['DOCUMENT_ROOT'].'/includes/header_2col.php'); ?>
<?php
$g2_Config['path'] = dirname(__FILE__) . '/';
$g2_Config['embedPath'] = '/';
$g2_Config['relativeG2Path'] = '/gallery/';
$g2_Config['embedUri'] = '/gallery/default.php';
//print_r($g2_Config);
require_once( $g2_Config['path'] . 'embed.php');
$ret = GalleryEmbed::init(array(
'embedPath' => $g2_Config['embedPath'],
'relativeG2Path' => $g2_Config['relativeG2Path'],
'embedUri' => $g2_Config['embedUri'],
'fullInit' => 'false',
'gallerySessionId' => $_COOKIE['PHPSESSID']
));
GalleryCapabilities::set('login',true);

// handle the G2 request
$g2moddata = GalleryEmbed::handleRequest();
// show error message if isDone is not defined
if (!isset($g2moddata['isDone']))
{
print 'isDone is not defined, something very bad must have happened.';
exit;
}
// die if it was a binary data (image) request
if ($g2moddata['isDone'])
{
exit; /* uploads module does this too */
}
if ($ret->isError())
{
print $ret->getAsHtml();
}
?>

<?php
echo $g2moddata['bodyHtml'];
?>
<? include(DIR_WS_INCLUDES.'footer_tags.php'); ?>

 
shocksll
shocksll's picture

Joined: 2005-06-22
Posts: 352
Posted: Wed, 2006-02-01 12:08
valiant wrote:
embedPath should be '/gallery2/'
and
$g2_Config['embedUri'] = 'gallery2embedded.php';

According to valiant above maybe you should try your embedpath to be default.php to try to get your rewrite working.

Also, the reason the shadows don't show up is you took out the whole head section of the gallery2embedded example I had. You need to add a

echo $g2moddata['headHtml'];

to the head section of your header file. And then you need to move your header file <? include($_SERVER['DOCUMENT_ROOT'].'/includes/header_2col.php'); ?>
down right above the echo $g2moddata['bodyHtml'];

Check out my example again and you'll see the stuff in the head that you must have deleted when you customized it for yourself.

 
nedret

Joined: 2005-07-06
Posts: 17
Posted: Wed, 2006-02-01 17:35
shocksll wrote:
According to valiant above maybe you should try your embedpath to be default.php to try to get your rewrite working.

Unfortunately no luck here. Tried all kinds of combinations - it just does not work.

I'll try again tomorrow, as right now it feels like a dead end.

shocksll wrote:
Also, the reason the shadows don't show up is you took out the whole head section of the gallery2embedded example I had. You need to add a

echo $g2moddata['headHtml'];

to the head section of your header file. And then you need to move your header file <? include($_SERVER['DOCUMENT_ROOT'].'/includes/header_2col.php'); ?>
down right above the echo $g2moddata['bodyHtml'];

Check out my example again and you'll see the stuff in the head that you must have deleted when you customized it for yourself.

Yes! Yes! Yes!

This worked! It looks like my pain was self- inflicted. :)

Thank you for sticking with me so far! It feels great to sort things out thanks to your advice!

Nedret

 
jerriez

Joined: 2006-03-01
Posts: 5
Posted: Fri, 2006-03-03 12:01

Hi I would need help..

I tried to do the embedding for my site, and tried to upload a few test files,
but it seems to show broken images link on my embedded page but it works perfectly on the usual site

Embedded: http://birds.com.sg/photo/gallery2embedded.php
Actual: http://birds.com.sg/photo/

Could anyone advise on the problem and solutions?
Thanks a million!

 
shocksll
shocksll's picture

Joined: 2005-06-22
Posts: 352
Posted: Fri, 2006-03-03 12:39

You need to either turn off the urlrewrite or reconfig your urlrewrite while accessing your page from embedded mode.

Steve Lineberry

 
jerriez

Joined: 2006-03-01
Posts: 5
Posted: Fri, 2006-03-03 16:22

Thanks a million!
I deactivate that module and it works..

Thanks you!

 
jerriez

Joined: 2006-03-01
Posts: 5
Posted: Fri, 2006-03-03 16:40

Hi,

However, any problem I would like to ask. Instead of having the thumbnail image shown up, it got this funny image that pops up on the page. How can I make the thumbnail image appears instead of the strange image?

 
shocksll
shocksll's picture

Joined: 2005-06-22
Posts: 352
Posted: Fri, 2006-03-03 17:51

Please start a new thread for this question. Thanks.

Steve Lineberry

 
cheapscot
cheapscot's picture

Joined: 2003-09-13
Posts: 11
Posted: Wed, 2006-04-19 23:40

For anyone else who did not know what was meant by "turn output buffering on", it means you add a line to your php.ini file like this:
output_buffering=on

 
falieson

Joined: 2006-04-04
Posts: 11
Posted: Fri, 2006-04-21 21:21

"Fatal error: Call to a member function on a non-object in /home2/w3b4dm1n/public_html/gallery/gallery2embedded.php on line 34"

Quote:
file location: /gallery/gallery2embedded.php
~config code~
$g2_Config['path'] = dirname(__FILE__) . '/';
$g2_Config['embedPath'] = '';
$g2_Config['relativeG2Path'] = 'gallery/';
$g2_Config['embedUri'] = '/gallery/gallery2embedded.php';

 
falieson

Joined: 2006-04-04
Posts: 11
Posted: Fri, 2006-04-21 21:23

oh sorry. line 34 is: if ($ret->isError())

Quote:
// handle the G2 request
$g2moddata = GalleryEmbed::handleRequest();

// show error message if isDone is not defined
if (!isset($g2moddata['isDone']))
{
print 'isDone is not defined, something very bad must have happened.';
exit;
}

// die if it was a binary data (image) request
if ($g2moddata['isDone'])
{
exit; /* uploads module does this too */
}

if ($ret->isError())
{
print $ret->getAsHtml();
}
?>

 
shocksll
shocksll's picture

Joined: 2005-06-22
Posts: 352
Posted: Sun, 2006-04-23 03:29

If you are using G2.1, you need to use the latest code posted http://codex.gallery2.org/index.php/Gallery2:How_to_visually_embed_G2_in_your_own_website_using_embedded_mode

This is the location that I will make updates to the code.

Steve Lineberry

 
falieson

Joined: 2006-04-04
Posts: 11
Posted: Wed, 2006-04-26 07:04

How do I remove the navbar and basically everything but just the albums them selves?

http://www.cpsigmapi.org/gallery/gallery2embedded.php?g2_itemId=1113

 
shocksll
shocksll's picture

Joined: 2005-06-22
Posts: 352
Posted: Wed, 2006-04-26 09:35

At http://codex.gallery2.org/index.php/Gallery2:Integration_Howto

There is some example code of not displaying the sidebar.

Add the line

GalleryCapabilities::set('showSidebar', false);

right under the

GalleryCapabilities::set('login',true);

Depending on what you want to remove, you might need to make your own theme or check out some of the ones here.

http://codex.gallery2.org/index.php/Gallery2:User_Contributions#Themes

You might be interested in my EclecticThreads theme http://gallery.menalto.com/node/39159 It's very minimal with no sidebar and you don't even have to add the GalleryCapabilities thing above.

If you don't want to see the gallery logo or the footer buttons uncomment the correct style in the gallery2embedded code or add this to your site's css file.

change

<style type="text/css"> <!--  /*#gsHeader { display : none; } #gsFooter { display: none; }*/ --> </style>

to

<style type="text/css"> <!--  #gsHeader { display : none; } #gsFooter { display: none; } --> </style>

Steve Lineberry

 
WebKat
WebKat's picture

Joined: 2002-11-22
Posts: 182
Posted: Fri, 2006-04-28 12:40

I get frustrated with themes as a general rule, because typically I just want to plunk the content into my own website design and not have it try to put in its own colors, backgrounds, etc. I made a theme for my G1 gallery on my website here: http://gallery.opalcat.com which I'm going to have to recreate for G2...ugh...

I was hoping to avoid having to create a whole new theme for a site I'm doing for a friend, but when I tried to embed it using the instructions, it works great when I view gallery2embedded.php, but as soon as I click on anything (album, whatever) it goes right back to the non-embedded version. Also, how can I get it to stop using a color pack? I don't want background colors or anything on it, I just want my background to show through! Here it is: http://reardonbuilders.com/gallery/gallery2embedded.php --you can see how stupid it looks with a white background and all of that (I don't want ANY color background).

 
WebKat
WebKat's picture

Joined: 2002-11-22
Posts: 182
Posted: Fri, 2006-04-28 12:48

(oh, I already set color pack to "none" but that doesn't help)

 
shocksll
shocksll's picture

Joined: 2005-06-22
Posts: 352
Posted: Fri, 2006-04-28 22:48
opalcat wrote:
Also, how can I get it to stop using a color pack? I don't want background colors or anything on it, I just want my background to show through! Here it is: http://reardonbuilders.com/gallery/gallery2embedded.php --you can see how stupid it looks with a white background and all of that (I don't want ANY color background).

That's what my embed colorpack is for. Check out http://gallery.menalto.com/node/35451

 
shocksll
shocksll's picture

Joined: 2005-06-22
Posts: 352
Posted: Fri, 2006-04-28 22:55

The reason your gallery keeps jumping out of being embedded is because you have the url rewrite module on and it looks like you configured it while not embedded. Resetup your urlrewrite while embedded to get the .htaccess file to use your gallery2embedded file. Check out the embedded version of my demo site using url rewrite.

http://pictures.thelineberrys.com/gallery2embedded.php

If you need it to work while embedded and not embedded and with urlrewrite for both, that takes a little more work but as you can see on my demo site I got it working. http://pictures.thelineberrys.com/gallery2/ The key was to move the gallery2embedded.php file to the root and change the top of my gallery2embedded.php to the following.

$g2_Config['path'] = dirname(__FILE__) . '/gallery2/';

$g2_Config['embedPath'] = '/';
$g2_Config['g2Uri'] = '/gallery2/';
$g2_Config['loginredirect'] = '/';
$g2_Config['embedUri'] = '/gallery2embedded.php';

And in the urlrewrite setup while embedded I set the htaccess path to be the root of my website and I think I put a / for the path.

Steve Lineberry

 
WebKat
WebKat's picture

Joined: 2002-11-22
Posts: 182
Posted: Sat, 2006-04-29 02:21

Wow, thanks! *goes off to try it*

 
nedret

Joined: 2005-07-06
Posts: 17
Posted: Fri, 2006-05-12 13:52

Hi shocksll,

I just did an upgrade to 2.1.1, which ran fine and displays results with main.php ok, but if I go to my embedded page - default.php, I get the following error:

Fatal error: Call to a member function isError() on a non-object in ...

which refers to this part:

if ($ret->isError())
{
print $ret->getAsHtml();
}

Would you happen to know why this may be?

Thanks!
Nedret

 
siennalizard

Joined: 2006-05-12
Posts: 5
Posted: Fri, 2006-05-12 16:04

I'm attempting this approach, as I'm a PHPer who's used to include() path issues (and don't mind figuring it out).

Problem is, that I can't find the embed.php file I apprently need to include. It doesn't seem to be in the cvs tree that I used at all.
Basically, my script dies here (for want of embed.php):

require_once( $g2_Config['path'] . 'embed.php');

What am I missing?
Cheers,
J.

 
shocksll
shocksll's picture

Joined: 2005-06-22
Posts: 352
Posted: Fri, 2006-05-12 21:59
nedret wrote:
Hi shocksll,

I just did an upgrade to 2.1.1, which ran fine and displays results with main.php ok, but if I go to my embedded page - default.php, I get the following error:

Fatal error: Call to a member function isError() on a non-object in ...

which refers to this part:

if ($ret->isError())
{
print $ret->getAsHtml();
}

Would you happen to know why this may be?

Thanks!
Nedret

You need to update to the latest code. Did you see my post above? http://gallery.menalto.com/node/36918#comment-182058

 
shocksll
shocksll's picture

Joined: 2005-06-22
Posts: 352
Posted: Fri, 2006-05-12 22:04
siennalizard wrote:
I'm attempting this approach, as I'm a PHPer who's used to include() path issues (and don't mind figuring it out).

Problem is, that I can't find the embed.php file I apprently need to include. It doesn't seem to be in the cvs tree that I used at all.
Basically, my script dies here (for want of embed.php):

require_once( $g2_Config['path'] . 'embed.php');

What am I missing?
Cheers,
J.

embed.php should be in the root of your gallery2 installation. Along with main.php and index.php, etc. You might want to check to make sure you have uploaded all the files that came in the package. I just checked the minimal package and even it includes embed.php. You mentioned cvs, are you downloading latest code from cvs or are you downloading it as a package from http://codex.gallery2.org/index.php/Gallery2:Download#Packages

 
siennalizard

Joined: 2006-05-12
Posts: 5
Posted: Fri, 2006-05-12 22:41
shocksll wrote:
You mentioned cvs, are you downloading latest code from cvs or are you downloading it as a package from http://codex.gallery2.org/index.php/Gallery2:Download#Packages

I'm using a nightly off http://gallery.menalto.com/downloads. It is, afterall where the download link in the header points. main.php doesn't feature, either...

Cheers,
J.

 
shocksll
shocksll's picture

Joined: 2005-06-22
Posts: 352
Posted: Sat, 2006-05-13 00:44
siennalizard wrote:
shocksll wrote:
You mentioned cvs, are you downloading latest code from cvs or are you downloading it as a package from http://codex.gallery2.org/index.php/Gallery2:Download#Packages

I'm using a nightly off http://gallery.menalto.com/downloads. It is, afterall where the download link in the header points. main.php doesn't feature, either...

Cheers,
J.

Can you send me the url to your site so I can check it out? Thanks.