You are not logged in.
| Current Gallery version: v 3.1.1 | Download Version History |
When you want to use the gallery as an "include" in your own site... you first must set the option in the gallery setup...
The zip file you downloaded contains a file called "gallery_include_example.php"
This will demonstrate how the gallery will appear whn using as include.
In order to use the gallery as an include:
You will need to rename the index.php to something else, so you dont copy over your existing one...
Then copy the gallery structure to your root dir of your website.
You will then need to include the code between the HEAD tags below to your own header
include the gallery.css and either vertical or horizontal menu css - if you want to use a menu
You should remove the BODY tag selector from the gallery.css, as this might override your own settings depending on the order you import css.
The javascript code is necessary only if you are using a css menu.
It is a workaround for Internet Explorer, so that it fools it into behaving
as it should when using the css :hover pseudo class
SINCE VERSION 1.1 you must now declare $includemode = 1; before including
<html>
<head>
<link href="gallery/css/jv2_light.css" rel="stylesheet" type="text/css">
<!--[if IE]>
<style type="text/css" media="screen">
/* csshover.htc file V1.21.041022 available for download from: http://www.xs4all.nl/~peterned/csshover.html */
body{behavior:url(gallery/css/csshover.htc);}
#menu ul li{float:left;height:1%;}
#menu ul li a{height:1%;}
</style>
<![endif]-->
</head>
<body>
<?php
// example usage of including gallery in your own code
$includemode = 1;
include("gallery/index.php");
?>
</body>
</html>Since Version 2.0
there have been some improvements regarding the include mode... or at least the way you can define how to include it.
The gallery code no longer uses "echo" on each line... but instead adds all the html code to a variable called $gallery_code.
This is then echoed at the end of the index.php.
Any way... you can include the gallery code at any point (preferably in the beginning before header) and then comment out the echo line in the gallery file. and echo out that vraiable your self at the point where you want the gallery to appear.
Like wise for the menu... if you want to change the location of the menu... (like I have done in the include mode demo on these pages) then comment out the line where the menu is added to the $gallery_code in the index.php... and instead call that menu function (and echo it) where you want it to appear...
YOU MUST ALSO DEFINE THE CORRECT CSS FILE NAME WHICH HAS CHANGED SINCE VERSION 1.1 - have a look at the css folder and copy the name of the file you want to use to your code.
Last edited by jv2 (2006-07-08 13:38:39)
Offline