Visual integration and embedding into my web page design

swiftmed

Joined: 2006-04-01
Posts: 3
Posted: Sat, 2006-04-01 21:43

Hello,

it seems a lot of people have followed the instructions and their embedded gallery has worked perfectly, but not for me unfortunately. I have chosen to embed gallery2 into my girlfriends website but i keep getting errors. i was hoping someone would be able to tell me where im going wrong please?

the embedded page is www.pinksexysam.co.uk/index.php - , the standalone gallery is at www.pinksexysam.co.uk/gallery/ .

i have attached my code to this post incase someone is able to tell me where im going wrong.

I look forward to hearing from you, and thank you for your time. i really appreciate your advice. thank you.

Andy MacDonald
www.swiftmediauk.co.uk

MY CODE IS AS FOLLOWS:

<?php
$g2_Config['path'] = dirname(__FILE__) . '/';

$g2_Config['embedPath'] = '/';
$g2_Config['g2Uri'] = '/gallery/';
$g2_Config['loginredirect'] = '/';
$g2_Config['embedUri'] = 'index.php';

//print_r($g2_Config);
require_once( $g2_Config['path'] . 'index.php');
$ret = GalleryEmbed::init(array(
'g2Uri' => $g2_Config['g2Uri'],
'loginRedirect' => $g2_Config['loginredirect'],
'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 HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Sams Personal Website</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<meta name="description" content="The personal website of samantha jane mclean, includes downloads, picture gallery, chat room, and much more" />
<meta name="Keywords" content="samantha, mclean, pictures, gallery, personal website, downloads, music, my pictures, chat room" />
<meta name="MSSmartTagsPreventParsing" content="false" />
<meta http-equiv="ImageToolBar" content="yes" />
<meta name="author" content="Swift Media UK Ltd" />
<meta name="copyright" content="Copyright 2006 Swift Media UK Ltd. All rights reserved." />
<meta name="reply-to" content="mail@swiftmediauk.co.uk" />
<meta name="language" content="en-us" />
<meta name="classification" content="Business and Economy" />
<meta name="distribution" content="Global" />
<script type="text/JavaScript">
<style type="text/css">
<!--
@import url("css.css");
.style1 {color: #2E2E2E}
-->
</style>
<script type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<link href="css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.left { background : #cccccc;
padding: 3px;
}
.top { background : #eeeeee;
padding: 3px;
}
-->
</style>
</HEAD>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 onLoad="MM_preloadImages('images/home-page.jpg','images/about-me.jpg','images/photo-gallery.jpg','images/guestbook.jpg','images/chat-room.jpg','images/contact-me.jpg','images/about-roll.jpg','images/about-me-roll.jpg','images/photo-gallery-roll.jpg','images/guestbook-rollo.jpg','images/chat-room-roll.jpg','images/contact-me-roll.jpg','images/home-page-roll.jpg')">
<table width="780" border="0" align="center" cellpadding="1" cellspacing="0">
<tr>
<td bgcolor="#000000"><table width="780" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<th rowspan="2" valign="top" scope="col"><a href="index.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('home','','images/home-roll.jpg',1)"></a>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th scope="col"><img src="images/index_01.jpg" width="175" height="174"></th>
</tr>
<tr>
<th scope="col"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image16','','images/home-page-roll.jpg',1)"><img src="images/home-page.jpg" name="Image16" width="175" height="19" border="0"></a><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('index','','images/home-page.jpg',1)"></a><a href="index.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Home','','images/home-page.jpg',1)"></a></th>
</tr>
<tr>
<td><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image11','','images/about-me-roll.jpg',1)"><img src="images/about-me.jpg" name="Image11" width="175" height="20" border="0"></a><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('about','','images/about-roll.jpg',1)"></a><a href="about-me.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('About','','images/about-me.jpg',1)"></a></td>
</tr>
<tr>
<td><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image12','','images/photo-gallery-roll.jpg',1)"><img src="images/photo-gallery.jpg" name="Image12" width="175" height="20" border="0"></a><a href="photo-gallery.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('photo','','images/photo-gallery.jpg',1)"></a></td>
</tr>
<tr>
<td><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image13','','images/guestbook-rollo.jpg',1)"><img src="images/guestbook.jpg" name="Image13" width="175" height="20" border="0"></a><a href="guestbook.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('guestbook','','images/guestbook.jpg',1)"></a></td>
</tr>
<tr>
<td><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image14','','images/chat-room-roll.jpg',1)"><img src="images/chat-room.jpg" name="Image14" width="175" height="20" border="0"></a><a href="chat-room.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('chat','','images/chat-room.jpg',1)"></a></td>
</tr>
<tr>
<td><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image15','','images/contact-me-roll.jpg',1)"><img src="images/contact-me.jpg" name="Image15" width="175" height="20" border="0"></a><a href="contact-me.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('contact','','images/contact-me.jpg',1)"></a><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('contact','','images/chat-room.jpg',1)"></a></td>
</tr>
<tr>
<td><p><img src="images/index_11.jpg" width=175 height=38 alt=""></p>
</td>
</tr>
</table></th>
<th valign="top" scope="col"><img src="images/index_02.jpg" alt="" width=605 height=122 border="0"><br>
<img src="images/index_03.jpg" alt="" width=605 height=52 border="0"></th>
</tr>
<tr>
<td valign="top" bgcolor="#FFFFFF"><?php echo $g2moddata['bodyHtml'];?>
</td>
</tr>
<tr>
<td colspan="2"><img src="images/bot-copyright.jpg" width="780" height="17"></td>
</tr>
</table></td>
</tr>
</table>
<div align="center"><span class="link-sub"><a href="http://www.swiftmediauk.co.uk/website-design.php">Website Design</a> &amp; <a href="http://www.swiftmediauk.co.uk/website-hosting.php">Web Hosting</a> from <a href="http://www.swiftmediauk.co.uk">Swift Media UK</a> </span></div>
</BODY>
</HTML>