Well, if you downloaded the developer version of the code, then there is a docs folder with a file called embedding. In this file it points you to check out the file GalleryCapabilities.class. In this file you can see the options that are available for GalleryCapabilities.
Steve Lineberry
Fatima
Joined: 2006-12-05
Posts: 1
Posted: Fri, 2007-10-19 07:13
I am still very new with website develping so I don't know the correct terminilogy, please bear with me.
1) Why are all the image links broken? Is it because I have my g2data above public_html?
2) How do I add css into the gallery? I am still working on my site html and css sheet, what do I need to add to the css sheet to make style the gallery? Does it need tables?
shocksll
Joined: 2005-06-22
Posts: 352
Posted: Tue, 2007-10-23 21:14
I was unable to access your gallery2embedded.php page. Is it still available? What settings did you configure at the top of the gallery2embedded.php file?
I know I should have another .htaccess on my site root but what should I put on it?
shocksll
Joined: 2005-06-22
Posts: 352
Posted: Sat, 2007-10-27 13:45
If you reconfigure your mod_rewrite from within gallery2 while embedded, it will created the .htaccess file for you.
Steve Lineberry
LGSilva
Joined: 2007-10-26
Posts: 5
Posted: Sat, 2007-10-27 16:19
Ooohhh... I got it now. I was using the login from the main gallery, not the embedded one.
Now I'm getting this:
Quote:
An error occured while trying to save your settings
Cannot write to the .htaccess file
I'll check permisions.
Thank you!
LGSilva
Joined: 2007-10-26
Posts: 5
Posted: Sat, 2007-10-27 16:58
Ok, I got almost everything working.
My only problem now is when I click on a thumbnail to see the picture I get to another page and all my menu links stop working.
Is there an easy solution for this or I need to reinstall the G2 on the root instead a folder?
but when I try to embed it the theme goes out of the window!: embeded
I dont have url re-write on, and although the gallery.php file is in a different directory I hope this will be ok as I am including it from my homepage.
Stuart
evilnick
Joined: 2007-12-12
Posts: 1
Posted: Wed, 2007-12-12 04:30
Hi,
I'm also having a similar problem whereby images in my header don't show up.
main gallery2 dir in root: /gallery2
embedded file in root: /gallery.php
Say when accessing from gallery.php. When I click on a album, it brings me to another directory (/gallery.php/v/flowers/) causing my images to be broken links.
Also when I click to view a photo it brings me to: gallery.php/v/flowers/flower.jpg.html
Any idea how to make links of albums and images like gallery?page=flower, so as not to navigate away from the root?
Thanks.
Sincerely,
EvilNick
UPDATE!
I've solved my problem. Thanks peepz.
Littlemumford
Joined: 2007-12-07
Posts: 7
Posted: Wed, 2007-12-12 11:07
Yes i fixed mine, the embed page did not like the ajaxian theme any ideas y??
trinsic
Joined: 2007-12-31
Posts: 2
Posted: Mon, 2007-12-31 16:01
Hi Thank you guys for setting up this embed file
I was wondering if anyone had any ideas as to why gallery2's content is overlapping my div containers when the window is resized smaller than 1024x678?.. I have the css file specified before the php, im not sure why that is happening. Main Test Page Gallery2 Embedded
<?php
$g2_Config['path'] = dirname(__FILE__) . '/';
$g2_Config['g2Uri'] = 'http://www.accesscontrolsonoma.com/gallery2/';
$g2_Config['embedUri'] = 'http://www.accesscontrolsonoma.com/gallery2/gallery2embedded.php';
//print_r($g2_Config);
require_once( $g2_Config['path'] . 'embed.php');
if (!headers_sent()) {
header('Content-Type: text/html; charset=UTF-8');
}
$ret = GalleryEmbed::init(array(
'g2Uri' => $g2_Config['g2Uri'],
'embedUri' => $g2_Config['embedUri'],
'fullInit' => 'false',
'apiVersion' => array(1,0)
));
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)
{
print $ret->getAsHtml();
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<link rel="stylesheet" href="/css/2col_rightNav.css" type="text/css" />
<?php
list($title, $css, $javascript) = GalleryEmbed::parseHead($g2moddata['headHtml']);
echo "<title>" . $title . " -- MySite</title>\n";
foreach ($css as $item) {
echo $item . "\n";
}
foreach ($javascript as $item) {
echo $item . "\n";
}
?>
<style type="text/css"> <!-- /*#gsHeader { display : none; } #gsFooter { display: none; }*/ --> </style>
</head>
<body class="gallery">
<div id="masthead">
<?php include("/nfs/www/WWW_pages/sacs/accesscontrolsonoma.com/incs/html/logo.html"); ?>
</div>
<!-- end masthead -->
<div id="content">
<div id="breadCrumb"></div>
<h2 id="pageName">Page Name</h2>
<div class="feature">
<?php echo $g2moddata['bodyHtml']; ?>
</div>
</div>
<!--end content -->
<div id="navBar">
<?php include("/nfs/www/WWW_pages/sacs/accesscontrolsonoma.com/incs/html/navbar.html"); ?>
</div>
<!--end navBar div -->
<div id="footer">
<?php include("/nfs/www/WWW_pages/sacs/accesscontrolsonoma.com/incs/html/footer.html"); ?>
</div>
<br />
</body>
</html>
I then integrated the gallery into the website which is simply built with a header.php, index.php and footer.php.
I created the gallery2embedded.php, followed all directions and all went fine.
#1) I had to paste the content from my header and footer into it because I could not get my php includes to work.
Any tips on simply including a header and footer into gallery2embedded.php? Maybe my paths weren't correct but I provided the full http://www... path and still no show.
#2) Everything works fine except for the breadcrumb links go to a blank white page. Any ideas?
Thanks!
Sean
anexemines
Joined: 2008-01-14
Posts: 7
Posted: Mon, 2008-01-14 06:36
In addition to what I just posted, I now realize the LOGIN link goes to a blank white page as well. I can't make changes within the Admin now... LOL crap... Help!
beekay
Joined: 2008-09-17
Posts: 3
Posted: Wed, 2008-09-17 15:32
Same here.. cant get the admin page to load embedded... if i load the gallery in a new window writing the url for that index.phpi can login and make changes. BUT... when having gallery2 embedded i cant see anything when logged in as admin.
Also... the theeme doesnt load correct when embedded. I followed the FAQ and did all the steps there.
But there are 2 things i havent found out.
* It says that i am supposed to clear my cookies. I am using IE 7 and im going crazy because i cant find where to delete the cookies.
* Also.. there is another step that i couldnt do... it says that i am supposed to deactivate or reconfigure the url rewrite mod in modules. But when i go to the admin page i find nothing named modules nor this rewrite thingie.
If i find and fix the above, everything might work... so i want to start there, thanx!
//Billy
beekay
Joined: 2008-09-17
Posts: 3
Posted: Wed, 2008-09-17 16:22
Ok.. sorted out the 2 problems i had.
1. Deleting cookies.. i searched on google for cookies delete ie7 and managed to find my way, hehe.
2. The so called module for rewriting urls turns out to be listed under plugins. However it wasnt activated wich means it shouldnt have something to do with this.
Well.. thats the 2 steps i didnt follow when i read about visual intergration. And though it seems i have done everything i still have the blank page when i try to logon to adminpage. Also.. as i said before the theme looks diffrent embedded. But i saw another FAQ about using stylesheets with embedded theemes. So i guess i can sort that one out by reading that. I dont think that CSS thing would give me anything else but a blank page when i try to login thuogh.
So.. any suggestions?
//Billy
beyondreality@y...
Joined: 2008-10-22
Posts: 1
Posted: Wed, 2008-10-22 07:16
OK so I need to be able to get my custom header and sidebar onto my gallery site. I tried to use this but am getting an error. I am getting this error when I try to access the gallery2embedded.php page.
Error:
Parse error: syntax error, unexpected '[' in /home/station/public_html/gallery/gallery2embedded.php on line 2
// 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)
{
print $ret->getAsHtml();
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<?php
list($title, $css, $javascript) = GalleryEmbed::parseHead($g2moddata['headHtml']);
echo "<title>" . $title . " -- MySite</title>\n";
Nevermind It started working I dont know how or why but it just did
sasha2002
Joined: 2009-01-16
Posts: 3
Posted: Sun, 2009-01-18 21:29
Can anyone help me integrate Gallery2 v2.2.x to DragonflyCMS(aka CPG-Nuke) ?
I try to use embedded mode, is working but when i try to integrate on to the module he does not work,i don't know why.
If anybody can help me contact me on the sasha2002.com at gmail.com
Posts: 352
Well, if you downloaded the developer version of the code, then there is a docs folder with a file called embedding. In this file it points you to check out the file GalleryCapabilities.class. In this file you can see the options that are available for GalleryCapabilities.
Steve Lineberry
Posts: 1
I am still very new with website develping so I don't know the correct terminilogy, please bear with me.
Here is the old link to my Gallery:
http://www.inspiration-la.com/gallery2
Here is the new embedded link to my Gallery:
http://www.inspiration-la.com/gallery2/gallery2embedded.php
1) Why are all the image links broken? Is it because I have my g2data above public_html?
2) How do I add css into the gallery? I am still working on my site html and css sheet, what do I need to add to the css sheet to make style the gallery? Does it need tables?
Posts: 352
I was unable to access your gallery2embedded.php page. Is it still available? What settings did you configure at the top of the gallery2embedded.php file?
Steve Lineberry
Posts: 5
Hello!
This is my setup:
G2 installation -> http://www.philadelphiabrazilian.org/fotos/
Embedded -> http://www.philadelphiabrazilian.org/fotos.php
Problems:
1) When I click on a picture I get 404. Probably something with mod_rewrite
2) This is what I'm trying to do: http://www.philadelphiabrazilian.org/fotos.html
I just want a simple look like the html version and use G2 to manage/upload the pictures.
Any ideas?
Thank you
Posts: 352
Did you configure your mod_rewrite from the embedded url?
Steve Lineberry
Posts: 5
This is my .htaccess but I know I'm missing something.
I know I should have another .htaccess on my site root but what should I put on it?
Posts: 352
If you reconfigure your mod_rewrite from within gallery2 while embedded, it will created the .htaccess file for you.
Steve Lineberry
Posts: 5
Ooohhh... I got it now. I was using the login from the main gallery, not the embedded one.
Now I'm getting this:
I'll check permisions.
Thank you!
Posts: 5
Ok, I got almost everything working.
My only problem now is when I click on a thumbnail to see the picture I get to another page and all my menu links stop working.
Is there an easy solution for this or I need to reinstall the G2 on the root instead a folder?
You can check it at www.philadelphiabrazilian.org/fotos.php --> looks ok until you click on a picture.
Posts: 352
I don't know. I'm not sure if you have your mod rewrite setup property.
Steve Lineberry
Posts: 7
Hello,
I am trying to add a gallery to my website,
I have the gallery working ok here:
www.stuart-mumford.me.uk/gallery
but when I try to embed it the theme goes out of the window!:
embeded
I dont have url re-write on, and although the gallery.php file is in a different directory I hope this will be ok as I am including it from my homepage.
Stuart
Posts: 1
Hi,
I'm also having a similar problem whereby images in my header don't show up.
main gallery2 dir in root: /gallery2
embedded file in root: /gallery.php
Say when accessing from gallery.php. When I click on a album, it brings me to another directory (/gallery.php/v/flowers/) causing my images to be broken links.
Also when I click to view a photo it brings me to: gallery.php/v/flowers/flower.jpg.html
Any idea how to make links of albums and images like gallery?page=flower, so as not to navigate away from the root?
Thanks.
Sincerely,
EvilNick
UPDATE!
I've solved my problem. Thanks peepz.
Posts: 7
Yes i fixed mine, the embed page did not like the ajaxian theme any ideas y??
Posts: 2
Hi Thank you guys for setting up this embed file
I was wondering if anyone had any ideas as to why gallery2's content is overlapping my div containers when the window is resized smaller than 1024x678?.. I have the css file specified before the php, im not sure why that is happening.
Main Test Page
Gallery2 Embedded
Posts: 7
I just installed gallery2 last night, up and running successfully!
http://www.nitschkephotography.com
I then integrated the gallery into the website which is simply built with a header.php, index.php and footer.php.
I created the gallery2embedded.php, followed all directions and all went fine.
#1) I had to paste the content from my header and footer into it because I could not get my php includes to work.
Any tips on simply including a header and footer into gallery2embedded.php? Maybe my paths weren't correct but I provided the full http://www... path and still no show.
#2) Everything works fine except for the breadcrumb links go to a blank white page. Any ideas?
Thanks!
Sean
Posts: 7
In addition to what I just posted, I now realize the LOGIN link goes to a blank white page as well. I can't make changes within the Admin now...
LOL crap... Help!
Posts: 3
Same here.. cant get the admin page to load embedded... if i load the gallery in a new window writing the url for that index.phpi can login and make changes. BUT... when having gallery2 embedded i cant see anything when logged in as admin.
Also... the theeme doesnt load correct when embedded. I followed the FAQ and did all the steps there.
But there are 2 things i havent found out.
* It says that i am supposed to clear my cookies. I am using IE 7 and im going crazy because i cant find where to delete the cookies.
* Also.. there is another step that i couldnt do... it says that i am supposed to deactivate or reconfigure the url rewrite mod in modules. But when i go to the admin page i find nothing named modules nor this rewrite thingie.
If i find and fix the above, everything might work... so i want to start there, thanx!
//Billy
Posts: 3
Ok.. sorted out the 2 problems i had.
1. Deleting cookies.. i searched on google for cookies delete ie7 and managed to find my way, hehe.
2. The so called module for rewriting urls turns out to be listed under plugins. However it wasnt activated wich means it shouldnt have something to do with this.
Well.. thats the 2 steps i didnt follow when i read about visual intergration. And though it seems i have done everything i still have the blank page when i try to logon to adminpage. Also.. as i said before the theme looks diffrent embedded. But i saw another FAQ about using stylesheets with embedded theemes. So i guess i can sort that one out by reading that. I dont think that CSS thing would give me anything else but a blank page when i try to login thuogh.
So.. any suggestions?
//Billy
Posts: 1
OK so I need to be able to get my custom header and sidebar onto my gallery site. I tried to use this but am getting an error. I am getting this error when I try to access the gallery2embedded.php page.
Error:
Parse error: syntax error, unexpected '[' in /home/station/public_html/gallery/gallery2embedded.php on line 2
And here is my code:
---------------------------------------------------------------------------------------------------------
<?php
$g2_Config['path'] = dirname(__FILE__) . '/';
$g2_Config['embedPath'] = '/gallery/';
$g2_Config['g2Uri'] = '/gallery/';
$g2_Config['loginredirect'] = '/';
$g2_Config['embedUri'] = '/gallery/gallery2embedded.php';
//print_r($g2_Config);
require_once( $g2_Config['path'] . 'embed.php');
if (!headers_sent()) {
header('Content-Type: text/html; charset=UTF-8');
}
$ret = GalleryEmbed::init(array(
'g2Uri' => $g2_Config['g2Uri'],
'embedUri' => $g2_Config['embedUri'],
'fullInit' => 'false',
'apiVersion' => array(1,0)
));
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)
{
print $ret->getAsHtml();
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<?php
list($title, $css, $javascript) = GalleryEmbed::parseHead($g2moddata['headHtml']);
echo "<title>" . $title . " -- MySite</title>\n";
foreach ($css as $item) {
echo $item . "\n";
}
foreach ($javascript as $item) {
echo $item . "\n";
}
?>
<style type="text/css"> <!-- /*#gsHeader { display : none; } #gsFooter { display: none; }*/ --> </style>
</head>
<body class="gallery">
<?php
echo $g2moddata['bodyHtml'];
?>
</body>
</html>
__________________________________________________________________________________
Nevermind It started working I dont know how or why but it just did
Posts: 3
Can anyone help me integrate Gallery2 v2.2.x to DragonflyCMS(aka CPG-Nuke) ?
I try to use embedded mode, is working but when i try to integrate on to the module he does not work,i don't know why.
If anybody can help me contact me on the sasha2002.com at gmail.com