Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: CPMFetch Javascript Help  (Read 4563 times)

0 Members and 1 Guest are viewing this topic.

ScathDeSolas

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
CPMFetch Javascript Help
« on: May 10, 2009, 09:27:39 am »

Okay tell me if this is right or wrong.

I have a website and I have it set to thestreetgods.com/gallery < my gallery link

Now I have it set up like this

thestreetgods.com/gallery/cpmfetch/plugins/cpmfetchjs/ < the cpmfetch directories.

Here is my code:


Code: [Select]
Images<br />


<script type="text/javascript">
var cpr_albumid=''; //album id if not used set ''
var cpr_catid='1';   //Category id if not used set ''
var resulttype = 'lastmedia'; //Result type from below array.
/*Result types:

'toprated', //Fetches top rated
'mostviewedrated', //Fetches most viewed rated
'lastmedia', //Fetched last media
'lastmediafromalbum', //Fetched last uploads from suplied album ID
'lastmediafromcat', //Fetched last uploads from suplied category ID
'randomfromalbum', //Fetched random files suplied album ID
'randomfromcategory', //Fetched random files from suplied category ID
'lasthits' //If suplied cpr_albumid fetched last hits form album if category then last hits from category.
*/

var rows=8; //Number of rows
var col=1; //Number of columns
var jscriptFetchFile='http://thestreetgods.com/gallery/cpmfetch/plugins/cpmfetchjs/jsfetch.php';
/*
StylesGenerated with table
'tablestyle' => 'cpr_tablestyle',
'tableheadstyle'=> 'cpr_tableheadstyle',
'rowstyle' => 'cpr_rowstyle',
'cellstyle' => 'cpr_cellstyle',
'imagestyle' => 'cpr_imagestyle',
'linkstyle' => 'cpr_linkstyle'
*/
</script>

<script type="text/javascript">
document.write("<script type=\"text/javascript\" src=\""+jscriptFetchFile+"?albumid="+cpr_albumid+"&catid="+cpr_catid+"&resulttype="+resulttype+"&rows="+rows+"&col="+col+"\"><\/script>");
</script>


Nothing shows up. No images, no nothing.

http://thestreetgods.com/gallery/cpmfetch/plugins/cpmfetchjs/javascripttest.html << URL

How in the hell do I get this to work?
Logged

ScathDeSolas

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: CPMFetch Javascript Help
« Reply #1 on: May 10, 2009, 09:50:47 am »

Sorry for double post.

Here's my directory listing info:

/gallery/cpmfetch/plugins/cpmfetchjs Has 5 files:

extendclass (Folder containing cpmfetch_extend.php)
cpmfetch.php
cpmfetch_config.php
javascripttest.html
jsfetch.php

/gallery/cpmfetch Has 16 files (becuase I didn't know if they were needed)

         benchmarking.php    
    cfig_random.php    
    cfimageget.php
    cfrssget.php    
    cfshow.php    
    cpmfetch.js    
    cpmfetch.php    
    cpmfetch_config.php
    cpmfetch_dao.php    
    fetch.php    
    install.php    
    problem.gif    
    rss_lastadded.php    
    screen.php    
    slideshow.php    


Hope this helps to debug!
Logged

fangweile

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 103
  • Saranghaeyo ^_^
    • All Koreans - Home of Korean Actors and Actresses
Re: CPMFetch Javascript Help
« Reply #2 on: May 10, 2009, 10:50:26 am »

The code you provided is not the right one.
CPMFetch codes are written in php

here is the code to display last added media
Code: [Select]
<?php
  
include "./cpmfetch.php";
  
$objCpm = new cpm("./cpmfetch_config.php");
  
$objCpm->cpm_viewLastAddedMedia(1,4);
  
$objCpm->cpm_close();
?>


Read this thread for further instructions
http://forum.coppermine-gallery.net/index.php/topic,35450.0.html
Logged
[My Coppermine Galleries]
All Koreans, Lim Eun-kyeong's IFC
Saranghae 김태희

ScathDeSolas

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: CPMFetch Javascript Help
« Reply #3 on: May 10, 2009, 07:11:29 pm »

The code I provided was the HTML for my website for the javascripttest.html file.

If you don't see I'm trying to use the javascript cpmfetch
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 19 queries.