Simple Javascript plugin for cpmFetch - Page 2 Simple Javascript plugin for cpmFetch - Page 2
 

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]

Main Menu

Simple Javascript plugin for cpmFetch

Started by remdex, March 21, 2007, 07:28:24 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

tibski

Quote from: remdex on June 25, 2007, 06:16:39 PM
Generaly, you should not access with your browser to jsfetch.php file directly. Picture is generated with javascript, not php itself.
In your case picture generating javascript could look like :

<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 = 'lasthits'; //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://lasalleiligan.org/lsa/lsagallery/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>


Just tried with you gallery. Html source is the same like above code.
http://animeonly.org/help.html


thanks remdex. I finally got it to work.

Just one question more...i placed the code in a <frame>, Is is possible that when you click on the picture being displayed it opens on the "parent" page not in the "frame" itself?

thanks

erratikmind

QuoteJust one question more...i placed the code in a <frame>, Is is possible that when you click on the picture being displayed it opens on the "parent" page not in the "frame" itself?

i want to know also...anyone know?

MastiMasti

1st Thanks to Remdex
this mod is perfect
and work fine

I install it last night and work fine

I tried RANDOM, lasthits, lastadded
everything work fine and even I add TWICE code on same page it still work fine


now I like to ask something REMDEX

Is there anyway pictures/wallpapers can be open in new page?
when someone click on it and it's open in new page?



if yes please provide some info about it

2nd if not
are you looking forwed to work on that?


because if we have newpage (open in newpage) than many users can provide code
to other who can use their websites ;)



thanks again
waiting for your reply

Sunny

remdex

I will see, what i can do, about new page.

remdex

New version with requested feature can be downloaded from:

http://animeonly.org/cpmfetch/plugins/cpmfetchjs.zip

Was done a little modification to jsfetch.php file and javascripttest.html
Adden one more variable to javascripttest.html file. So just see source.
Everything else is the same. Just download and enjoy.
Live demonstration:
http://animeonly.org/cpmfetch/plugins/cpmfetchjs/javascripttest.html

MastiMasti

 :o to quick


thansk RemDex

You ROCKS !

"1 Means open in new window 0 open in current window"

work PERFECT  :)


thanks again

cgc0202

I was following this thread a bit, but I have not responded to it yet because I wanted to create a mock up page for Joomla and modules that were made for Joomla.

Anyway, what I can do right now is add images into a Joomla page, using PHP codes through the CPMFetch, directly into the index.php -- without having the CPMFetch integrated as a module in Joomla (see note below).  What I did is illustrated in this site

There is only one catch, since the CPMFetch PHP scripts weres added to the [ur=http://treasuresoftheinternet.org/layout/joomla-likas-site-template.shtml]index.php[/url], the dynamic images would be present in all pages (please see note below).  This global (all pages) integration is not always desirable.

What is more desirable is whether it is possible to integrate the dynamic images, using CPMFetch into specific pages, or specific articles -- as shown in this mock up layout -- using the javascript developed and presented in this forum thread by remdex.

Notes:
The this mock up layout is just a simple html script, not the working iJoomla Magazine.

I will provide Vuud and remdex (via private email) links and access to the actual Joomla and iJoomla Magazine, in case either (or both) would consider looking at this issue.  [It might be posted as a "job request" to either Vuud and remdex only (and reclassified to the job request forum) in case either considers it feasible and might consider exploring the suggestion, further.  Further details would be provided.  Also, there is a related issue, presented in another post, that must be considered.

Thanks.

Cornelio

__________
Note:

There is another PHP module and I already posted in the Forum  of Andre -- who developed the script  to integrate the mod to bridge CPG-CPMFetch to Joomla -- about the capabilities of his script.

Valeryn


Joachim Müller


Valeryn

Joachim Müller, I not dialect in english. I russian.
It Is Installed "cpmFetch" + "Simple Javascript plugin for cpmFetch" and is written block for PHP-Nuke with code taken from javascripttest.html (little are changed)
Read on this page

Valeryn

My modification
<script type="text/javascript">
var albums=[]; //Указываются номера, если необходимо сделать выборку только из каких то конкретных альбомов
var categories=[1,2,3,4]; //Указываются номера, если необходимо сделать выборку только из каких то конкретных категорий

var cpr_albumid= albums[Math.floor(Math.random()*albums.length)];
var cpr_catid= categories[Math.floor(Math.random()*categories.length)];   
var resulttype = "randomfromcategory";               //По какому принципу производить отбор фоток

Shelia

Trying to find a simple solution for embedding cpmFetch into my 2.5 Wordpress installation. Any insight on how this plugin might do the trick? I'll give it a try but I was hoping that  someone else had tried and I could save myself the trouble of a futile attempt.

Thanks!

Evaligan

This works for SMF Forums too?
I want that when enter in my SMF Forum show the most recents images from Coppermine in thumbnails. The users do a clic and go to the gallery. My Coppermine works fine with my SMF.

kailew

Hello,

is it possible to show intermediate pictures with the js?

Kai

imgr8

Can someone please tell me how to style the pictures using this plugin? I want to add padding and a background for each image and I have wasted 2 days on it and I cant figure it out :( There's this part in the file:


/*
      StylesGenerated with table
            'tablestyle'   => 'cpr_tablestyle',
            'tableheadstyle'=> 'cpr_tableheadstyle',
            'rowstyle'      => 'cpr_rowstyle',
            'cellstyle'      => 'cpr_cellstyle',
            'imagestyle'   => 'cpr_imagestyle',
            'linkstyle'      => 'cpr_linkstyle'
   */

but how do I use it??

Any help will be appreciated, and please answer  >:(

meek

Hi.

Would it be possible to display just one single image from a certain album even though this album contains multiple images?

Kind regards.

edenffs

This is an awesome mod, it has enabled me to show images from cpm in the phpbb3 profile page in the correct location.
I have only managed to display the last uploaded images from the hole gallery, Is there any way of showing the last uploaded images from the profile user id?

edenffs

Quote from: meek on October 22, 2008, 10:33:31 PM
Hi.

Would it be possible to display just one single image from a certain album even though this album contains multiple images?

Kind regards.
yes just change the rows to 1 and the columns to 1
var rows=1;   //Number of rows
var col=1;   //Number of columns

meek

Quote from: imgr8 on October 15, 2008, 10:22:15 PM
Can someone please tell me how to style the pictures using this plugin? I want to add padding and a background for each image and I have wasted 2 days on it and I cant figure it out :( There's this part in the file:


/*
      StylesGenerated with table
            'tablestyle'   => 'cpr_tablestyle',
            'tableheadstyle'=> 'cpr_tableheadstyle',
            'rowstyle'      => 'cpr_rowstyle',
            'cellstyle'      => 'cpr_cellstyle',
            'imagestyle'   => 'cpr_imagestyle',
            'linkstyle'      => 'cpr_linkstyle'
   */

but how do I use it??

Any help will be appreciated, and please answer  >:(

I'd like to know this too...

meek

Quote from: edenffs on October 25, 2008, 08:35:59 PM
yes just change the rows to 1 and the columns to 1
var rows=1;   //Number of rows
var col=1;   //Number of columns

Thanks for your reply, but that's not quite what I'm after. I want to show just one image - no matter what category or album it's located in, so I guess it should be something with image ID or something. I just don't know how to code it.