TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

April 25, 2024, 08:29:48 PM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,173
  • Total Topics: 21,219
  • Online today: 319
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 198
  • Total: 198

Coppermine help needed

Started by bloodynightmare, December 24, 2006, 08:38:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bloodynightmare

Hi, i am using coppermine and would like to have a central block with a casual image slideshow and a right-side block with a casual image from coppermine gallery, which are the codes?
oh.. i also would like to include coppermine in a central block,, or in an article block in order not to go to the gallery page and to remain into the community.

Thanks

Lesmond


bloodynightmare

well, i apreciate your help but i haven't understood very well what written there, that's the problem of not being english..
can someone explain me in a simplier way? i have read 3 codes, but which and where have i to use? I also tried to install Fetch but when i called the file from the browser, happeared to me a line which said that this file's used to install that program but the installation process didn't start. what have i to do?

G6Cad

Only because it's Xmas ;)

Put this code in to an article, change the url all the way down at the bottom of the code to the correct url for your coppermine folder (where you have your coppermine installed.

Then if you want to link to the article, just look at the link page number when you are at the page where you preview it. That will be the link url.

<script type="text/javascript">

/***********************************************
* IFrame SSI script II- Ã,© Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
* Visit DynamicDrive.com for hundreds of original DHTML scripts
* This notice must stay intact for legal use
***********************************************/

//Input the IDs of the IFRAMES you wish to dynamically resize to match its content height:
//Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or ["myframe"] or [] for none:
var iframeids=["myframe"]

//Should script hide iframe from browsers that don't support this script (non IE5+/NS6+ browsers. Recommended):
var iframehide="yes"

var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers

function resizeCaller() {
var dyniframe=new Array()
for (i=0; i<iframeids.length; i++){
if (document.getElementById)
resizeIframe(iframeids)
//reveal iframe for lower end browsers? (see var above):
if ((document.all || document.getElementById) && iframehide=="no"){
var tempobj=document.all? document.all[iframeids] : document.getElementById(iframeids)
tempobj.style.display="block"
}
}
}

function resizeIframe(frameid){
var currentfr=document.getElementById(frameid)
if (currentfr && !window.opera){
currentfr.style.display="block"
if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight;
else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax
currentfr.height = currentfr.Document.body.scrollHeight;
if (currentfr.addEventListener)
currentfr.addEventListener("load", readjustIframe, false)
else if (currentfr.attachEvent){
currentfr.detachEvent("onload", readjustIframe) // Bug fix line
currentfr.attachEvent("onload", readjustIframe)
}
}
}

function readjustIframe(loadevt) {
var crossevt=(window.event)? event : loadevt
var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
if (iframeroot)
resizeIframe(iframeroot.id);
}

function loadintoIframe(iframeid, url){
if (document.getElementById)
document.getElementById(iframeid).src=url
}

if (window.addEventListener)
window.addEventListener("load", resizeCaller, false)
else if (window.attachEvent)
window.attachEvent("onload", resizeCaller)
else
window.onload=resizeCaller

</script>

<iframe id="myframe" src="http://www.yoursitehere.com/coppermine/" marginwidth="0" marginheight="0" vspace="0" hspace="0" style="width: 100%; display: none;" frameborder="0" scrolling="no"></iframe>

bloodynightmare

oh my.. thank you! It works perfectly!
ehm..
just cuz it's xmas...
which are the codes to have a slideshow of latest images and a casual image box? :D

Lesmond

This is the code I use in a center block with cpmfetch it will give you random pictures
and this you will need to change to  the path of the cpmfetch directory  ../cpmfetch/cpmfetch.php
echo '<br>';

echo '<br>';
echo '<br>';
global $context, $settings, $options, $scripturl, $txt, $modSettings;
print "<CENTER>";
include "../cpmfetch/cpmfetch.php";
$objCpm = new cpm("/cpg");
$objCpm->cpm_viewRandomMedia(1,4);
$objCpm->cpm_close();
print "</center>";


echo '<br>';

bloodynightmare

Quote from: Lesmond on December 25, 2006, 06:07:47 PM
This is the code I use in a center block with cpmfetch it will give you random pictures
Ok.. i think it's this:
echo '<br>';

echo '<br>';
echo '<br>';
global $context, $settings, $options, $scripturl, $txt, $modSettings;
print "<CENTER>";
include "../cpmfetch/cpmfetch.php";
$objCpm = new cpm("/cpg");
$objCpm->cpm_viewRandomMedia(1,4);
$objCpm->cpm_close();
print "</center>";


echo '<br>';


Quote from: Lesmond on December 25, 2006, 06:07:47 PM
and this you will need to change to  the path of the cpmfetch directory  ../cpmfetch/cpmfetch.php
?? what do you mean?
Oh.. i still have some problems in installing cpmfetch.. the install.php file, when i launch it after having uploaded the entire directory, make happear on the browser window this:
/**
*  RELEASE VERSION: 1.6.4
*
* This is the installation program for CpmFetch. 
*
* Usage:  Call this file from a web browser and follow the instructions
*
*/

and nothing happens...
:|..
well, or it's me that's particularly stupid or it's the program that doesn't work.. which one?