Putting Gallery in your webpage.

digitalteck

Joined: 2008-04-24
Posts: 23
Posted: Mon, 2010-05-03 00:45

I read through the documentaion on putting the Gallery 2 in your webpage.

http://codex.gallery2.org/Gallery2:How_to_visually_embed_G2_in_your_own_website_using_embedded_mode

I'm still lost.

Basically I created my webpage with pictures, nav bar etc, now I have a spot in my webpage on a div or table cell I want the gallery to appear that way when the gallery expands to see the albums depending on how many rowns you have, The table cell expands also.

I can have the gallery show up using an Iframe but I would have to know what the exact height would be and set the I frame to it. Sometime this does not work.

Thanks

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2010-05-03 00:58
 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2010-05-03 00:59

perhps this will be simpler:
http://www.flashyourweb.com/staticpages/index.php?page=gallery2_embed-o-rator

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
digitalteck

Joined: 2008-04-24
Posts: 23
Posted: Mon, 2010-05-03 16:45

Ok I spent at least 7 hours now trying to figure out why I am getting this error

Warning: require_once(../gallery2/) [function.require-once]: failed to open stream: Inappropriate ioctl for device in /hermes/web06/b2688/as.decssvcs/public_html/SVPA-GHOST-WATCH/multimedia/gallery2/gallery2embedded.php on line 2

Fatal error: require_once() [function.require]: Failed opening required '../gallery2/' (include_path='.:/usr/local/lib/php-5.2.12/lib/php') in /hermes/web06/b2688/as.decssvcs/public_html/SVPA-GHOST-WATCH/multimedia/gallery2/gallery2embedded.php on line 2

Tried every path combination along with my hosting support on the phone. No Luck Here is my Embeded code

<?php
require_once ('/public_html/SVPA-GHOST-WATCH/multimedia/gallery2/embed.php');
$ret = GalleryEmbed::init( array ('g2Uri'=>'http://www.svpa-ghost-watch.org/multimedia/gallery2/main.php', 'embedUri'=>'http://www.svpa-ghost-watch.org/multimedia/gallery2/gallery2embedded.php', 'fullInit'=>'false'));
if ($ret) {
print 'G2 init error: '.$ret->getAsHtml();
}
$g2data = GalleryEmbed::handleRequest();
if ($g2data['isDone']) {
exit;
}
GalleryEmbed::done();
?>
<!-- Your Html Head -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>SVPA Ghost Watch Gallery</title>
<link href="http://www.svpa-ghost-watch.org/multimedia/gallery14/themes/ghost/style.css" rel="stylesheet" type="text/css" />
<!-- Gallery's Head -->
<?php
echo $g2data['headHtml'];
?>
<!-- End Gallery's Head -->
</head>
<!-- End Your Html Head -->
<!-- Your Html Body -->
<body>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="{LANG_DIR}">
<head>
<link rel="stylesheet" href="http://www.svpa-ghost-watch.org/multimedia/gallery14/themes/ghost/style.css"/>
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<meta http-equiv="Pragma" content="no-cache" />
<title>SVPA Ghost Watch</title>
</head>
<body style="background-image: url('http://www.svpa-ghost-watch.org/images/gallery/bg.gif')">
<p>&nbsp;</p>
<table class="bodyline" width="700" align="center" cellspacing="0" cellpadding="0" border="0">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<img src="http://www.svpa-ghost-watch.org/images/web/tnav_tl.gif" alt="" /></td>
<td background="http://www.svpa-ghost-watch.org/images/web/tnav_t.gif">&nbsp;</td>
<td>
<img src="http://www.svpa-ghost-watch.org/images/web/tnav_tr.gif" alt="" /></td>
</tr>
<tr>
<td background="http://www.svpa-ghost-watch.org/images/web/tnav_l.gif">&nbsp;</td>
<td><table width="100%" border="0" cellspacing="0" cellpadding="10">
<tr>
<td bgcolor="#2F2F2F">
<table border="0" width="877" id="table139" style="border-collapse: collapse">
<tr>
<td align="center">

<table border="3" width="842" id="table140" bordercolorlight="#008080" bordercolor="#008080">
<tr>
<td align="center" valign="top" background="http://www.svpa-ghost-watch.org/images/shoutbar2.JPG">
<font face="Algerian" size="6" color="#FFFF00">Susquehanna
Valley Pennsylvania Ghost Watch</font></td>
</tr>
<tr>
<td align="center" valign="top" bgcolor="#000000">
<table border="0" width="100%" style="border-collapse: collapse" id="table449" height="59">
<tr>
<td background="http://www.svpa-ghost-watch.org/images/gallery/nav.gif" height="25">
<p align="center">&nbsp;</td>
</tr>
<tr>
<td height="75" bgcolor="#2F2F2F">
<table border="0" width="99%" style="border-collapse: collapse" id="table506" height="631">
<tr>
<td height="10" width="100%" colspan="3" align="center">
</td>
</tr>
<tr>
<td height="49" width="100%" colspan="3" align="center">
<table border="0" width="759" style="border-collapse: collapse" id="table515" height="100">
<tr>
<td height="103%" background="http://www.svpa-ghost-watch.org/images/web/navblock.jpg" align="center" width="99%">
<table border="0" width="94%" style="border-collapse: collapse" id="table516">
<tr>
<td align="center">
<a href="http://www.svpa-ghost-watch.org/index.htm">
<font face="Britannic Bold" color="#00FF00" size="3">
Main Webpage</font></a><font face="Britannic Bold" color="#00FF00" size="3">&nbsp;</font></td>
</tr>
<tr>
<td align="center"><font size="1">
<hr />
</font>
</td>
</tr>
<tr>
<td align="center">
&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="15" width="100%" colspan="3">
<p align="center"></td>
</tr>
<tr>
<td height="15" width="1%">
</td>
<td height="15" width="23%">
<p align="center"></td>
<td height="15" width="75%" align="center">
</td>
</tr>
<tr>
<td height="19" width="1%">
&nbsp;</td>
<td height="19" width="23%" align="center" valign="top">
&nbsp;</td>
<td height="454" width="75%" rowspan="3">
<table border="0" width="64%" style="border-collapse: collapse" id="table522" height="446">
<tr>
<td height="27" width="1%">
&nbsp;</td>
<td height="27" width="64%" bgcolor="#000000">
<img border="0" src="http://www.svpa-ghost-watch.org/images/web/topblock.jpg" width="628" height="25"></td>
<td height="27" width="1%">
&nbsp;</td>
</tr>
<tr>
<td height="392" width="1%">
</td>
<td height="392" width="64%" bgcolor="#000000">
<!-- End Your Html Body -->
<!-- Gallery's Body -->
<?php
echo $g2data['bodyHtml'];
?>
<!-- End Gallery's Body -->
<!-- Your Html Footer -->
</td>
<td height="392" width="1%">
&nbsp;</td>
</tr>
<tr>
<td height="27" width="1%">
&nbsp;</td>
<td height="27" width="64%" bgcolor="#000000">
<img border="0" src="http://www.svpa-ghost-watch.org/images/web/bottmblock.jpg" width="628" height="25"></td>
<td height="27" width="1%">
&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="408" width="1%">
</td>
<td height="408" width="23%" align="center" valign="top">
<table border="0" width="100%" style="border-collapse: collapse" id="table518" height="370">
<tr>
<td align="center">&nbsp;</td>
</tr>
<tr>
<td align="center">&nbsp;</td>
</tr>
<tr>
<td align="center">&nbsp;</td>
</tr>
<tr>
<td align="center" background="http://www.svpa-ghost-watch.org/images/web/imgblock.jpg" height="294">
<table border="0" width="15%" style="border-collapse: collapse" id="table519" height="247">
<tr>
<td align="center">
<p align="center"><b>
<font size="2.5" color="#FFFF00" face="Verdana">
Multimedia Gallery</font></b></td>
</tr>
<tr>
<td align="center"><font size="1">
<hr />
</font>
</td>
</tr>
<tr>
<td align="center" height="50">
<img border="0" src="http://www.svpa-ghost-watch.org/images/gallery/multimedia1.jpg" width="151" height="152"></td>
</tr>
<tr>
<td align="center"><font size="1">
<hr />
</font> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center" height="19">&nbsp;</td>
</tr>
</table>
<p>&nbsp;</td>
</tr>
<tr>
<td height="27" width="1%">
&nbsp;</td>
<td height="27" width="23%" align="center" valign="top">
&nbsp;</td>
</tr>
<tr>
<td height="19" width="1%">
</td>
<td height="19" width="23%"></td>
<td height="19" width="75%">
<p align="center">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td background="http://www.svpa-ghost-watch.org/images/gallery/nav2.gif" height="25">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center" valign="top" height="20" bgcolor="#000000">

<table border="0" width="785" id="table297" style="border-collapse: collapse">
<tr>
<td align="center" valign="top">
<table border="0" width="69%" style="border-collapse: collapse" id="table298" height="30">
<tr>
<td align="center" width="39">
<img border="0" src="http://www.svpa-ghost-watch.org/images/ghost-s1.gif" width="35" height="56"></td>
<td align="center" width="34">
<img border="0" src="http://www.svpa-ghost-watch.org/images/ghost-v1.gif" width="42" height="59"></td>
<td align="center" width="39">
<img border="0" src="http://www.svpa-ghost-watch.org/images/ghost-p1.gif" width="43" height="60"></td>
<td align="center" width="32">
<img border="0" src="http://www.svpa-ghost-watch.org/images/ghost-a1.gif" width="40" height="58"></td>
<td align="center" width="34">
<img border="0" src="http://www.svpa-ghost-watch.org/images/ghost-hyph.gif" width="42" height="53"></td>
<td align="center" width="38">
<img border="0" src="http://www.svpa-ghost-watch.org/images/ghost-g1.gif" width="41" height="61"></td>
<td align="center" width="37">
<img border="0" src="http://www.svpa-ghost-watch.org/images/ghost-h1.gif" width="48" height="63"></td>
<td align="center" width="30">
<img border="0" src="http://www.svpa-ghost-watch.org/images/ghost-o1.gif" width="42" height="59"></td>
<td align="center" width="30">
<img border="0" src="http://www.svpa-ghost-watch.org/images/ghost-s1.gif" width="37" height="63"></td>
<td align="center" width="49">
<img border="0" src="http://www.svpa-ghost-watch.org/images/ghost-t1.gif" width="41" height="64"></td>
<td align="center" width="32">
<img border="0" src="http://www.svpa-ghost-watch.org/images/ghost-hyph.gif" width="40" height="58"></td>
<td align="center" width="46">
<img border="0" src="http://www.svpa-ghost-watch.org/images/ghost-w1.gif" width="46" height="65"></td>
<td align="center" width="34">
<img border="0" src="http://www.svpa-ghost-watch.org/images/ghost-a1.gif" width="43" height="64"></td>
<td align="center" width="30" height="30">
<img border="0" src="http://www.svpa-ghost-watch.org/images/ghost-t1.gif" width="40" height="66"></td>
<td align="center" width="84">
<img border="0" src="http://www.svpa-ghost-watch.org/images/ghost-c1.gif" width="42" height="69"></td>
<td align="center">
<img border="0" src="http://www.svpa-ghost-watch.org/images/ghost-h1.gif" width="49" height="69"></td>
</tr>
</table>
</td>
</tr>
</table>

</td>
</tr>
<tr>
<td align="center" valign="top" height="20" background="http://www.svpa-ghost-watch.org/images/shoutbar2.JPG">

<table border="0" width="863" id="table299" style="border-collapse: collapse" height="39">
<tr>
<td align="center" height="39">
<b
<span style="font-family: Harlow Solid Italic; color: #FFFFFF">
<font size="3">Copyright&nbsp; 2000 - 2009 !
<a href="http://www.digital-innovations-computing.com">
<font color="#FFFFFF">Digital Innovations Computing </font></a>&nbsp;All
Rights Reserved.</span></font></b></td>
</tr>
</table>

</td>
</tr>
</table>

</td>
</tr>
</table>
</td>
</tr>
</table></td>
<td background="http://www.svpa-ghost-watch.org/images/web/tnav_r.gif">&nbsp;</td>
</tr>
<tr>
<td>
<img src="http://www.svpa-ghost-watch.org/images/web/tnav_bl.gif" alt="" /></td>
<td background="http://www.svpa-ghost-watch.org/images/web/tnav_b.gif">&nbsp;</td>
<td background="http://www.svpa-ghost-watch.org/images/web/tnav_br.gif">
<img src="http://www.svpa-ghost-watch.org/images/web/tnav_br.gif" alt="" /></td>
</tr>
</table></td>
</tr>
</table>

<p align="center"><b><font color="#00FFFF" size="1">
Webpage updated 12-1-09</font></b></p>

</body>
</html>
</body>
</html>
<!-- End Your Html Footer -->

I even looked at this post http://gallery.menalto.com/node/36918

Any other suggestions

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2010-05-03 17:24

Ask your host what this path should be:
require_once ('/public_html/SVPA-GHOST-WATCH/multimedia/gallery2/embed.php');

I have very serious doubts that if you are on a shared server, that /public_html is at the root of the server.

Most likely the full, real path is something like:

/var/www/users/YOUR_USER_NAME/rest/of/path/to/your/site/here/

or
/usr/www/YOUR_USER_NAME/rest/of/path/to/your/site/here/

Actually, looking at the error message, I'm betting the path should be something more like:
/hermes/web06/b2688/as.decssvcs/public_html/SVPA-GHOST-WATCH/multimedia/gallery2/embed.php
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2010-05-03 18:30

even simpler.
if gallery2embedded.php is in the same directory, no path was necessary.
require_once ('embed.php'); is fine

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
digitalteck

Joined: 2008-04-24
Posts: 23
Posted: Mon, 2010-05-03 22:06

I got it to work, with nivekiam or suprsidr Method

I decided to use

/hermes/web06/b2688/as.decssvcs/public_html/SVPA-GHOST-WATCH/multimedia/gallery2/embed.php

I also named my embedded to gallery.php so it looks good on the address bar

http://www.svpa-ghost-watch.org/multimedia/gallery2/gallery.php

Now I just need to get the gallery sized up to fit in the space correctly without hanging off to the right and finish along with a few touch up's on the html portion.

Thanks for the help.