Hi there,
I've been going through the documentation and reading the forums but I haven't found an answer as to why my webpage only shows the last 3 random images instead of all random images from all the albums. Any help would be appreciated. Here is the code that I use on my webpage:
<?php
include "./cpg140/cpmfetch/cpmfetch.php";
$objCpm = new cpm("./cpg140/cpmfetch/cpmfetch_config.php");
$myarray = array('imagesize' => "int");
$objCpm->cpm_viewRandomMedia(1,1,$myarray);
$objCpm->cpm_close();
?>
cpg140 (coppermine gallery stored off the website root)
cpmfetch folder (stored in the cpg140 folder)
Quote from: jam1 on January 05, 2007, 05:07:58 PM
Hi there,
I've been going through the documentation and reading the forums but I haven't found an answer as to why my webpage only shows the last 3 random images instead of all random images from all the albums. Any help would be appreciated. Here is the code that I use on my webpage:
<?php
include "./cpg140/cpmfetch/cpmfetch.php";
$objCpm = new cpm("./cpg140/cpmfetch/cpmfetch_config.php");
$myarray = array('imagesize' => "int");
$objCpm->cpm_viewRandomMedia(1,1,$myarray);
$objCpm->cpm_close();
?>
cpg140 (coppermine gallery stored off the website root)
cpmfetch folder (stored in the cpg140 folder)
Are you bridged?
Are you bridged?
I do not have a bulletin board or forum yet - perhaps I will do that later.
I do have the bridging folder that is within the cpg140 folder and that is uploaded. Is that what you mean?
To give a bit more detail.
I used 1.9.4 dev version of cpmfetch and cpg 1.4.10 latest version. The script that I used on my homepage in order to display a random image from the gallery each time a user reloads or visits the homepage is:
<?php
include "./cpg140/cpmfetch/cpmfetch.php";
$objCpm = new cpm("./cpg140/cpmfetch/cpmfetch_config.php");
$myarray = array('imagesize' => "int");
$objCpm->cpm_viewRandomMedia(1,1,$myarray);
$objCpm->cpm_close();
?>
cpg140 (coppermine gallery stored off the website root)
cpmfetch folder (stored in the cpg140 folder)
And for some reason the random images are only showing the last 3 uploaded random images. I do not have a bulletin board or forum yet so I haven't done anything with the bridging files.
Quote from: jam1 on January 07, 2007, 09:09:37 PM
To give a bit more detail.
I used 1.9.4 dev version of cpmfetch and cpg 1.4.10 latest version. The script that I used on my homepage in order to display a random image from the gallery each time a user reloads or visits the homepage is:
<?php
include "./cpg140/cpmfetch/cpmfetch.php";
$objCpm = new cpm("./cpg140/cpmfetch/cpmfetch_config.php");
$myarray = array('imagesize' => "int");
$objCpm->cpm_viewRandomMedia(1,1,$myarray);
$objCpm->cpm_close();
?>
cpg140 (coppermine gallery stored off the website root)
cpmfetch folder (stored in the cpg140 folder)
And for some reason the random images are only showing the last 3 uploaded random images. I do not have a bulletin board or forum yet so I haven't done anything with the bridging files.
Sorry, but try the newest (1.9.6). There was a bug fix that prevented images that were in user galleries from being displayed. Does that sound like it may solve your problem? I just figured it out last night after someone pointed out that it was failing on those.
The symptom was that it would not show those photos.
Vuud
Hi Vuud,
I uploaded and installed 1.9.6-dev version and I am still having the same problem, where only the last 3 uploaded images to the album are showing in the random image script (Note: all of the pictures are showing in the coppermine album but only the last 3 are showing with the cpmfetch script as above). Do I need to configure the database differently?
Quote from: jam1 on January 11, 2007, 05:19:56 AM
Hi Vuud,
I uploaded and installed 1.9.6-dev version and I am still having the same problem, where only the last 3 uploaded images to the album are showing in the random image script (Note: all of the pictures are showing in the coppermine album but only the last 3 are showing with the cpmfetch script as above). Do I need to configure the database differently?
You should not have to touch the database. You ran the install right?
Are you bridged with a forum or something?
Hi Vuud,
Yes, I ran the install and it showed me the 3 random pictures that I see on my site.
I am not bridged with anything yet (I would like to have some kind of an announcements or what's new page eventually but right now I do not have a forum. I do have inmail which is an email form).
Quote from: jam1 on January 11, 2007, 06:43:59 PM
Hi Vuud,
Yes, I ran the install and it showed me the 3 random pictures that I see on my site.
I am not bridged with anything yet (I would like to have some kind of an announcements or what's new page eventually but right now I do not have a forum. I do have inmail which is an email form).
Okay, so we know the install worked. Please post the php code for the page that is not working now. A solution is in site.
The PhP code is:
<?php
include "./cpg140/cpmfetch/cpmfetch.php";
$objCpm = new cpm("./cpg140/cpmfetch/cpmfetch_config.php");
$myarray = array('imagesize' => "int");
$objCpm->cpm_viewRandomMedia(1,1,$myarray);
$objCpm->cpm_close();
?>
Quote from: jam1 on January 12, 2007, 06:53:14 PM
The PhP code is:
<?php
include "./cpg140/cpmfetch/cpmfetch.php";
$objCpm = new cpm("./cpg140/cpmfetch/cpmfetch_config.php");
$myarray = array('imagesize' => "int");
$objCpm->cpm_viewRandomMedia(1,1,$myarray);
$objCpm->cpm_close();
?>
PM Me a link to your install.php, a link to your gallery, and a link to your test page shown above.
thanks!
Quote from: jam1 on January 11, 2007, 06:43:59 PM
Hi Vuud,
Yes, I ran the install and it showed me the 3 random pictures that I see on my site.
I am not bridged with anything yet (I would like to have some kind of an announcements or what's new page eventually but right now I do not have a forum. I do have inmail which is an email form).
I just posted 1.9.7 which fixes this issue. Note: You will have to re-run the install since some of the configuration has changed.
It works! Thank You very much, vuud!!
You rock!
:D
This tool kicks butt.
I had to make a tweak - is it a bug?
cpmfetch\cpmfetch_dao.php: $this->OverridePathToAlbums($this->fullp
athtocpm . "[b]/[/b]albums", $this->partialUrltocpm . "[b]/[/b]albums");
cpmfetch\cpmfetch_dao.php: $this->OverridePathToAlbums($this->fullp
athtocpm . "albums", $this->partialUrltocpm . "albums");
Quote from: MisterX on January 14, 2007, 11:17:32 PM
This tool kicks butt.
I had to make a tweak - is it a bug?
cpmfetch\cpmfetch_dao.php: $this->OverridePathToAlbums($this->fullp
athtocpm . "[b]/[/b]albums", $this->partialUrltocpm . "[b]/[/b]albums");
cpmfetch\cpmfetch_dao.php: $this->OverridePathToAlbums($this->fullp
athtocpm . "albums", $this->partialUrltocpm . "albums");
What's the fix do? I am not actively supporting 1.6.x much
The dev releases are much better, and will be the stable in a week or two
my images were not showing when they were inside the albums folder. I think it was something like this
http://www.foo.net/cpg//albums/foo/foo.jpg
Quote from: MisterX on January 15, 2007, 02:25:32 AM
my images were not showing when they were inside the albums folder. I think it was something like this
http://www.foo.net/cpg//albums/foo/foo.jpg
Hmmm, there has long been a problem with double slashes in URL's, but I tested it in some browsers and it did not seem to cause a problem.
The dev version will be stable soon... that function, in fact, no longer is needed or exists :)
Thanks for the post
Vuud
I installed cpmfetch i dont know what to do next. after u run the install what else is there left to do. here do u put codes? am i running install right all i did was click on install.php from my server. i also typed in mysitename.com/cpg/ cpmfetch/install.php
Quote from: pdiddy8117 on January 28, 2007, 04:12:40 AM
I installed cpmfetch i dont know what to do next. after u run the install what else is there left to do. here do u put codes? am i running install right all i did was click on install.php from my server. i also typed in mysitename.com/cpg/ cpmfetch/install.php
That depends entirely on what you want to do.
Something like this will produce a random 6x6 grid.
The documentation on the web site will give you more ideas about what is possible.
Next time post in the forum area for support too... thanks!
<?php
include "./path/to/cpmfetch/cpmfetch.php";
$objCpm = new cpm("./path/to/cpmfetch/cpmfetch_config.php");
$objCpm->cpm_viewRandomMedia(6,6);
$objCpm->cpm_close();
?>
can you elaborate on
img src="/cfimageget.php?category=7"
what if I have 40 pictures in category 7 and I only want to view 1
where do you plug in img src="/cfimageget.php?category=7"
behind a <a href=" ???????????????
That doesn't work....
Maybe you have been playing with this stuff for years, but php is something I dabble in from time to time.
Quote from: bcddd214 on February 04, 2007, 08:17:10 PM
can you elaborate on
img src="/cfimageget.php?category=7"
what if I have 40 pictures in category 7 and I only want to view 1
where do you plug in img src="/cfimageget.php?category=7"
behind a <a href=" ???????????????
That doesn't work....
Maybe you have been playing with this stuff for years, but php is something I dabble in from time to time.
Are you intentionally trying to hijack everythread?
cfImageget is for use on Non-PHP pages, or as a remote call to get a photo from another site (as for an avatar or something).
You cannot request a particular PID over cfimageget.php
But if you dabble in php, you should be able to modify the code - it is very simple.