4Prometheus
11-14-2006, 10:00 PM
OK..
After a lot of finding no answers I have pieced together how to integrate vb and coppermine..
You must first download and install CoppermineFetch (found here http://www.fistfullofcode.com/)
Then upload the attached random.php to your forum root.
(Note: inside the random.php you will have to change the relative path if your site is not setup as follows:
domain_name/forum
domain_name/gallery
domain_name/cpmfetch
This random.php is set to display the last 8 pictures in one column. Other functions can be found here: http://www.fistfullofcode.com/php-lib/showexternal.php?url=http://www.fistfullofcode.com/projects/copperminefetch/manual/index.html )
In your forumhome template add this code below the <head>
<script language="Javascript">
<!--
var x1;
x1 = createRequestObject();
function createRequestObject() {
var x = false;
try {
x = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
x = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
x = false;
}
}
if (!x && typeof XMLHttpRequest != "undefined") {
x = new XMLHttpRequest();
}
return x;
}
function getPhotos() {
x1.open('get','random.php'); //Replace random.php with whatever php script you are using to fetch photos
x1.onreadystatechange = function() {
if (x1.readyState == 4) {
document.getElementById("photos").innerHTML = x1.responseText;
}
}
x1.send(null);
}
onload = getPhotos();
//-->
</script>
Then add this code to your forumhome template wherever you want the pics to appear.
<!-- / COPPERMINE GALLERY -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class='tcat' colspan='0' align=left>
<span class='smallfont'>
<strong>» <a href="http://yourdomain.com/gallery">Photo Gallery</a>
</strong></span></td>
</tr>
<tr>
<td class='alt1' width='100%' align-middle valign=middle>
<div id="photos" align="center">
</td></tr></table>
<!-- / COPPERMINE GALLERY -->
<br><br>
Done!
These are basically the same instructions as given here
http://coppermine-gallery.net/forum/index.php?topic=23537.msg108236#msg108236 on Coppermines site.
Peace.
After a lot of finding no answers I have pieced together how to integrate vb and coppermine..
You must first download and install CoppermineFetch (found here http://www.fistfullofcode.com/)
Then upload the attached random.php to your forum root.
(Note: inside the random.php you will have to change the relative path if your site is not setup as follows:
domain_name/forum
domain_name/gallery
domain_name/cpmfetch
This random.php is set to display the last 8 pictures in one column. Other functions can be found here: http://www.fistfullofcode.com/php-lib/showexternal.php?url=http://www.fistfullofcode.com/projects/copperminefetch/manual/index.html )
In your forumhome template add this code below the <head>
<script language="Javascript">
<!--
var x1;
x1 = createRequestObject();
function createRequestObject() {
var x = false;
try {
x = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
x = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
x = false;
}
}
if (!x && typeof XMLHttpRequest != "undefined") {
x = new XMLHttpRequest();
}
return x;
}
function getPhotos() {
x1.open('get','random.php'); //Replace random.php with whatever php script you are using to fetch photos
x1.onreadystatechange = function() {
if (x1.readyState == 4) {
document.getElementById("photos").innerHTML = x1.responseText;
}
}
x1.send(null);
}
onload = getPhotos();
//-->
</script>
Then add this code to your forumhome template wherever you want the pics to appear.
<!-- / COPPERMINE GALLERY -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class='tcat' colspan='0' align=left>
<span class='smallfont'>
<strong>» <a href="http://yourdomain.com/gallery">Photo Gallery</a>
</strong></span></td>
</tr>
<tr>
<td class='alt1' width='100%' align-middle valign=middle>
<div id="photos" align="center">
</td></tr></table>
<!-- / COPPERMINE GALLERY -->
<br><br>
Done!
These are basically the same instructions as given here
http://coppermine-gallery.net/forum/index.php?topic=23537.msg108236#msg108236 on Coppermines site.
Peace.