-2

ive downloaded a javascript gallery window called facybox: http://bitbonsai.com/facybox/

I've followed the tutorial and now i'm trying to get my photo's to open in this but instead the images are just opening in a new window.

can someone correct me where i'm going wrong please? I suspect i'm missing a vital component somewhere that points it to the facybox directory but i've tried a couple things and no luck.

<?php
$get_photos_set = get_photos();
while ($photos = mysql_fetch_array($get_photos_set)) {
    if(!isset($get_photos_set) || $get_photos_set===false)

    echo "No Results";

    else

    if (logged_in()) {

echo
"<li><a href=\"data/photos/{$photos['user_id']}/{$photos['file_name']}\" rel=\"assets/js/photo_box/facybox.js\"><img src=\"data/photos/{$photos['user_id']}/thumb_{$photos['file_name']}\" alt=\"{$profile[2]}'s Photos\"  /></a></li>";
    }

}

?>
James A Mohler
  • 11,060
  • 15
  • 46
  • 72
Eric Haze
  • 133
  • 4
  • 10

1 Answers1

0

From what I can gather from your example you probably don't even have a valid html page. I would suggest opening the "index.html" file that comes with facybox and examine how it works, what are the requirements for it to work etc. Or try removing stuff on it until you're down to 1 working example.

From their wiki you would need to load jquery as one of the dependencies, this would go to the section of your page.

<!-- This gets the latest jQ 1.x from google, minified and gziped -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript"></script>
<link href="facybox.css" media="screen" rel="stylesheet" type="text/css"/>
<link href="facybox_urls.css" media="screen" rel="stylesheet" type="text/css"/>
<script src="facybox.js" type="text/javascript"></script>

Also to use it, your links should somewhat resemble this

<a href="http://th..yxmouse.jpg" rel="facybox"><img src="pic.jpg" /></a>
Herbert Balagtas
  • 1,929
  • 1
  • 12
  • 6