<?php
error_reporting(E_ALL);
ini_set('display_errors',1); // 0 is off, 1 is on
?>
Category name | Album | New count |
Haley - The early years (1999-2002) | 2000 Haley - the second year | 17 new |
1999 Haley - the first year | 69 new | |
2001 Haley - the third year | 30 new | |
Haley, Christi and me | Our furry friends | 18 new |
May 2003 - Beckett Trip | 15 new | |
Misc - Just don't fit anywhere | 11 new | |
img src="/cfimageget.php?category=7"
<?php
include "../php-lib/cpmfetch/coppermine.php";
$objCpm = new cpm('/photos');
$objCpm->cpm_viewRandomMediaFromAlbum(1,3,7);
$objCpm->cpm_close();
?>
<?php
$options = array(
"tableStyle" => "photoclip",
"rowStyle" => "photoclip",
"cellStyle" => "photoclip",
"linkStyle" => "photoclip",
"altTag" => "One of the last photos submitted",
"imageStyle" => "photoclip",
"imagesize" => "int") ;
$objCpm->cpm_viewLastAddedMedia(4,2,$options);
?>
<?php
include "./config.inc.php";
include "./coppermine.php";
$objCpm = new cpm($mysql_dbname, $mysql_host, $mysql_username, $mysql_password, $cpm_mysql_tableprefix, $urltocpm);
?>
<?php $objCpm->cpm_viewRandomMediaFromCategory(1,1,7); ?>
<?php $objCpm->cpm_close(); ?>
<?php
include "./config.inc.php";
include "./coppermine.php";
$objCpm = new cpm($mysql_dbname, $mysql_host, $mysql_username, $mysql_password, $cpm_mysql_tableprefix, $urltocpm);
$objCpm->cpm_viewRandomMediaFromCategory(1,1,7);
$objCpm->cpm_close();
?>
<?php
include "../photos/includes/config.inc.php";
include "./coppermine.php";
$objCpm = new cpm($CONFIG['dbname'], $CONFIG['dbserver'], $CONFIG['dbuser'],$CONFIG['dbpass'], $CONFIG['TABLE_PREFIX'], '/photos');
?>
<?php
include "/grafflix/config.inc.php";
include "/grafflix/copperminefetch/coppermine.php";
$objCpm = new cpm($mysql_dbname, $mysql_host, $mysql_username, $mysql_password, $cpm_mysql_tableprefix, $urltocpm);
$objCpm->cpm_viewRandomMediaFromCategory(1,1,7);
$objCpm->cpm_close();
?>
<?php
include "./grafflix/include/config.inc.php";
include "./grafflix/copperminefetch/coppermine.php";
$objCpm = new cpm($CONFIG['dbname'], $CONFIG['dbserver'], $CONFIG['dbuser'],$CONFIG['dbpass'], $CONFIG['TABLE_PREFIX'],'/grafflix');
$objCpm->cpm_listMediaCount ( );
$objCpm->cpm_close();
?>
<?php
include "./grafflix/include/config.inc.php";
include "./grafflix/copperminefetch/coppermine.php";
$objCpm = new cpm($mysql_dbname, $mysql_host, $mysql_username, $mysql_password, $cpm_mysql_tableprefix, $urltocpm);
$objCpm->cpm_viewRandomMediaFromCategory(1,1,9);
$objCpm->cpm_close();
?>
Notice: Undefined index: coppermine in c:\program files\easyphp1-7\www\test.php on line 4
Notice: Undefined index: localhost in c:\program files\easyphp1-7\www\test.php on line 4
Notice: Undefined index: root in c:\program files\easyphp1-7\www\test.php on line 4
Notice: Undefined index: ***** in c:\program files\easyphp1-7\www\test.php on line 4
Notice: Undefined variable: cpm in c:\program files\easyphp1-7\www\grafflix\copperminefetch\coppermine.php on line 66
Notice: Undefined variable: cpm in c:\program files\easyphp1-7\www\grafflix\copperminefetch\coppermine.php on line 97
Warning: mysql_connect(): Access denied for user: 'ODBC@localhost' (Using password: NO) in c:\program files\easyphp1-7\www\grafflix\copperminefetch\coppermine_dao.php on line 154
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in c:\program files\easyphp1-7\www\grafflix\copperminefetch\coppermine_dao.php on line 155
Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in c:\program files\easyphp1-7\www\grafflix\copperminefetch\coppermine_dao.php on line 156
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in c:\program files\easyphp1-7\www\grafflix\copperminefetch\coppermine_dao.php on line 169
Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in c:\program files\easyphp1-7\www\grafflix\copperminefetch\coppermine_dao.php on line 170
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in c:\program files\easyphp1-7\www\grafflix\copperminefetch\coppermine_dao.php on line 171
Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in c:\program files\easyphp1-7\www\grafflix\copperminefetch\coppermine_dao.php on line 172
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in c:\program files\easyphp1-7\www\grafflix\copperminefetch\coppermine_dao.php on line 57
Notice: Undefined variable: cpm in c:\program files\easyphp1-7\www\grafflix\copperminefetch\coppermine.php on line 87
Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource in c:\program files\easyphp1-7\www\grafflix\copperminefetch\coppermine_dao.php on line 161
gonna turn in.
spreek to you later, tnx for the help
<?php
// HELP FOR YOU - PLEASE COMPLETE THE VARIABLES BELOW MANUALLY
$dbuser = '';
$dbhost = '';
$dbpass = '';
$dbname = '';
$dbconnection = mysql_connect($dbhost, $dbuser, $dbpass);
print "Using user: $dbuser host: $dbhost name: $dbname";
mysql_select_db($this->dbname, $dbconnection);
print (mysql_error($dbconnection));
?>
Using user: root host: localhost name: coppermine
Notice: Undefined variable: this in c:\program files\easyphp1-7\www\test.php on line 11
No Database Selected
<?php
// Coppermine configuration file
// MySQL configuration
$CONFIG['dbserver'] = 'localhost'; // Your database server
$CONFIG['dbuser'] = 'root'; // Your mysql username
$CONFIG['dbpass'] = 'XXXXX'; // Your mysql password
$CONFIG['dbname'] = 'coppermine'; // Your mysql database name
// MySQL TABLE NAMES PREFIX
$CONFIG['TABLE_PREFIX'] = 'cpg132_';
?>
new cpm('coppermine', 'localhost'
did it like that and so on, is that what you meant ? got a whole load of errors with that.
header ("Content-Length: " . filesize($filetoget));
IMO, I think if it tries to get a private image, it should loop until it gets a public image.
Okay, the cfimageget.php is still kind of under development. So bear with me - I am glad someone is trying it though... it helps,
Well, you've hit some items that are still in the ironing out stage.
* None of the code here will allow a gallery marked private to be displayed. So unless you have it marked as viewable by the public, you will not get an image back.
* If it can't return an image then you get the broken image, because your image tag did not get an image back. It made sense to me at the time, but perhaps I should have it return a transparent pixel or something. What do you think? I'm open to suggestions here. It will probably end up being a programmable behavior.
The private gallery thing is going to be overrideable. Just have to work it in (I don't have any so the whole private gallery thing snuck up on me at the last momemt)
The filesize line seems to work here... I will tamper with it some more and maybe comment it out until I can determine why it is breaking for you. Are you on a linux / apache / php combo?
Thanks for playing
;D
<img src="http://www.philpeeps.com/gallery/CoppermineFetch/cfimageget.php" />
Yea that would be a nice function :D
tnx for the new version, gonna test it right away
Notice: Undefined variable: cpm in /home/bandc/public_html/loerbeek.vandulmen.net/gallery/CoppermineFetch/coppermine.php on line 67
Notice: Undefined variable: cpm in /home/bandc/public_html/loerbeek.vandulmen.net/gallery/CoppermineFetch/coppermine.php on line 140
Notice: Undefined variable: cpm in /home/bandc/public_html/loerbeek.vandulmen.net/gallery/CoppermineFetch/coppermine.php on line 88
And i would like to have a counter on my website (outside the gallery). Your counter only shows: xx pictures. Correct me if im wrong!
I want to have this on my site: "171 files in 7 albums with 17 comments viewed 6520 times"
I really want to use the last added media syntax...
the thing is...
I have one category full of wmv files...
when i put the include on my page it came up with just the alt text
i put up a test album with a few jpg files and it worked... since the jpgs were the last added media
so.... do you think you'll be able to call the thumbs from the video files? and link them to the page with the video.. or the album with the video...
and if not... is there a way to call last added media from a certain category... I already played with a few different versions of the include and i kept getting errors...
such as..
<?php $objCpm->cpm_viewLastAddedMediaFromCategory(1,1,2) ?>
Great job with this btw!!!!! I love it already
indeed, no errors anymore.
now i see nothing ??? :-\\
After some testing with your latest code, it appears to only return the red X when the filename includes spaces (from looking at the ".last" file). I have quite a few pictures that were named and uploaded by another user that have spaces in the filenames.indeed, no errors anymore.
now i see nothing ??? :-\\
Do me a favor and post the syntax of what you are doing, and add this to the top of your script and run it. This will show more errors than normal (and warnings).
<?php
error_reporting(E_ALL);
ini_set('display_errors',1); // 0 is off, 1 is on
?>
Thx,
Vuud
I have not been able to reproduce the problem by browsing filenames with spaces.
Can you post some examples of the contents of the debug file when it happens? Perhaps its something else in the filenames...
Thanks
Vuud
[21-Dec-2004 12:27:59] PHP Warning: readfile(http://www.philpeeps.com/gallery/albums/wedding/rae_pics_our_wed/thumb_Tasha and Philip Wedding - 028.jpg): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request
in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 114
[21-Dec-2004 12:28:08] PHP Warning: readfile(http://www.philpeeps.com/gallery/albums/wedding/rae_pics_our_wed/thumb_TashaRehearsal - 09.jpg): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request
in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 114
[21-Dec-2004 12:29:20] PHP Warning: readfile(http://www.philpeeps.com/gallery/albums/wedding/rae_pics_our_wed/thumb_Tasha and Philip Wedding - 209.jpg): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request
in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 114
[21-Dec-2004 12:29:59] PHP Warning: readfile(http://www.philpeeps.com/gallery/albums/userpics/10010/thumb_honeymoon - 20.jpg): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request
in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 114
[21-Dec-2004 12:31:40] PHP Warning: readfile(http://www.philpeeps.com/gallery/albums/wedding/rae_pics_our_wed/thumb_Tasha and Philip Wedding - 056.jpg): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request
in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 114
[21-Dec-2004 12:31:55] PHP Warning: readfile(http://www.philpeeps.com/gallery/albums/wedding/rae_pics_our_wed/thumb_Tasha and Philip Wedding - 017.jpg): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request
in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 114
[21-Dec-2004 12:37:27] PHP Warning: readfile(http://www.philpeeps.com/gallery/albums/wedding/rae_pics_our_wed/thumb_Tasha and Philip Wedding - 141.jpg): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request
in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 132
[21-Dec-2004 12:39:02] PHP Warning: readfile(http://www.philpeeps.com/gallery/albums/wedding/rae_pics_our_wed/thumb_Tasha and Philip Wedding - 121.jpg): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request
in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 132
[21-Dec-2004 12:47:21] PHP Warning: readfile(http://www.philpeeps.com/gallery/albums/wedding/rae_pics_our_wed/thumb_Tasha and Philip Wedding - 139.jpg): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request
in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 132
[21-Dec-2004 12:49:10] PHP Warning: readfile(http://www.philpeeps.com/gallery/albums/wedding/rae_pics_our_wed/thumb_Tasha and Philip Wedding - 075.jpg): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request
in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 132
[21-Dec-2004 12:49:47] PHP Warning: readfile(http://www.philpeeps.com/gallery/albums/wedding/rae_pics_our_wed/thumb_Tasha and Philip Wedding - 054.jpg): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request
in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 132
[21-Dec-2004 12:50:10] PHP Warning: readfile(http://www.philpeeps.com/gallery/albums/wedding/rae_pics_our_wed/thumb_TashaRehearsal - 02.jpg): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request
in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 132
[21-Dec-2004 12:50:27] PHP Warning: readfile(http://www.philpeeps.com/gallery/albums/wedding/rae_pics_our_wed/thumb_Tasha and Philip Wedding - 011.jpg): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request
in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 132
[21-Dec-2004 12:53:35] PHP Warning: readfile(http://www.philpeeps.com/gallery/albums/userpics/10008/thumb_What a picture2.jpg): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request
in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 132
As you can see, all failures have a space in the filename....As you can see, all failures have a space in the filename....
[21-Dec-2004 22:00:59] PHP Warning: main(../gallery/include/config.inc.php): failed to open stream: No such file or directory in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 25
[21-Dec-2004 22:00:59] PHP Warning: main(): Failed opening '../gallery/include/config.inc.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 25
[21-Dec-2004 22:00:59] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php:25) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 127
[21-Dec-2004 22:00:59] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php:25) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 128
[21-Dec-2004 22:01:00] PHP Warning: main(../gallery/include/config.inc.php): failed to open stream: No such file or directory in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 25
[21-Dec-2004 22:01:00] PHP Warning: main(): Failed opening '../gallery/include/config.inc.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 25
[21-Dec-2004 22:01:01] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php:25) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 127
[21-Dec-2004 22:01:01] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php:25) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 128
[21-Dec-2004 22:01:01] PHP Warning: main(../gallery/include/config.inc.php): failed to open stream: No such file or directory in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 25
[21-Dec-2004 22:01:01] PHP Warning: main(): Failed opening '../gallery/include/config.inc.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 25
[21-Dec-2004 22:01:01] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php:25) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 127
[21-Dec-2004 22:01:01] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php:25) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 128
[21-Dec-2004 22:01:01] PHP Warning: fopen(../gallery/albums/wedding/thumb_IMG_0823.JPG): failed to open stream: No such file or directory in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 131
[21-Dec-2004 22:02:44] PHP Warning: fopen(http://www.philpeeps.com/gallery/albums/wedding/rae_pics_our_wed/thumb_Tasha and Philip Wedding - 228.jpg): failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request
in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 131
$filetoget = 'http://www.philpeeps.com//gallery/albums/wedding/rae_pics_our_wed/thumb_Tasha%20and%20Philip%20Wedding%20-%20228.jpg';
The problem with changing the spaces is that if it access the file by the file:// spec then it will not find the file with spaces encoded. I am trying to figure out why on yours it seems intent on accessing the file via http:// instead of just directly.
include "coppermine_dao.php";
include "../include/config.inc.php";
$pathtocpm = "..";
I had no idea so many people were using cpg for other media! Anyway, aparently I will have to support this.
Last added media from a category... no, but that is easy and I will code it in later today / tonight.
I also have to deal with other media formats. As for the wmv thumbnails, if cpg displays them I can display them - if cpg does not, then its down to a maybe :)
Thanks... yes cpg allows you to specify custom thumbs for wmv files.. and it has a default thumb for each type of media that comes up if there is not a custom one uploaded with the media files...
I use cpg for about 10 sites with mostly videos... it would be great addition to have the last added video or photo on the index pages :)
Thanks
CX
http://www.philpeeps.com/wp/test.php
Thanks! That did the trick! Now I just need to figue out how to make it a link to the random image...
Sorry my level of php knowledge cost you some time.
So the ".." is equivalent of the DOS command "cd.." to go up a directory?
Let me know when this is functional, as I too would like to show the default media thumbnails if that is the last uploaded item, so the look is consistent whether it is a jpeg or wmv that is last uploaded...Thanks... yes cpg allows you to specify custom thumbs for wmv files.. and it has a default thumb for each type of media that comes up if there is not a custom one uploaded with the media files...
I use cpg for about 10 sites with mostly videos... it would be great addition to have the last added video or photo on the index pages :)
Thanks
CX
Is there a site I can snag a few wmv files from to test this out. Preferrably one with custom thumbnails so I can make sure it works.
I was poking at it some today and found the default media thumbs. So you are saying you can make your own thumb specifially for one media file (say a frame from it) and it will serve that up if you have it... default otherwise.
That should not be hard....
( I probably just cursed myself saying that)
Working good for me, i've made a few changes, nothing big..thanks
snork
I'm a newbie t o php but I've managed to get it working, but I wanted to know if someone could help me pul all this into a variable that I can include in my template.
thanks :)
Is there a site I can snag a few wmv files from to test this out. Preferrably one with custom thumbnails so I can make sure it works.
I was poking at it some today and found the default media thumbs. So you are saying you can make your own thumb specifially for one media file (say a frame from it) and it will serve that up if you have it... default otherwise.
That should not be hard....
( I probably just cursed myself saying that)
Great mod !
(Could you numerate your packages in order to know if we have the last version?)
Actually all my sites are in a pass protected area & adult in subject matter... not everyones cup of tea...
You could probably find a few wmv files in your my videos location as samples for windows media player
For a custom thumb all you need to do is put a thumb_moviefilename.jpg in the same folder the videos are
located in the album area of the gallery...
cpm_viewLastAddedMediaFromCategory($rows, $columns, $catid, $options="")
cpm_viewLastAddedMediaFromAlbum($rows, $columns, $albumid, $options="")
cpm_formatStats($format);
$objCpm->cpm_formatStats("Here is a percent sign %% There are %f files in %c categories containing %a albums, having served %v views and getting %n comments");
* Docs on how to use this for random avatars<br />That would be great. I actually tried to use coppermine fetch for a random signature but it didn't work.
* Docs on how to use this for random avatars<br />That would be great. I actually tried to use coppermine fetch for a random signature but it didn't work.
I figured out a way using another script and .htaccess, but it is not very elegant and I'm stuck to specific albums.
yes, please attach your mods to your postings whenever possible. You might want to consider naming the files with reference to the version number. Using the naming scheme we use for our own files your file would be named like this: cpg1.3.2_mod_copperminefetch0.6.tar.gz, but of course you're free to come up with a naming scheme of your own, e.g. copperminefetch-0_6.tar.gz
Joachim
A couple of suggestions... (Good work, by the way.)
I've been using cpm_viewLastAddedMedia and cpm_viewLastAddedMediaFromAlbum.
1) imagelink should have a setting to link to the display page of the image (ex: http://somesite/galleries/displayimage.php?pos=-803)
2) imagelink should have a setting to call the javascript function MM_openBrWindow (this is what Coppermine does to display a large image)
3) more options should be available for the alt attribute. I specifically would like to show the date of the image in the alt tag, but there are probably other things that would be useful to show as well.
4) add a title attribute that is identical to the alt attribute. (Mozilla browsers don't show alt attributes on mouseover, but they do show title)
BUG? -- I'm getting a double slash between the directory and the file: http://somesite/galleries/albums/test//testpic.jpg
BUG? -- It seems some "box" characters got added to the end of some of the files of version 0.7, probably artifacts of zipping the files. They don't hurt too much except they do get printed on the html page when coppermine.php is included. I'm using windows...
Thanks,
Kory
<?php $objCpm->cpm_viewLastAddedMedia(1,2,array("alttag" => "filename: %f")); ?>
1) imagelink should have a setting to link to the display page of the image (ex: http://somesite/galleries/displayimage.php?pos=-803)
2) imagelink should have a setting to call the javascript function MM_openBrWindow (this is what Coppermine does to display a large image)
var $sqlPictureAlbumSelect = ' p.filepath, p.filename, p.aid, p.filesize, p.title, p.caption, p.owner_name, p.ctime, p.hits, a.title, a.description, p.pid ';
elseif ($imagelink == 'intermediate') {
$linkhtmlstart = '<a href="' . $this->urltocpm . '/displayimage.php?pos=-' . $row[11] . '" " ' . $linkStyle . $linktarget .' >';
$linkhtmlend = '</a>';
}
Also, you seem to have fixed the end-of-file "artifacts". I might make one more suggestion about the overall package: put everything (including docs, README, etc.) into one folder: CoppermineFetch. This way, the whole package can just be unzipped to the directory where you want it and it all stays together; no risk of overriding an unrelated REAME file or docs folder.
This is a cosmetic thing, but the html code produced by the script has a LOT of extra spaces and tabs. Some of these are the result of unspecified variables (ex: $linkStyle), which does not bother me. But there is quite a bit of trimming up beyond this that could be done. Some people, like myself :), like to look at what html produced.
Finally, here is my solution for linking to the intermediate photos:
In coppermine_doa.php, line 48, add "p.pid" to the END of the query string:Code: [Select]var $sqlPictureAlbumSelect = ' p.filepath, p.filename, p.aid, p.filesize, p.title, p.caption, p.owner_name, p.ctime, p.hits, a.title, a.description, p.pid ';
In coppermine.php, starting at line 620, after the check for 'large', add the following code:Code: [Select]elseif ($imagelink == 'intermediate') {
$linkhtmlstart = '<a href="' . $this->urltocpm . '/displayimage.php?pos=-' . $row[11] . '" " ' . $linkStyle . $linktarget .' >';
$linkhtmlend = '</a>';
}
Now the intermediate page can be called simply by setting 'imagelink'=>'intermediate'. However, this to me seems like more of a DEFAULT action. Perhaps you would consider making 'imagelink'=>'none' a special action and opening the intermediate page as the default.
[31-Dec-2004 13:38:54] PHP Warning: fopen(/home/philpeep/public_html/gallery/albums/userpics/gap02/normal_DSCF0023.jpg): failed to open stream: No such file or directory in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 146
[31-Dec-2004 13:39:41] PHP Warning: fopen(/home/philpeep/public_html/gallery/albums/userpics/gap02/normal_DSCF0073.jpg): failed to open stream: No such file or directory in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 146
[31-Dec-2004 13:43:09] PHP Warning: fopen(/home/philpeep/public_html/gallery/albums/userpics/gap02/normal_DSCF0271.jpg): failed to open stream: No such file or directory in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 152
[31-Dec-2004 13:44:29] PHP Warning: fopen(/home/philpeep/public_html/gallery/albums/userpics/gap02/normal_DSCF0230.jpg): failed to open stream: No such file or directory in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 152
Maybe it's a stupid question but why does it write "Since XXX we've added about XX images" ?just go into the code and change it to what you want it to say.....
Of course but my question is: Why is it "about"? isn't it an exact number?
[02-Jan-2005 10:02:57] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/coppermine_dao.php:322) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 142
[02-Jan-2005 10:02:57] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/coppermine_dao.php:322) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 143
[02-Jan-2005 10:03:26] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/coppermine_dao.php:322) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 142
[02-Jan-2005 10:03:26] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/coppermine_dao.php:322) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 143
[02-Jan-2005 10:03:30] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/coppermine_dao.php:322) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 142
[02-Jan-2005 10:03:30] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/coppermine_dao.php:322) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 143
[02-Jan-2005 10:03:52] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/coppermine_dao.php:322) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 142
[02-Jan-2005 10:03:52] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/coppermine_dao.php:322) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 143
[02-Jan-2005 10:05:05] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/coppermine_dao.php:322) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 142
[02-Jan-2005 10:05:05] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/coppermine_dao.php:322) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 143
.jpg:/home/philpeep/public_html
Error in getImageTouse: .jpg normal_ DSCF0339.jpg
Warning: Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/coppermine_dao.php:322) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 142
Warning: Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/coppermine_dao.php:322) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 143
Code: [Select]Error in getImageTouse: .jpg normal_ DSCF0339.jpg
Warning: Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/coppermine_dao.php:322) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 142
Warning: Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/coppermine_dao.php:322) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 143
I updated and refreshed my test file ~100 times with no errors...Code: [Select]Error in getImageTouse: .jpg normal_ DSCF0339.jpg
Warning: Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/coppermine_dao.php:322) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 142
Warning: Cannot modify header information - headers already sent by (output started at /home/philpeep/public_html/gallery/CoppermineFetch/coppermine_dao.php:322) in /home/philpeep/public_html/gallery/CoppermineFetch/cfimageget.php on line 143
Hey Peeps,
I cant replicate it here, and I even tried a small image that did not have a normal_ version, But I did find a few potentials in the code (things that could have broken it) and make some changes / enhancements. Here is a new version - I am not posting it on the front page as I can't be sure it will fix your problem. Let me know how it works out:
Hope this works!
Hi all
I dont know if im in the right section of the forum, if not please move it :P. MOVED 8)
Im using coppermine fetch, i use the <?php $objCpm->cpm_viewRandomMedia(5,1); ?> script.
and the standerd align is left and i want it center or right.
does someone know how to do that??
<style type="text/css"> .photoclip { text-align:center; } </style>
<?php $objCpm->cpm_viewRandomMedia(5,1, array("cellstyle" => "photoclip")); ?>
Fatal error: Call to a member function on a non-object in /home2/barstone/public_html//cpgfetch/coppermine.php on line 371
<?php
include "gallery/include/config.inc.php";
include "cpgfetch/coppermine.php";
$objCpm = new cpm($mysql_dbname, $mysql_host, $mysql_username, $mysql_password, $cpm_mysql_tableprefix, $urltocpm);
$objCpm->cpm_viewRandomMediaFromCategory(1,1,2);
$objCpm->cpm_close();
?>
Error in getImageTouse: Extension (strtolower): .jpg Fileprefix: thumb_ Fileinfo: userpics/10002/ CIMG0030.JPG
Warning: Cannot modify header information - headers already sent by (output started at /home2/barstone/public_html/potaid/cpgfetch/coppermine_dao.php:319) in /home2/barstone/public_html/potaid/cpgfetch/cfimageget.php on line 118
Warning: Cannot modify header information - headers already sent by (output started at /home2/barstone/public_html/potaid/cpgfetch/coppermine_dao.php:319) in /home2/barstone/public_html/potaid/cpgfetch/cfimageget.php on line 119
Code: [Select]Fatal error: Call to a member function on a non-object in /home2/barstone/public_html//cpgfetch/coppermine.php on line 371
...snip...
Here is my testpage script. I need it to be in one script for my potal page. my test page is outside of the gallery and cpgfetch folders.Code: [Select]<?php
include "gallery/include/config.inc.php";
include "cpgfetch/coppermine.php";
$objCpm = new cpm($mysql_dbname, $mysql_host, $mysql_username, $mysql_password, $cpm_mysql_tableprefix, $urltocpm);
$objCpm->cpm_viewRandomMediaFromCategory(1,1,2);
$objCpm->cpm_close();
?>
..snip...
Thanks for any help, Dale.
<?php
error_reporting(E_ALL);
ini_set('display_errors',1); // 0 is off, 1 is on
include "cpgfetch/coppermine.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewRandomMediaFromCategory(1,1,2);
$objCpm->cpm_close();
?>
I also get the following error when going to the cfimageget.php file on my site.Code: [Select]Error in getImageTouse: Extension (strtolower): .jpg Fileprefix: thumb_ Fileinfo: userpics/10002/ CIMG0030.JPG
Hi vuud, Thanks for the PM, and taking a look at my site. It is most likely my doing because I tried to piece together the code from the docs and I found it hard to understand. Some usable sample files would be really cool to add to your package for cut and paste coders like me :)
Thanks :)
<?php
include "./cpgfetch/coppermine.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMediaFromCategory(1,1,2);
$objCpm->cpm_close();
?>
is there anyway to show last comment image?
Oki :)
http://www.flottig.se/test.php
No, its the image preview under... :)
Reload the side...
Thanx! :)
Your early morning and my bad english :)
I think i rebuild Coppermine whitout å,ä,ö , its easier....
It´s an really nice addon you got here!!
Maybe a hint is that coppermine's charset is iso-8859-1 and the page where copperminefetch is used is windows-1252
Ironically I spent last night and part of today doing just that.
http://www.fistfullofcode.com/projects/copperminefetch/index.php
Sorry for the poor docs, but I am trying to make them better. I posted some code a little while ago for you to try. Essentially replace your PHP code with this:Code: [Select]<?php
include "./cpgfetch/coppermine.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMediaFromCategory(1,1,2);
$objCpm->cpm_close();
?>
This assumes that you have this file in the root of your web site, and that you put the coppermine.php and coppermine_dao.php in a directory off the root called cpgfetch.
If all this is true, it will work.
:D
Check out the new docs on the web site
ERROR: Path to Coppermine incorrect.
Fatal error: Call to a member function on a non-object in /home2/barstone/public_html/potaid/cpgfetch/coppermine.php on line 371
Can you attach an image that is giving you that problem to a post here?
That way I can add it into mine and see if I can replicate the problem?
Thanks!
Good news! I was able to replicate your problem...
That means two things:
1) Its not you
2) It can be fixed
;D
Good news! I was able to replicate your problem...tell me, tell me :)
That means two things:
1) Its not you
2) It can be fixed
;D
Good news! I was able to replicate your problem...tell me, tell me :)
That means two things:
1) Its not you
2) It can be fixed
;D
I do not know yet, but if I can replicate it, I can fix it
But after looking at it some more I am even more confused. When I replicate it on my site and view it my pages are set to UTF-8 which breaks the file.
But, If I do not set a charset it works fine (defaults to ISO-8859-1) or if I force it to windows-1252 or the iSO-8859-1 it works fine. On your site the charset is for Windows-1252 on your pages so it should work fine.
Should I be able to see the problem on your main page? Cause I cannot. If you have a test page you are doing that image on, try adding in the meta tag for a windows-1252 charset... it should work
really.
I looked into adding somethign to convert charsets by it would add many dependencies to the code (external libraries and such you would have to install yourself if your server would let you)
Let me know how that pans out
Q1. Is it possible to state getrandom from more than 1 cat, or more preceisely, from all cats greater than 10000 (cid >10000), as selecting cat 1 does not work. I want to restict it to the user galleries only.
Q2. I have a gif in my gallery, and when that is shown(see pic), it only shows as a link (which is broken). Is it possible to stop it selecting gif files.
Note 1. The links from the pics are all broken, as the pid is not being added. The url for every pic is showing as '..../displayimage.php?pos=-' (no pic number).
1. Yes, I agree it works with cat 1, but cat 1 never contains albums itself, it contains sub-cats, from 10000 >. Therefore, all the user albums are actually in these higher numbered cats. Perhaps if it could be got to include sub-cats?
2. The gif image does not show at all, just the title, as shown in the screenshot above, which is set to show 4 images.
3. None of the links work. The command in use is 'cpm_viewRandomMedia(4,1)'. The resultant link does not include the image id, and is left blank.
1. Yes, I agree it works with cat 1, but cat 1 never contains albums itself, it contains sub-cats, from 10000 >. Therefore, all the user albums are actually in these higher numbered cats. Perhaps if it could be got to include sub-cats?
2. The gif image does not show at all, just the title, as shown in the screenshot above, which is set to show 4 images.
3. None of the links work. The command in use is 'cpm_viewRandomMedia(4,1)'. The resultant link does not include the image id, and is left blank.
Aha...
#1 - That sounds like what I will implement. Good idea and perfectly doable...
#2 - Your not going to believe this, but I looked at the gif, saw the text and for some reason thought it was the as of yet uncoded subtitle functionality. I need more sleep, more coffee or a better brain. Well the img links are definately broken then.
#3 - Okay, the cpm_viewRandomMedia(4,1) works okay here - not meaning that I don't believe you, its got to be some other unforeseen aspect of Coppermine I failed to anticipate.
Is there a live example of this I can look at? You can PM me that if you want to. If not, can you look at the img src for the missing images and see where it is broken?
Also have you made any mods that could have changed the name of fields in your database? Is there anything whacky you can think of?
Thanks for your patience
Vuud
You can install php/myadmin/apache on your own computer. Then you can use the latest GD.
Local server makes it much easier to develop. I hate it when there are occassional incompatibilities with Windows machine and Linux webhost so I have to upload files to test.
Is there a live example of this I can look at? You can PM me that if you want to. If not, can you look at the img src for the missing images and see where it is broken?
I just had the gif problem again, so while there, I checked the pic properties of the missing pic. and realised the img src is wrong, it is not showing the actual position of the pic on the server, but just 'gallery2/images'.
It only happens for the gif, which is actually in the same folder in the albums folder as the jpg files. I also used IE for this one, which shows the missing pic more clearly than firefox (used in the first pic)
<table border="0" width="100">
<tr>
<td align="center"><a href="/gallery2/displayimage.php?pos=-&PHPSESSID=2b57d8eec23a8ae029f80d40ff79ecf9"><img src="/gallery2/albums/userpics/10003/thumb_pic1.jpg" alt="userpics/10003/pic1.jpg" title="userpics/10003/pic1.jpg" border="0"/></a></td>
</tr>
<tr>
<td align="center"><a href="/gallery2/displayimage.php?pos=-&PHPSESSID=2b57d8eec23a8ae029f80d40ff79ecf9"><img src="/gallery2/albums/userpics/10002/thumb_charmian dancer.JPG" alt="userpics/10002/charmian dancer.JPG" title="userpics/10002/charmian dancer.JPG" border="0"/></a></td>
</tr>
<tr>
<td align="center"><a href="/gallery2/displayimage.php?pos=-&PHPSESSID=2b57d8eec23a8ae029f80d40ff79ecf9"><img src="/gallery2/albums/userpics/10002/thumb_charmian and amber.JPG" alt="userpics/10002/charmian and amber.JPG" title="userpics/10002/charmian and amber.JPG" border="0"/></a></td>
</tr>
<tr>
<td align="center"><a href="/gallery2/displayimage.php?pos=-&PHPSESSID=2b57d8eec23a8ae029f80d40ff79ecf9"><img src="/gallery2/images/" alt="casper/cup.gif" title="casper/cup.gif" border="0"/></a></td>
</tr>
</table>
Oh that is really wierd!
I took a quick look at the code and don't see any reason why this would be happening...
I have to look more later... Man, that is wierd... it obviously has the information, but its the same line that does the concatination that is doing it for the jpgs
Freaky...
Can you do me a favor and tell me what size the original gif is? Like did it get a thumb_ or normal_ made for it? Could be were I am failing
I just had the gif problem again, so while there, I checked the pic properties of the missing pic. and realised the img src is wrong, it is not showing the actual position of the pic on the server, but just 'gallery2/images'.
It only happens for the gif, which is actually in the same folder in the albums folder as the jpg files. I also used IE for this one, which shows the missing pic more clearly than firefox (used in the first pic)
Can you do me a favor and tell me what size the original gif is? Like did it get a thumb_ or normal_ made for it? Could be were I am failing
Can you do me a favor and tell me what size the original gif is? Like did it get a thumb_ or normal_ made for it? Could be were I am failing
There is the original and a 'thumb_' version, no 'normal_' version. Both thumb and original are 100 x 100, and because it was uploaded by ftp. the actual path is 'albums/casper/cup.gif' / 'albums/casper/thumb_cup.gif'
This is not in the userpics galleries, but in a public album. All the other pics so far are in the user galleries.
And this is not using the gif mod as such, version 1.4 has gif support built in where the server supports it.
<?php
include "./coppermine.php";
$objCpm = new cpm("/");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>
First of all : thank you Vuud for this so_great_hack for coppermine;
I was searching for this kind of mod for a long time and you did it :o ;D
I've installed the 1.1-dev version from your CoppermineFetch on my webserver;
I don't have any folder for my coppermine web gallery and the websurfers browse
directly the webgallery when they hit www.x-poz.org.
I've followed your instructions & tested with your stable 1.0 mod too
and I really don't know why I've got nothing else than the titles of my shots & bad href links
Everything is here : http://x-poz.org/cftest.php
BTW I've tested with a small .php webpage & I've got the same strange result :Code: [Select]<?php
include "./coppermine.php";
$objCpm = new cpm("/");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>
if ("/" == $urltocpm) $this->$urltocpm = "";
I would like to understand this mod (a lot of code for me !!!)
This mod can "call" elements of CPG on a page we want ?! or not ?!
Is it possible to "erase" table to put instead float div or nested lists ?!
@protox, what version of coppermine are you using.
I had the same result as you with this version of fetch, but as I am using it on a test version(1.4) of cpg, thought it was related.
version 0.9 .2 does work (mostly) with 1.4.
I would like to understand this mod (a lot of code for me !!!)
This mod can "call" elements of CPG on a page we want ?! or not ?!
Is it possible to "erase" table to put instead float div or nested lists ?!
This mod can call up information out of coppermine... like the last added photos, etc... See the readme on the web site for more examples. Also, the first post in this thread.
At this point, only HTML is generated. I'd like it to do CSS layouts, but am not experienced enough with it at this point.
If I did not answer what you were looking for, let me know.
I would like to understand this mod (a lot of code for me !!!)
This mod can "call" elements of CPG on a page we want ?! or not ?!
Is it possible to "erase" table to put instead float div or nested lists ?!
This mod can call up information out of coppermine... like the last added photos, etc... See the readme on the web site for more examples. Also, the first post in this thread.
At this point, only HTML is generated. I'd like it to do CSS layouts, but am not experienced enough with it at this point.
If I did not answer what you were looking for, let me know.
Is your mod is able to transform a CPG gallery to a similar system like :
http://www.zenith-de-rouen.com/pages/galerie.php?cbbGalerie=e0OsPdzBay
I have asked this long long time to reduce requests of CPG (with time it feeds SQL requests like a monster !!!) but your system seems to be quite cuztomisable ... but I'm waiting for your answer before installing and changing it ...
I would like to understand this mod (a lot of code for me !!!)
This mod can "call" elements of CPG on a page we want ?! or not ?!
Is it possible to "erase" table to put instead float div or nested lists ?!
This mod can call up information out of coppermine... like the last added photos, etc... See the readme on the web site for more examples. Also, the first post in this thread.
At this point, only HTML is generated. I'd like it to do CSS layouts, but am not experienced enough with it at this point.
If I did not answer what you were looking for, let me know.
Is your mod is able to transform a CPG gallery to a similar system like :
http://www.zenith-de-rouen.com/pages/galerie.php?cbbGalerie=e0OsPdzBay
I have asked this long long time to reduce requests of CPG (with time it feeds SQL requests like a monster !!!) but your system seems to be quite cuztomisable ... but I'm waiting for your answer before installing and changing it ...
Everything in general is listed on the first post here or on the web site cpmfetch.fistfullofcode.com (http://cpmfetch.fistfullofcode.com)
To be clear, this is not a full system, or intended as a replacement to coppermine. Nor do I see it heading in that direction at all. Essentially I let you grab images and data from coppermine to use on other pages on your web site.
I am not sure I understand what you are looking for in relation to the site you posted. If you want to show the last added photos of chuck berry, or a random chuck berry or every image in your album as a thumbnail it can do it. Otherwise, there is no browse functionality built in
Hope that helps
Hi Vuud,
thanks to your docs and examples this is the first time I've posted in this thread. Just wanted to say thanks for all your work on cpmfetch. Now my friends and family think I'm a genius! - actually I give you full credit
Thanks much,
N704FN
First of all : thank you Vuud for this so_great_hack for coppermine;
I was searching for this kind of mod for a long time and you did it :o ;D
I've installed the 1.1-dev version from your CoppermineFetch on my webserver;
I don't have any folder for my coppermine web gallery and the websurfers browse
directly the webgallery when they hit www.x-poz.org.
I've followed your instructions & tested with your stable 1.0 mod too
and I really don't know why I've got nothing else than the titles of my shots & bad href links
Everything is here : http://x-poz.org/cftest.php
BTW I've tested with a small .php webpage & I've got the same strange result :Code: [Select]<?php
include "./coppermine.php";
$objCpm = new cpm("/");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>
@protox, what version of coppermine are you using.
I had the same result as you with this version of fetch, but as I am using it on a test version(1.4) of cpg, thought it was related.
version 0.9 .2 does work (mostly) with 1.4.
Just small words to say that everything is working good with your mod Vuud; THXXXX ;)
Warning: fopen(feed.xml): failed to open stream: Permission denied in /home/www/db42903[...]6bcc6bf748cb626/web/libs/feedcreator.class.php on line 686
Error creating feed file, please check write permissions.
Now .. next problem : I cannot write the xml file ... strange ..
it says :QuoteWarning: fopen(feed.xml): failed to open stream: Permission denied in /home/www/db42903[...]6bcc6bf748cb626/web/libs/feedcreator.class.php on line 686
Error creating feed file, please check write permissions.
I think that I've got a CHMOD thing to do .. but where ...
Is there a way to modify the CFimageget.php file to display the latest image instead of a random one? I have everything working at http://www.frankpatten.ca or http://www.frankpatten.ca/cpmfetch/CFimageget.php
Thanks for any help
Bill:
What is your feedback on the CSS examples. I like the one with the singlle image the best. All would look better if the images were all of the same size (height - width). It is interesting what can be done without the use of a table.
Jim
You may have some suggestions on perhaps a function could be developed to allow the choice of either a table or CSS output for the coppermine.php script. Of course it then would be nice to have a choice to what the ul class would be called. I chose photolist, but others may want to used something different or nothing at all.
I was going through the latest 1.1.3 dev release and was experimenting with the code. I replaced all the "RandomMedia" with "LastAddedMedia" and it seem to work just fine.
see it here.. http://www.frankpatten.ca/cpmfetch/cfimageget-l.php "l" is for LastAddedMedia
as opposed to.. http://www.frankpatten.ca/cpmfetch/cfimageget-r.php "r" is for RandomMedia
include "coppermine_dao.php";
include "../cpg132/include/config.inc.php";
// This is the path (NOT URL) from where your cfimageget.php file is to your coppermine directory
$pathtocpm = "../cfetch";
// This is the partial url (part AFTER your domain name, to get to the coppermine directory
$urltocpm = "/cpg132";
Hi,
quick question about cfimageget.php. Both my Coppermine folder and Coppermine fetch folders are off the root... root/cpg132 and root/cfetch. I'm not quite sure about this:Code: [Select]include "coppermine_dao.php";
include "../cpg132/include/config.inc.php";
// This is the path (NOT URL) from where your cfimageget.php file is to your coppermine directory
$pathtocpm = "../cfetch";
// This is the partial url (part AFTER your domain name, to get to the coppermine directory
$urltocpm = "/cpg132";
Should the path to cpm be the same as url to cpm, or do I have it correct? I've had it both ways and from here it seems to work either way. I'm a bit confused.
Thanks
N704FN
The way you have is stramge. The PATH is from where ever cfimageget.php is installed to your coppermine folder, not to the coppermine fetch folder
In your case it should be "../cpg132"
The URL is the partial url to where coppermine photo gallery is installed. "/cpg132"
QuoteThe way you have is stramge. The PATH is from where ever cfimageget.php is installed to your coppermine folder, not to the coppermine fetch folder
In your case it should be "../cpg132"
The URL is the partial url to where coppermine photo gallery is installed. "/cpg132"
Seemed strange to me to, but like I said, it appears to work whether I use /cpg132 or /cfetch. Does my avatar image show up here, or am I just seeing it locally?
Dear Vuud: I'm a Spanish user with low english level, so sorry...
Well, I'm trying to use your mod to generate a random int image, but also I would like to have the image comments below of the photo. Is possible to generate a random photo, and show the photo comments below?.
Thank you four your nice mod.
I have Coppermine (and of course CoppermineFetch) on a sub domain of my site...
so I'm having a problem getting the thumbs to show up in cftest.php
It shows the links to the thumbs but not the actual thumbs.
When you click on the links it comes up with a window saying "displayimage.php could not be found".
This is probably an easy fix but I am baffled...anything I should be changing for it to work in a subdomain or is that even the problem...?
Thanks...excellent mod! ;)
dondo521
Also, in the general part you can have the title and or description shown.
Thank you for your reply Vuud :)QuoteAlso, in the general part you can have the title and or description shown.
That's I need (I typed comment intead of description...) . I really need to show below of the photo, the description of that photo, but I didn't find the way to do it. Currently I have the following code in my site:
<?php
include "./cpmfetch/coppermine.php";
$objCpm = new cpm("/astroalbum");
$objCpm->cpm_viewRandomMedia(1,1,array("imagesize" => "int"));
$objCpm->cpm_close();
?>
I show a random int photo, and also, I want to show the description of the photo, but reading the docs and F.A.Q. I can't find the way to do it.
If you or someone can help me to do this, I will very very pleased.
Thanks again and sorry for my written english... (Learned at high School many years ago :P )
Thanks Vuud!
I really appreciate that, will check in later...
dondo521
How could I remove the border since the IMG is linked.. and the table around the image? It just doesn't fit where I stuck the include on my site.
Thanks for the great mod ;D
Allright, I will try this... But...
http://cpmfetch.fistfullofcode.com/projects/copperminefetch/cfimageget.php
I see 2 lines of code... and 2 files i'm supposed to mod... am I supposed to add those 2 lines in those 2 files or what?
Thanks for the info on the subdomain issue Vuud...
I'm gonna give it a whirl later on today...as soon as i know the results I'll let you know how it came out...
Thanks again ;)!
dondo521
Allright I got it working...
http://www.spudfiles.com/gallery/cpmfetch/cfimageget.php?album=1
But you can't click on the image to bring you to the gallery page it's on? :\'(
Wrapping it in a link to the album sounds like a good idea...
http://www.spudfiles.com
You can see where the images are... the ones from coppermine are the 2 most inner ones on the bar next to the login box. Above them it says Cool Image (coulden't think of anything better :P)
If you move around my site you will see that bar is everywhere on the site.
Hello, I'm having a little problem. copperminefetch is working great for netscape and mozilla type browsers but not for IE. I tried to look through this entire thread for the answer but either it's not here or I missed it. Seen this problem yet? I'm working with newest stable CMF version and coppermine v1.3.2.
Ok so now that I made a noob of myself I'll share the strangeness...As it turns out I had the option "windowtarget" misspelled, once corrected it worked in IE....but then I though about it. So I changed it back to the misspelled way I originally had it and it worked in firefox but not in IE. And to get even stranger the target option actually worked, even misspelled in firefox. Now, I can blame the long hours on the misspelling but the fact that it works in firefox misspelled has total lost me. Anyway, it works now so I got the few IE users off my back and now I'll be going to sleep ;) Thanks for your responce.
Well here is the latest concerning the subdomain issue:
Using the lastest dev version...
If I do this in cfest.php:
<?php
// You need to change this variable to the directory that the Coppermine photo gallery is installed in.
$ChangeThisToYourPartialUrlToCPG = "/";
?>
The thumbs come up fine. :D
But I have tried every variable I could think of in cfimageget.php for these places...:
include "coppermine_dao.php";
include "../photos/include/config.inc.php";
// This is the path (NOT URL) from where your cfimageget.php file is to your coppermine directory
$pathtocpm = "../photos";
// This is the partial url (part AFTER your domain name, to get to the coppermine directory
$urltocpm = "/photos";
But getting errors... :(
So if my subdomain's name is "photos" and coppermine is in that folder (coppermine doesn't have it own subfolder) what should I be entering?
Again here is the path...
domainname>subdomain (where coppermine is installed)>copperminefetch main folder>copperminefetch>libs
Thanks for your help...!
dondo521
Not sure what you mean ???
(the normal way)
dondo521
yah, I think I am going to have to think this thing out...I really liked having everything nice and neat in sub-domains, but the value of using cfimageget might make me go back to just having Coppermine in it's own folder rather than it's own domain...
I'll let you know what I come up with should I choose to keep working on the sub domain issue, thanks for your help!
dondo521
Hi Vuud - I did no have any use for this mod hence have never looded into it - but great work indeed - what I would really like to see as the next step would be an interface which will generate some javascript which can just be pasted on any page and it works - just like google AdSense or flickr batch http://www.flickr.com/badge.gne
Do you have any plans of doing something like that?
I keep getting a fatal error on this line
else { print "ERROR: Path to Coppermine incorrect. (" . $this->filepathtocpm . ")";
$this = ""; <--------------HERE LINE 100
when i comment the two occurances out it works, any ideas why & also do i need them
cheers
Can you expound on this idea?
Can you expound on this idea?
OK - basically what I am asking is a frontend for your class which after selecting various options in the end gives user a piece of JS which she can slap into her HTML page and be done with - this is the way Google (and probably most others) deliver their banners.
This approach I have found works best for most non tech people. You either need to see Google OR the flickr URL to clearly get what I am thinking :)
I'd like to add this to a forum under the header but I haven't a clue where to enter the code.
function getImagefromAlbumAndPosition ($albumid, $pos) {
$retval = "";
if (is_numeric($albumid) && is_numeric($pos)) {
$sqlcode = /*same SQL Code till: */ p.aid=$albumid limit $pos, $pos";
/*Same code for the rest of the functiion*/
if (array_key_exists('aid',$_GET) && array_key_exists('pos', $_GET)) {
global $cpm;
$aid = $_GET['aid'];
$pos = $_GET['pos'];
$size=getSizeOption();
$results=$cpm->getImagefromAlbumAndPosition ($aid, $pos);
returnImageToBrowser($results,$size);
}
/*Rest of code the same as cfimage.php*/
Hi there.
First of all thank you for your work on this hack. (gifts, girls, money...all yours!) :)
Would it be possible to use this coppermine hack to display a specific picture as direkt output like in the cfimageget.php example.
Something like cfimageget.php?album=7&pos=3, used inside a <img src=""> tag. That would be a hell of a dream!
The following, I tried with copperminefetch 1.0 and CPG 1.3.2.
I tried writing a new function for coppermine_dao.php which is nearly like the getRandomImageFromAlbum function only changing a bit on the SQL:Code: [Select]function getImagefromAlbumAndPosition ($albumid, $pos) {
$retval = "";
if (is_numeric($albumid) && is_numeric($pos)) {
$sqlcode = /*same SQL Code till: */ p.aid=$albumid limit $pos, $pos";
/*Same code for the rest of the functiion*/
Instead of searching for a random image, I only wanted to return the picture limited by the position given to the function (limit $pos, $pos)
Then I wanted to call that function the same way one uses the getRandomImageFromAlbum function from within cfimage.php.Code: [Select]if (array_key_exists('aid',$_GET) && array_key_exists('pos', $_GET)) {
global $cpm;
$aid = $_GET['aid'];
$pos = $_GET['pos'];
$size=getSizeOption();
$results=$cpm->getImagefromAlbumAndPosition ($aid, $pos);
returnImageToBrowser($results,$size);
}
/*Rest of code the same as cfimage.php*/
Unfortenatly, this solution does not work out jet.
Do you have any hints on that?
If not, I would like to extend the feature request list with this issue!
Thank you
Georg
:)
Thanks for your quick answers! Perhaps I will describe what should be the final result of my questions:It seems like that would all be achievable with just a bbcode hack and smart creation of the picture database. The hack for the bbcode would need to just add an img code with the pic# to the end of a url and then the same for an link code, right? Just tell the users to look at the filename and use that as the pic#...
My goal would be a thing like it is used on the forums on www.airliners.net . They got a pictures database (non-Coppermine) and can use preview pics from that database in the forum like you will see in this thread:
http://www.airliners.net/discussions/general_aviation/read.main/1958918/
As you will see there, the picture is presented including picture data and the links will bring you directly to the pic IN the gallery....
And why all that? See here:
The next step would be a hack for a forum to include a picture with bbcode like [pic]album=4&pos=2[/pic]
So, presenting a specific pic would be a step towards this goal, I wanted to start simple. ;)
Perhaps, this kind of usage is not applicable with cfetch, but till now it is the best I know.
Let me know if you got something or if I was not able to give a good picture of what is my question. :)
Georg
peeps: I never thougt that way round.
Tarique: That sounds a lot like a solution. I would really appreciate this.
Cheers
Georg :)
I need some help. Does anyone have the code that does this:
(From page1 post1)
Since Friday, December 10 2004 we've added about 355 images
Category name Album New count
Haley - The early years (1999-2002) 2000 Haley - the second year 17 new
1999 Haley - the first year 69 new
2001 Haley - the third year 30 new
Haley, Christi and me Our furry friends 18 new
May 2003 - Beckett Trip 15 new
Misc - Just don't fit anywhere 11 new
I've tried everything and just can't get it to work.
Thanks
Mike
$ChangeThisToYourPartialUrlToCPG = "/gallery";
is correctERROR: Path to Coppermine incorrect. (/var/www/html/gallery//include/config.inc.php)
where I see 2 slashes after gallery...Warning: main(../photos/include/config.inc.php): failed to open stream: No such file or directory in /home/micropr/public_html/copperminefetch/cpmfetch/cfimageget.php on line 28
Warning: main(../photos/include/config.inc.php): failed to open stream: No such file or directory in /home/micropr/public_html/copperminefetch/cpmfetch/cfimageget.php on line 28
Warning: main(): Failed opening '../photos/include/config.inc.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/micropr/public_html/copperminefetch/cpmfetch/cfimageget.php on line 28
No Database SelectedNo Database Selected
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/micropr/public_html/copperminefetch/cpmfetch/cfimageget.php on line 112
Warning: Cannot modify header information - headers already sent by (output started at /home/micropr/public_html/copperminefetch/cpmfetch/cfimageget.php:28) in /home/micropr/public_html/copperminefetch/cpmfetch/cfimageget.php on line 145
Warning: Cannot modify header information - headers already sent by (output started at /home/micropr/public_html/copperminefetch/cpmfetch/cfimageget.php:28) in /home/micropr/public_html/copperminefetch/cpmfetch/cfimageget.php on line 146
cpm_viewLastAddedMedia (1, 1);
Tried this?
cpm_viewLastAddedMedia (1, 1);
Well...I have NOW.Very nice work, I'm using it to show a random image on my page.
But how can I prevent the image shown from displaying an alternate text? I don't like that much, since it just shows somestupidnumber.jpg
thx
Hi,
A few suggestions for this mod, I will probably implement these myself.
* Ability to show image title and description with the image - One site I am using coppermine for I am using Coppermine to allow users to administrate albums, however the presentation of the photos and site is required to be presented in a much less "community" based way.
* With the CFIMAGEGET.PHP the ability to specify a users favourites could be very usefull - One site I use coppermine on has a community aspect, and a commercial aspect. Currently one of the girls at the company administers large parts of the site using phpBB, i.e specific posts are pulled onto specific php pages. What I would like to be able to do is for the company/community to have ALL photos visible within the gallery section, but then for the admin girl to browse the photos and maintain her own favourites list, this favourites list would be all the photos that she (the company) are happy to have on the main site pages. I could then simply replace all images on all pages with the cfimageget.php call for an image, allowing the site to have a dynamic feel in many areas with rotating images from the admin users favourites.
Sort of making a site much more interesting for the visitor, and giving the company a lot more control, whilst giving the web designer less hassle.
I`m aware there are otherways this could be accomplished, however I think making use of the favourites feature within Coppermine would be the best way to go. The reason for wanting to do it from a specific users favourites rather than the most viewed or most voted for etc is wanting those two features to exisit within coppermine untouched, allowing the community to vote/view photos without affecting the main site pages. Obviously the most viewed and most voted for images, might differ a lot from images a company would want to present as its main visibility.
Its a great mod, very usefull :)
include "coppermine_dao.php";
include "/photos/include/config.inc.php";
// This is the path (NOT URL) from where your cfimageget.php file is to your coppermine directory
$pathtocpm = "../photos";
// This is the partial url (part AFTER your domain name, to get to the coppermine directory
$urltocpm = "/photos";
// This is the prefix your Coppermine databse uses for thumbnails (default shown)
$thumbnailprefix='tn_';
// This is the prefix coppermine uses for intermediate sizes (default shown)
$intermedprefix='normal_';
<?php
// You need to change this variable to the directory that the Coppermine photo gallery is installed in.
$ChangeThisToYourPartialUrlToCPG = "/photos";
?>
<html>
<head>
<title>CoppermineFetch Install Test page</TITLE>
</head>
<body>
<h1>CoppermineFetch Install test page</h1>
<p>Thank you for using CoppermineFetch...</p>
<hr>
var $thumbnailprefix = "tn_";
var $intermedprefix = "normal_";
var $fullsizeprefix = '';
var $defaultimagesize = "tn_";
var $cpm = "";
var $urltocpm = ""; //from a web client point of view without domain name /photos
var $filepathtocpm = ""; //server path to cpm directory /home/vuud/cpm
You can probably just override the alt with a blank - although I am not sure. Try this:
$cpmobj->cpm_viewRandomMedia(1,1,array("alttag" => ""));
That should just add an empty alttag
Hope that helps
I installed the mod on my test web but i had two problems
1) DOCUMENT_ROOT is not set in anyinstallation (any of that ) - IIS 5.0 - php 4.3.2 and IIS 6.0 - php 4.3.10
2) I have the albums directory outside of the coppermine tree and not with standard name. Now the dricetory is hardcoded
it is not possible get the album directory from the cpg's configuration CONFIG['fullpath'] ?
Is it possible to use cpm_unlock_private with cpmfetch? Or is it even possible to use cpmfetch with a private gallery?
OK, looks like that won't work. Guess you can't have everything :)
Thanks,
Mark
tried, and don't work for me
http://www.sortons.net/cfimageget.php?category=7
nothing ...
but
http://www.sortons.net/cftest.php
works well.
in cfimageget.phpCode: [Select]
include "coppermine_dao.php";
include "/photos/include/config.inc.php";
// This is the path (NOT URL) from where your cfimageget.php file is to your coppermine directory
$pathtocpm = "../photos";
// This is the partial url (part AFTER your domain name, to get to the coppermine directory
$urltocpm = "/photos";
// This is the prefix your Coppermine databse uses for thumbnails (default shown)
$thumbnailprefix='tn_';
// This is the prefix coppermine uses for intermediate sizes (default shown)
$intermedprefix='normal_';
in cftest.phpCode: [Select]<?php
// You need to change this variable to the directory that the Coppermine photo gallery is installed in.
$ChangeThisToYourPartialUrlToCPG = "/photos";
?>
<html>
<head>
<title>CoppermineFetch Install Test page</TITLE>
</head>
<body>
<h1>CoppermineFetch Install test page</h1>
<p>Thank you for using CoppermineFetch...</p>
<hr>
in coppermine.phpCode: [Select]var $thumbnailprefix = "tn_";
var $intermedprefix = "normal_";
var $fullsizeprefix = '';
var $defaultimagesize = "tn_";
var $cpm = "";
var $urltocpm = ""; //from a web client point of view without domain name /photos
var $filepathtocpm = ""; //server path to cpm directory /home/vuud/cpm
Where am I wrong ?
Hello! I was trying to reach the file rss_lastadded.php, and it says in my server: I'ts not possible to show the XML
It's not possible to se the files introduction of the XML, user by the style sheet. Correct your error, and then refresh the site, or try later.
--------------------------------------------------------------------------------
The sistem doesn't supports the specific codification. Error processing : 'http://hilaryduff.hostingportugal.com/copperminefetch/cpmfetch/rss_lastadded.php'.
Can you help me? (I translate this becauste it was in portuguese, so sorry if there's any mistake)
vuud, thanks any way
Is it possible to use cpm_unlock_private with cpmfetch? Or is it even possible to use cpmfetch with a private gallery?
OK, looks like that won't work. Guess you can't have everything :)
Thanks,
Mark
I think it would be possible... you'd have to edit the cfimageget.php and add in a call to the coppermine_dao to that function. OR, you can wait till I finish the next release which will have a 100% redone cfimageget.php (I assume thats what you were referring too)
The code to enter would be:
$cpm->setPriviteLockOn(false);
At line 65 in the version 1.1.3 (Just after the setPhotoPrefix
That should get you there
Tried that, but it just broke cfimageget. No errors, just no image. Looking forward to the next version.
Mark
$objCpm->cpm_formatStats("Here is a percent sign %% There arebut I cannot get it to work. I wanted to include this line in my template.php for my forum I use and I always get an error page that is standard for my portal. (Tiny Portal (SMF)). I do not know php code. so, please forgive me in advance. ;)
%f files in %c categories containing %a albums,
having served %v views and getting %n comments");
I have been trying to re-create this:Quote$objCpm->cpm_formatStats("Here is a percent sign %% There arebut I cannot get it to work. I wanted to include this line in my template.php for my forum I use and I always get an error page that is standard for my portal. (Tiny Portal (SMF)). I do not know php code. so, please forgive me in advance. ;)
%f files in %c categories containing %a albums,
having served %v views and getting %n comments");
I am using version 1.0 of the fetch... The error is a parsing error.
I just upgraded to php5, and it seems to have completely broken cpmfetch, except for "cfimageget_classic.php"
I searched this thread, but didn't find any other mention of this. Ideas?
I just upgraded to php5, and it seems to have completely broken cpmfetch, except for "cfimageget_classic.php"
I searched this thread, but didn't find any other mention of this. Ideas?
I am not sure why it would break. I did a lot of reading on PHP5 and its seemingly fantastic object support, but I am not sure why it would break this. I am not saying I am surprised, its never been tested on PHP5.
PHP5 compatibility is definately something I will have - heck everytime I muddle with the objects in here I wish it was PHP5... But I did not know that CPG was even supporting PHP5 yet. If you want to message me the errors or something I would be interested in seeing it. Like I said, I plan on support for it - but have not done anything with that yet
Thanks for the cheerful news ;)
I've sent you a message with some details...I hope there's a solution, "_classic" stinks, my users can't click them to get to the gallery!:-\\QuoteI just upgraded to php5, and it seems to have completely broken cpmfetch, except for "cfimageget_classic.php"
I searched this thread, but didn't find any other mention of this. Ideas?
I am not sure why it would break. I did a lot of reading on PHP5 and its seemingly fantastic object support, but I am not sure why it would break this. I am not saying I am surprised, its never been tested on PHP5.
PHP5 compatibility is definately something I will have - heck everytime I muddle with the objects in here I wish it was PHP5... But I did not know that CPG was even supporting PHP5 yet. If you want to message me the errors or something I would be interested in seeing it. Like I said, I plan on support for it - but have not done anything with that yet
Thanks for the cheerful news ;)
cfimageget and cfimageget_classic will never ever allow you to get clickable links... thats the main coppermine.php that gives that sort of thing. Classic is really bad compared to the new cfimageget.php functionality.
Will check the message :)
In coppermine.php comment out the following lines:
line 100: $this=""
line 131: $this=""
if you want to play with the new cfimageget then comment out (in cfimageget.php)
line 147: $this=""
Well I upgraded to the latest dev release.... and now I get nothing. the cftest.php works fine. I no longer get my random image which I got to work previously, now it doesn't work at all. :( I do not get any errors. just a blank page. where I had the random thumbnail now I get a small rectangle. (inserted into a block using the *img* tag). I'm new to php and do not know the code that well. I only got the thumbnail to work after hours of messing around and I suppose by chance it worked.
yes...tiny portal is SMF. ;)
Well I upgraded to the latest dev releaseIf you're refing to the coppermine devel version: there's no such thing as a dev release - it's a snapshot of the devel version that is available for experienced users who want to check out the new features. The downloadable file refered to on the 1.4 bugs board is quite old, make sure you have the most recent files from the devel branch of the cvs. Also you have to understand that the devel version comes with absolutely no support at all, so you're basically on your own.
Well I upgraded to the latest dev release.... and now I get nothing. the cftest.php works fine. I no longer get my random image which I got to work previously, now it doesn't work at all. :( I do not get any errors. just a blank page. where I had the random thumbnail now I get a small rectangle. (inserted into a block using the *img* tag). I'm new to php and do not know the code that well. I only got the thumbnail to work after hours of messing around and I suppose by chance it worked.
yes...tiny portal is SMF. ;)
*img src="http://www.mysite.com/gallery/cpmfetch/cfimageget.php?size=thumb&album=1"*. (since update it doesn't work) I was wanting to add under the random thumbnail, the gallery stats.
I get no errors I only get nothingness. To test the cfimageget.php I would point my browser to http://www.mysite.com/gallery/cpmfetch/cfimageget.php and it loads nothing. No errors. No image.
Since you are using the SMF Tiny Portal, when you go into the TPAdmin, you can add blocks. I had a block that had a random thumbnail in it, using the img tag.Quote*img src="http://www.mysite.com/gallery/cpmfetch/cfimageget.php?size=thumb&album=1"*. (since update it doesn't work) I was wanting to add under the random thumbnail, the gallery stats.
I am using cpmfetch 1.1.4 dev.
// CHANGE THIS TO TRUE IF PEOPLE ARE ALLOWED QUERIES THROUGH HERE
$ALLOW_DIRECT_ACCESS = false;
$ALLOW_DIRECT_ACCESS = true;
I too lost cfimageget functionality after upgrading. I can still fetch photos to my other pages (http://www.markchouinard.com/), but not using the new cfimageget or cfimageget_classic, which is strange, because I've compared files and they appear to be identical. Once I replace the older files it works fine. Not using any portal.
Mark
Hello,
When using fetch, is it possible to have the thumbnail link to the full size image in the gallery? I am using cpg132 and fetch 1.1
Any help is appreciated!
-Dave
Thank You! I now have my random thumbnail back. using the new cfig_random.php file. In Tiny Portal, you only have an html block. How would you pull the statistical information within an html block? Use the same php code? Any help would be greatly appreciated.
Is it possible to show the date the image was added under each thumbnail?
Is it possible to show the date the image was added under each thumbnail?
$htmlOut .= " src=\"$imagefile\"" . " />";
to:$htmlOut .= " src=\"$imagefile\"" . " width=\"100%\" />";
Hopefully a future version of cpmfetch will give us thumbnail sizing as a proper parameter (please please?)
Anyway - there is no plans at this time, and probably will never be an option for this under cpmfetch. Hah! So there! >:(
I'll probably be switching back to Gallery when 2.0 goes final (assuming its built in random block plays nice with WP). So double there! ;)
Is it possible to show the date the image was added under each thumbnail?
Hell yeah
set the subtitle option to use either %w or %W (the latter is unformatted and generally yucky looking)
So...
cpm_viewRandomMedia(array("subtitle" => "%w"));
or whatever function you want to use
;D
Is it possible to show the date the image was added under each thumbnail?
Hell yeah
set the subtitle option to use either %w or %W (the latter is unformatted and generally yucky looking)
So...
cpm_viewRandomMedia(array("subtitle" => "%w"));
or whatever function you want to use
;D
Thanks for the code
Can the date format be changed? Right now it reads "Added 16-Mar-2005" It would be cool if it read "Added 03/16/05"
I'm using this code:
$objCpm->cpm_viewLastAddedMediaFromAlbum(1,1,6,array("subtitle" => "<center>Added<br>%w"));
Is there a way to make it link to the gallery and not the full view of the image?
Thanks for the responce but I suck at code and have no idea how to do it. The docs dont help people like me,,
include "gallery/cpmfetch/coppermine.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_formatStats("Here is a percent sign %% There are
%f files in %c categories containing %a albums, having served %v views and getting %n comments");
$objCpm->cpm_close();
Warning: Unknown(gallery/cpmfetch/coppermine.php): failed to open stream: No such file or directory in /home/pierson/public_html/smf/Sources/Load.php(1042) : eval()'d code(31) : eval()'d code on line 1
Warning: Unknown(gallery/cpmfetch/coppermine.php): failed to open stream: No such file or directory in /home/pierson/public_html/smf/Sources/Load.php(1042) : eval()'d code(31) : eval()'d code on line 1
Warning: (null)(): Failed opening 'gallery/cpmfetch/coppermine.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/pierson/public_html/smf/Sources/Load.php(1042) : eval()'d code(31) : eval()'d code on line 1
Fatal error: Cannot instantiate non-existent class: cpm in /home/pierson/public_html/smf/Sources/Load.php(1042) : eval()'d code(31) : eval()'d code on line 2
okay... still trying to get this code to work:Quoteinclude "gallery/cpmfetch/coppermine.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_formatStats("Here is a percent sign %% There are
%f files in %c categories containing %a albums, having served %v views and getting %n comments");
$objCpm->cpm_close();
I am using Tiny Portal For SMF beta .5; using a phpbox block;
I get the following error:QuoteWarning: Unknown(gallery/cpmfetch/coppermine.php): failed to open stream: No such file or directory in /home/pierson/public_html/smf/Sources/Load.php(1042) : eval()'d code(31) : eval()'d code on line 1
Warning: Unknown(gallery/cpmfetch/coppermine.php): failed to open stream: No such file or directory in /home/pierson/public_html/smf/Sources/Load.php(1042) : eval()'d code(31) : eval()'d code on line 1
Warning: (null)(): Failed opening 'gallery/cpmfetch/coppermine.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/pierson/public_html/smf/Sources/Load.php(1042) : eval()'d code(31) : eval()'d code on line 1
Fatal error: Cannot instantiate non-existent class: cpm in /home/pierson/public_html/smf/Sources/Load.php(1042) : eval()'d code(31) : eval()'d code on line 2
Thanks for the responce but I suck at code and have no idea how to do it. The docs dont help people like me,,
Sorry, I figured if you got that far you'd be okay with the list.
Basically you have this:
$objCpm->cpm_viewLastAddedMediaFromAlbum(1,1,6,array("subtitle" => "<center>Added<br>%w"));
If you want to have it link to the gallery you just need to add another option to the array:
array("subtitle" => "<center>Added<br>%w", "imagelink" => "gallery")
So use that in your call:
$objCpm->cpm_viewLastAddedMediaFromAlbum(1,1,6,array("subtitle" => "<center>Added<br>%w","imagelink" => "gallery"));
The others on that documentation page I sent would just get added in the same way.
Happy fetching :D
PS. For some reason I am thinking that on the newer versions the default is the gallery, if not it should be!
It didnt work...Thanks for the responce but I suck at code and have no idea how to do it. The docs dont help people like me,,
Sorry, I figured if you got that far you'd be okay with the list.
Basically you have this:
$objCpm->cpm_viewLastAddedMediaFromAlbum(1,1,6,array("subtitle" => "<center>Added<br>%w"));
If you want to have it link to the gallery you just need to add another option to the array:
array("subtitle" => "<center>Added<br>%w", "imagelink" => "gallery")
So use that in your call:
$objCpm->cpm_viewLastAddedMediaFromAlbum(1,1,6,array("subtitle" => "<center>Added<br>%w","imagelink" => "gallery"));
The others on that documentation page I sent would just get added in the same way.
Happy fetching :D
PS. For some reason I am thinking that on the newer versions the default is the gallery, if not it should be!
Fatal error: Cannot instantiate non-existent class: cpm in /home/pierson/public_html/smf/Sources/Load.php(1042) : eval()'d code(31) : eval()'d code on line 2
I changed all the information to direct url address. All the other errors are gone... I have a new one now...QuoteFatal error: Cannot instantiate non-existent class: cpm in /home/pierson/public_html/smf/Sources/Load.php(1042) : eval()'d code(31) : eval()'d code on line 2
Thanks for the link... but I'm new to php code... so all that coding, got me lost and confused.
<?php
include "/gallery/cpmfetch/coppermine.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewLastAddedMediaFromAlbum(3,3,4);
$objCpm->cpm_close();
?>
That is something with the included file...the class cannot be started. Have you checked the class actually exist in the coppermine.php file? That it is not included there too?This is what he said to me.... I'm lost and I'm sorry... perhaps I should give up.
From what I am understanding and from what I was told by the developer of the tiny portal, it is a problem with this line
$objCpm = new cpm('/gallery');QuoteThat is something with the included file...the class cannot be started. Have you checked the class actually exist in the coppermine.php file? That it is not included there too?This is what he said to me.... I'm lost and I'm sorry... perhaps I should give up.
1 question here
Code: [Select]<?php
include "/gallery/cpmfetch/coppermine.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewLastAddedMediaFromAlbum(3,3,4);
$objCpm->cpm_close();
?>
but how to add windowtarget _blank
plz help
thx
yes I did do the other suggestions... I used full links, changed it to require, and added the debug... same error as reported above.
Hi,
Firstly I am a newbie to this PHP stuff, I am trying hard to grasp it.
I have installed copermine 1.3.2 onto the server and a few test images, everything works fine in in the normal coppermine pages. I plan to use coppermine to feed an HTML website with images of painting from my father (the artist). So I have started looking at Coppermine fetch (last stable release 1.1. The website test page is here..... http://www.rainbow-studios.com/cpmfetch/cftest.php
I installed as per directions however CPG is installed at the root level and the pictures are in /albums. The CFTEST page runs without code errors but the thunbnails do not appear, this is because the path to the images is incomplete, it only has //albums rather than the //www.rainbow-studios.com/albums..... etc.
Can you guide me to where I change the path to the images to include the domain name?
Thanks in advance
Sean Flood
<?php
include "./cam/cpmfetch/coppermine.php";
$objCpm = new cpm("/cam");
$objCpm->cpm_viewRandomMedia(2,2,array( "windowtarget" => "_blank"));
$objCpm->cpm_listMediaCount ();
$objCpm->cpm_close();
?>
hi guys good morning :D
well i just wondering if this code is ok. i want when click the picture open in new window like target=_blankQuote<?php
include "./cam/cpmfetch/coppermine.php";
$objCpm = new cpm("/cam");
$objCpm->cpm_viewRandomMedia(2,2,array( "windowtarget" => "_blank"));
$objCpm->cpm_listMediaCount ();
$objCpm->cpm_close();
?>
is ok? because when i go to my page i read this part of the code windowtarget = _blank .......please help and im sorry for my english is not my first lenguage! :)
Well, for those that are interested... there is a new dev version up...
This would be 1.1.6 (hereby designated lucky #13 becuase I had tooth number 13 removed from my head today and am not happy about it).
Regardless... Here are the changes:
getMediaCount now obeys approved and privacy filters
getMediaCountAddedSince now obeys approved and privacy filters
getMediaCountForAlbum now obeys approved and privacy filters
getAlbumCount now obeys approved and privacy filters
getViewCount now obeys privacy filters
Documentation slightly improved
Added %D (# days old) to subtitle and AltTag options
This allows you to set subtitles and alttags like so:
"Added %D days ago" which gives "Added 105 days ago"
Added in cpm_setDateFormat to allow some very flexible date formatting
Where to begin... this allows you to set the way the date is generated in the subtitle and alt tags when you use %w to display the date added. It basically takes anything the DATE function will take. There are maybe 20 things you can use in there. I've covered it in my readme file and online docs, so I wont do it again here. Its really cool if you don't like the default date I've chosen.
See the list online at:
To use, you just call this function after you created the object and before you call for the images. You can call it as much as you want. If you call it with no format string, it will revert back to my default.
As always, please report problems with this version... I want to release the new stable one by the end of the week (as people are still using the old stable which is... well... old)
I'm having trouble adding the new date format. I just dont know where to add this code.
cpm_setDateFormat ($_format = "")
My code:
$objCpm->cpm_viewLastAddedMediaFromAlbum(2,5,6,array("subtitle" => "<center>Added<br>%w","imagelink" => "album"));
Thanks for all your help ;DWell, for those that are interested... there is a new dev version up...
This would be 1.1.6 (hereby designated lucky #13 becuase I had tooth number 13 removed from my head today and am not happy about it).
Regardless... Here are the changes:
getMediaCount now obeys approved and privacy filters
getMediaCountAddedSince now obeys approved and privacy filters
getMediaCountForAlbum now obeys approved and privacy filters
getAlbumCount now obeys approved and privacy filters
getViewCount now obeys privacy filters
Documentation slightly improved
Added %D (# days old) to subtitle and AltTag options
This allows you to set subtitles and alttags like so:
"Added %D days ago" which gives "Added 105 days ago"
Added in cpm_setDateFormat to allow some very flexible date formatting
Where to begin... this allows you to set the way the date is generated in the subtitle and alt tags when you use %w to display the date added. It basically takes anything the DATE function will take. There are maybe 20 things you can use in there. I've covered it in my readme file and online docs, so I wont do it again here. Its really cool if you don't like the default date I've chosen.
See the list online at:
To use, you just call this function after you created the object and before you call for the images. You can call it as much as you want. If you call it with no format string, it will revert back to my default.
As always, please report problems with this version... I want to release the new stable one by the end of the week (as people are still using the old stable which is... well... old)
<div id="sidebar">
<ul>
<li>
<center><b> You are visitor number <script language="JavaScript" src="counter.php" type="text/JavaScript"></script></b></center>
</li>
<li>
<?php include (TEMPLATEPATH . '/searchform.php'); ?>
</li>
<!-- Author information is disabled per default. Uncomment and fill in your details if you want to use it.
<li><h2><?php _e('Author'); ?></h2>
<p>A little something about you, the author. Nothing lengthy, just an overview.</p>
</li>
-->
<li>
<?php /* If this is a category archive */ if (is_category()) { ?>
<p>You are currently browsing the archives for the <?php single_cat_title(''); ?> category.</p>
<?php /* If this is a yearly archive */ } elseif (is_day()) { ?>
<p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives
for the day <?php the_time('l, F jS, Y'); ?>.</p>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives
for <?php the_time('F, Y'); ?>.</p>
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives
for the year <?php the_time('Y'); ?>.</p>
<?php /* If this is a monthly archive */ } elseif (is_search()) { ?>
<p>You have searched the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives
for <strong>'<?php echo wp_specialchars($s); ?>'</strong>. If you are unable to find anything in these search results, you can try one of these links.</p>
<?php /* If this is a monthly archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
<p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives.</p>
<?php } ?>
</li>
<?php get_calendar(); ?>
<?php wp_list_pages('title_li=<h2>' . __('Pages') . '</h2>' ); ?>
<li><h2><?php _e('Archives'); ?></h2>
<ul>
<?php wp_get_archives('type=monthly'); ?>
</ul>
</li>
<li><h2><?php _e('Categories'); ?></h2>
<ul>
<?php list_cats(0, '', 'name', 'asc', '', 1, 0, 1, 1, 1, 1, 0,'','','','','') ?>
</ul>
</li>
<?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
<?php get_links_list(); ?>
<li><h2><?php _e('Meta'); ?></h2>
<ul>
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<li><a href="http://sub.domain.net/pics">Grandpa'sPhoto Gallery</a><br>
<?php
include "./cpmfetch/coppermine.php";
$objCpm = new cpm("/pics");
$objCpm->cpm_viewRandomMedia(4,1);
$objCpm->cpm_close();
?>
</li>
<?php } ?>
</ul>
</div>
I got this working and it was very easy to install but I am having problems with my side nav bar with Wordpress and the Kubrick theme staying in place in IE. Firefox it shows great. Here's my code below. Oh yea I also have a counter in PHP which had no problems. Sometimes navbar shows correctly at the top other times it'll go to the bottom. TIA. :)Code: [Select]<div id="sidebar">
<ul>
<li>
<center><b> You are visitor number <script language="JavaScript" src="counter.php" type="text/JavaScript"></script></b></center>
</li>
<li>
<?php include (TEMPLATEPATH . '/searchform.php'); ?>
</li>
<!-- Author information is disabled per default. Uncomment and fill in your details if you want to use it.
<li><h2><?php _e('Author'); ?></h2>
<p>A little something about you, the author. Nothing lengthy, just an overview.</p>
</li>
-->
<li>
<?php /* If this is a category archive */ if (is_category()) { ?>
<p>You are currently browsing the archives for the <?php single_cat_title(''); ?> category.</p>
<?php /* If this is a yearly archive */ } elseif (is_day()) { ?>
<p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives
for the day <?php the_time('l, F jS, Y'); ?>.</p>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives
for <?php the_time('F, Y'); ?>.</p>
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives
for the year <?php the_time('Y'); ?>.</p>
<?php /* If this is a monthly archive */ } elseif (is_search()) { ?>
<p>You have searched the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives
for <strong>'<?php echo wp_specialchars($s); ?>'</strong>. If you are unable to find anything in these search results, you can try one of these links.</p>
<?php /* If this is a monthly archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
<p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives.</p>
<?php } ?>
</li>
<?php get_calendar(); ?>
<?php wp_list_pages('title_li=<h2>' . __('Pages') . '</h2>' ); ?>
<li><h2><?php _e('Archives'); ?></h2>
<ul>
<?php wp_get_archives('type=monthly'); ?>
</ul>
</li>
<li><h2><?php _e('Categories'); ?></h2>
<ul>
<?php list_cats(0, '', 'name', 'asc', '', 1, 0, 1, 1, 1, 1, 0,'','','','','') ?>
</ul>
</li>
<?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
<?php get_links_list(); ?>
<li><h2><?php _e('Meta'); ?></h2>
<ul>
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<li><a href="http://sub.domain.net/pics">Grandpa'sPhoto Gallery</a><br>
<?php
include "./cpmfetch/coppermine.php";
$objCpm = new cpm("/pics");
$objCpm->cpm_viewRandomMedia(4,1);
$objCpm->cpm_close();
?>
</li>
<?php } ?>
</ul>
</div>
Can you do time sisce added? (This image was added 1 hour and 23 minutes ago. And if it's days later (3 days 4 hours and 32 minutes ago)
Also ;D This gallery was updated 6 days 2 hours and 15 minutes ago.
Can you do time sisce added? (This image was added 1 hour and 23 minutes ago. And if it's days later (3 days 4 hours and 32 minutes ago)
Also ;D This gallery was updated 6 days 2 hours and 15 minutes ago.
<li><a href="http://sub.domain.net/pics">Grandpa'sPhoto Gallery</a><br>
<?php
include "./cpmfetch/coppermine.php";
$objCpm = new cpm("/pics");
$objCpm->cpm_viewRandomMedia(4,1);
$objCpm->cpm_close();
?>
</li>
vuud thanks for the help. It looks like there is something in the code below making my nav bar go crazy. It also made some of my other Wordpress hacks not display properly.Code: [Select]<li><a href="http://sub.domain.net/pics">Grandpa'sPhoto Gallery</a><br>
<?php
include "./cpmfetch/coppermine.php";
$objCpm = new cpm("/pics");
$objCpm->cpm_viewRandomMedia(4,1);
$objCpm->cpm_close();
?>
</li>
I was able to get CFIMAGEGET to work with no problems but is there a way to have more random images show like it use to with the code above? I tried entering more <img src> but the same photo shows. Any way to get the photo to link to the actual photo in Coppermine?
* You could try adding a different garbage parameter onto each one cfimageget.php?number=1 ,cfimageget.php?number=2
Both of those try to trick the browser into thinking it is calling something different each time. Have not tried either of them, but seem like they may work.
Quote* You could try adding a different garbage parameter onto each one cfimageget.php?number=1 ,cfimageget.php?number=2
Both of those try to trick the browser into thinking it is calling something different each time. Have not tried either of them, but seem like they may work.
Was able to have this show random images. I just linked the images to the gallery home page.
I am using CPMFetch on my homepage at www.animationcorner.com, but when members upload BMP files, the thumbnail shows a red x. I check in the Coppermine gallery and the thumbnail shows up fine.
Does CPMFetch not accept BMP thumbnails? or is there a way to fix this?
Thanks,
Chop
<div id="sidebar">
<ul>
<li>
<center><b> You are visitor number <script language="JavaScript" src="counter.php" type="text/JavaScript"></script></b></center>
</li>
<li>
<?php include (TEMPLATEPATH . '/searchform.php'); ?>
</li>
<!-- Author information is disabled per default. Uncomment and fill in your details if you want to use it.
<li><h2><?php _e('Author'); ?></h2>
<p>A little something about you, the author. Nothing lengthy, just an overview.</p>
</li>
-->
<li>
<?php /* If this is a category archive */ if (is_category()) { ?>
<p>You are currently browsing the archives for the <?php single_cat_title(''); ?> category.</p>
<?php /* If this is a yearly archive */ } elseif (is_day()) { ?>
<p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives
for the day <?php the_time('l, F jS, Y'); ?>.</p>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives
for <?php the_time('F, Y'); ?>.</p>
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives
for the year <?php the_time('Y'); ?>.</p>
<?php /* If this is a monthly archive */ } elseif (is_search()) { ?>
<p>You have searched the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives
for <strong>'<?php echo wp_specialchars($s); ?>'</strong>. If you are unable to find anything in these search results, you can try one of these links.</p>
<?php /* If this is a monthly archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
<p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives.</p>
<?php } ?>
</li>
<?php get_calendar(); ?>
<?php wp_list_pages('title_li=<h2>' . __('Pages') . '</h2>' ); ?>
<li><h2><?php _e('Archives'); ?></h2>
<ul>
<?php wp_get_archives('type=monthly'); ?>
</ul>
</li>
<li><h2><?php _e('Categories'); ?></h2>
<ul>
<?php list_cats(0, '', 'name', 'asc', '', 1, 0, 1, 1, 1, 1, 0,'','','','','') ?>
</ul>
</li>
<?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
<?php get_links_list(); ?>
<li><h2><?php _e('Meta'); ?></h2>
<ul>
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<li><a href="http://sub.domain.net/pics">Grandpa'sPhoto Gallery</a><br>
<?php
include "./cpmfetch/coppermine.php";
$objCpm = new cpm("/pics");
$objCpm->cpm_viewRandomMedia(4,1);
$objCpm->cpm_close();
?>
</li>
<?php } ?>
</ul>
</div>
vuud, can you decipher why the format of my navigation is getting screwed up?Code: [Select]<div id="sidebar">
<ul>
<li>
<center><b> You are visitor number <script language="JavaScript" src="counter.php" type="text/JavaScript"></script></b></center>
</li>
<li>
<?php include (TEMPLATEPATH . '/searchform.php'); ?>
</li>
<!-- Author information is disabled per default. Uncomment and fill in your details if you want to use it.
<li><h2><?php _e('Author'); ?></h2>
<p>A little something about you, the author. Nothing lengthy, just an overview.</p>
</li>
-->
<li>
<?php /* If this is a category archive */ if (is_category()) { ?>
<p>You are currently browsing the archives for the <?php single_cat_title(''); ?> category.</p>
<?php /* If this is a yearly archive */ } elseif (is_day()) { ?>
<p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives
for the day <?php the_time('l, F jS, Y'); ?>.</p>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives
for <?php the_time('F, Y'); ?>.</p>
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives
for the year <?php the_time('Y'); ?>.</p>
<?php /* If this is a monthly archive */ } elseif (is_search()) { ?>
<p>You have searched the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives
for <strong>'<?php echo wp_specialchars($s); ?>'</strong>. If you are unable to find anything in these search results, you can try one of these links.</p>
<?php /* If this is a monthly archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
<p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives.</p>
<?php } ?>
</li>
<?php get_calendar(); ?>
<?php wp_list_pages('title_li=<h2>' . __('Pages') . '</h2>' ); ?>
<li><h2><?php _e('Archives'); ?></h2>
<ul>
<?php wp_get_archives('type=monthly'); ?>
</ul>
</li>
<li><h2><?php _e('Categories'); ?></h2>
<ul>
<?php list_cats(0, '', 'name', 'asc', '', 1, 0, 1, 1, 1, 1, 0,'','','','','') ?>
</ul>
</li>
<?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
<?php get_links_list(); ?>
<li><h2><?php _e('Meta'); ?></h2>
<ul>
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<li><a href="http://sub.domain.net/pics">Grandpa'sPhoto Gallery</a><br>
<?php
include "./cpmfetch/coppermine.php";
$objCpm = new cpm("/pics");
$objCpm->cpm_viewRandomMedia(4,1);
$objCpm->cpm_close();
?>
</li>
<?php } ?>
</ul>
</div>
Maybe..., can you at least point me at "how" it is screwing up on a page somewhere, or provide a screenshot?
Just dumping a lot of code and asking why it is screwed up without telling how its screwed up is just a sick, demented, sick joke
Hmmm, by default it should not even grab those...
But anyway, you have to call setAllowedTypes($filterarray) to include that as a type to use. This applies to the latest dev 1.1.6 or the 1.2 stable (coming out tonight).
So you would need to call setAllowedTypes(array(".jpg",".gif",".bmp") to allow this...
So if you are using a recent version of cpmfetch, put it right in after the $cpmfetch = new cfimageget($urltocpm); line
$cpmfetch->setAllowedTypes(array(".jpg",".gif",".png",".bmp"));
Otherwise...
If that does not work, let me know
// Dont touch these. Really. Honestly. Really.
$cpmfetch = new cfimageget($urltocpm);
$cpmfetch->setAllowedTypes(array(".jpg",".gif",".png",".bmp"));
$cpmfetch->setThumbnailPrefix($thumbnailprefix);
Hmmm, by default it should not even grab those...
But anyway, you have to call setAllowedTypes($filterarray) to include that as a type to use. This applies to the latest dev 1.1.6 or the 1.2 stable (coming out tonight).
So you would need to call setAllowedTypes(array(".jpg",".gif",".bmp") to allow this...
So if you are using a recent version of cpmfetch, put it right in after the $cpmfetch = new cfimageget($urltocpm); line
$cpmfetch->setAllowedTypes(array(".jpg",".gif",".png",".bmp"));
Otherwise...
If that does not work, let me know
Thanks for taking my issue Vuud.
Just for future reference, I'm using CfmFetch version 1.1.6
Ok, so I tried adding that line in cfimageget.php as follows:Code: [Select]// Dont touch these. Really. Honestly. Really.
$cpmfetch = new cfimageget($urltocpm);
$cpmfetch->setAllowedTypes(array(".jpg",".gif",".png",".bmp"));
$cpmfetch->setThumbnailPrefix($thumbnailprefix);
Still is giving me a red x on the home page. All the thumbnails for jpeg, gif, and the standard movie thumbnails are showing up fine, but that blasted bmp. :-\\
(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.animationcorner.com%2Fmisc%2Fscreencap01.gif&hash=a77dedbc7a4afc246b6e9d552c7b6073413404e2)
Ok, so I tried adding that line in cfimageget.php as follows:Code: [Select]// Dont touch these. Really. Honestly. Really.
$cpmfetch = new cfimageget($urltocpm);
$cpmfetch->setAllowedTypes(array(".jpg",".gif",".png",".bmp"));
$cpmfetch->setThumbnailPrefix($thumbnailprefix);
Still is giving me a red x on the home page. All the thumbnails for jpeg, gif, and the standard movie thumbnails are showing up fine, but that blasted bmp. :-\\
There is an issue with that, the bmp media type is acually registered as an application so I missed it as a possible option for the software.Chopper is using ImageMagick instead of GD probably...
Anyway, how are you uploading bmp files to your coppermine server? I can upload, but they error out on the resizing so I cannot even test this.
I know exactly what the problem is... but do your bmp files have thumbnails? You dang opened a big can of worms. How did you upload them?
There is an issue with that, the bmp media type is acually registered as an application so I missed it as a possible option for the software.Chopper is using ImageMagick instead of GD probably...
Anyway, how are you uploading bmp files to your coppermine server? I can upload, but they error out on the resizing so I cannot even test this.
I know exactly what the problem is... but do your bmp files have thumbnails? You dang opened a big can of worms. How did you upload them?
Joachim
Warning: imagecreatefrompng(): './albums/edit/mHTTP_temp_b4576570.bmp' is not a valid PNG file in /virtual/users/e11543-10019/web/photos/include/picmgmt.inc.php on line 230
Question
<?php $objCpm->cpm_listMediaAddedOverLastDays(3); ?>
Aligns to the left by default..... Is there a way to center the results?
I have tried tables ect. with no luck...
Hey vuud, cpmfetch looks like a great mod/add-on, so thanks for all yer work :)
I just downloaded and installed it yesterday, and tried to test it using the the cftest.php file as per the docs. However I got a php parsing error at line 38, which was corrected by adding " ?> " on line 36, after " printHelpLink(); ". Just thought you might like to know!
cheers :)
-luke
Notice: Undefined index: DOCUMENT_ROOT in <path removed>on line 81
Notice: Undefined index: DOCUMENT_ROOT in <path removed> on line 63
Hi Vuud,
I get an error message as follows when I run cftest.php.Code: [Select]Notice: Undefined index: DOCUMENT_ROOT in <path removed>on line 81
Notice: Undefined index: DOCUMENT_ROOT in <path removed> on line 63
Any idea how I can fix this? I've searched this thread/forum to no avail.
Thanks.
Have shot you a pm:)
Its on IIS 5.0.
Thanks!
Have shot you a pm:)
Its on IIS 5.0.
Thanks!
IIS eh... bummer. Aparently it does not offer a document_root as an available option. I'll poke through your phpinfo in the morning. I think you can get around it, but its still going to look for it.
Hmmm
Any chance you could run on apache? :D
Have shot you a pm:)
Its on IIS 5.0.
Thanks!
IIS eh... bummer. Aparently it does not offer a document_root as an available option. I'll poke through your phpinfo in the morning. I think you can get around it, but its still going to look for it.
Hmmm
Any chance you could run on apache? :D
Unfortunately nope :( If its a pain its no big deal, just disappointing - it will generate the thumbnails etc, just with an error mesg! :)
I found a bug in the script I think.
If a user uses a custom thumbnail for media and it is a gif then it will display the default thumb instead of the custom thumbnail.
Ok. Thats great because I need to know :p
Also. Is there a way to make the title of an image display under it?
Would you happen to know how to make the title of an image appear under "Last additions" etc?
case 'lastup':
display_thumbnails('lastup', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false);
flush();
break;
<td class="tableb"><?php
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewLastAddedMediaFromCategory ( 1,1,6,
<div class="text bpanel">
</div>
</td>
<td class="tableb">$newcontent); ?>
I was wanting it to output html like http://www.drakeshangout.com/gallery/ but i think its beyond the limits of the script?
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewLastAddedMediaFromCategory ( 1,1,6,
<div class="text bpanel">
</div>
</td>
<td class="tableb">$newcontent); ?>
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewLastAddedMediaFromCategory ( 1,1,6,array("subtitle"=>"%c"));
I have looked through the docs quite a few times but am aparently blind. I have everything figured out now... I think.
Is this correct?
-------
$source = "cat=2,3:album=47";
-------
$objCpm->cpm_viewLastAddedMediaFromCategory (4,1,$source);
-------
Changing $objCpm->cpm_viewLastAddedMediaFromCategory (4,1,$source); to $objCpm->cpm_viewLastAddedMediaFrom (4,1,$source); Fixed the error.
will gif support in the next dev release?
I doesnt display the gifs that are used for custom thumbnails for me.
Ive got
<?php
$objCpm = new cpm('/gallery');
$objCpm->cpm_setFilter(array(".jpg",".gif",".swf"));
$objCpm->cpm_viewLastAddedMedia (4,1,$source);
?>
It still displays the default http://drakeshangout.com/gallery/images/thumb_swf.jpg and not the custom thumbnail. It works for .jpg so I dunno whats up.
???
Parse error on line 38 of cftest.php
???
Tried it two diffrent ways with all the files in just plain /
and in thier own directory /cpmfetch
got the same error runnin it both ways
Hello,
Just trying to play with CpmFetch.
CfTest.php works, after adding the ?> mentioned in an earlier post.
My problem is that I can't get to work at all.
Could you tell me what steps I need to take to be able to use cfimageget.php - what do I need to edit and in what files? I've tried many combinations! :-\\
Sorry!
Thanks in advance.
David
Vuud,
Thanks for the reply. Still no luck.
> I copied all the CpmFetch files to the server to ensure I started with a clean set.
> I changed line 25 to be $ALLOW_DIRECT_ACCESS = true;.
> I changed line 31 to reflect my Coppermine directory location relative to the root.
No other changes were made to ANY of the files within the CpmFetch directory.
I link an image tag in a HTML document to <img src="cpmfetch/cfimageget.php">. All I get is a failed image load signified by a small square with a red cross.
Any ideas where I'm going wrong?
Thanks
Thanks again for the reply.
1) Directory location is correct.
2) Tried a direct call. Still shows the little square with a red cross. Looking at the 'image' properties, the 'image' path is the 'cfimageget.php' file and not a real image.
If I add a number of '.'s in the '$urltocpm = ".../aaaaa";' definition, to force and error, it shows the following:
htdocs.../aaaaa//include/config.inc.php
I can't work out where the second / comes from in the location there.
Crazy! :D
Thanks.
David
works now... one sec and ill have it up in my block on smartor's portal
http://www.zr2nw.com
Block is on the lower right
Works great thx VUUD... any idea when you will have the option for 2 or more random pics w/ the html tags.. I tried just doubling it up but it pulls the same random pic no sweat though..
Thanks again for the reply.
1) Directory location is correct.
2) Tried a direct call. Still shows the little square with a red cross. Looking at the 'image' properties, the 'image' path is the 'cfimageget.php' file and not a real image.
If I add a number of '.'s in the '$urltocpm = ".../aaaaa";' definition, to force and error, it shows the following:
htdocs.../aaaaa//include/config.inc.php
I can't work out where the second / comes from in the location there.
Crazy! :D
Thanks.
David
Sweet!!! THX
One more question if its not tooo big of a hassle... is there any way to make those images clickable taking you to thier respective albums??
Get the new stable I just posted, or comment out the line that says
header ("Content-Length...
Aparently that has gone horrible wrong
Let me know if that works for you
Very very minor bug for you vuud, was just poking around coppermine.php to customize layout, and noticed on line 1070 you have closed the opening <th> tag with a </td>. Like I said, very minor but though you might like to know.. :D
Get the new stable I just posted, or comment out the line that says
header ("Content-Length...
Aparently that has gone horrible wrong
Let me know if that works for you
Vuud,
That's excellent! ;D It's all working now. I'm glad it wasn't just me messing it up - I tried so many combinations to try and get it to work.
Thanks for your help and support - and thanks for the mod!
David
Ok im sure this as been stated before but my computer is being stubborn this afternoon and is running extermely slow. So it would take hours to go through the 21 pages. So forgive me if this was pointed out already. I have installed the files to the filled out the cftest.php file like instructed. When i point my browser at it i get
Fatal error:Call to a member function on a non-object in home/texascam/public_html/forum/cpmfetch/comppermine.php on line 648
Any soultions. im sure thier is something i havent done and have missed, but i read the docs on the installtion and did exactly how it was stated. So help please.
Thanks
CoppermineFetch Install test page
Thank you for using CoppermineFetch...
--------------------------------------------------------------------------------
Your installation seems correct so far, you should see a small grid of thumbnails from your gallery
Fatal error: Call to a member function on a non-object in /home/texascam/public_html/forum/cpmfetch/coppermine.php on line 648
This is all the page said:Code: [Select]CoppermineFetch Install test page
Thank you for using CoppermineFetch...
--------------------------------------------------------------------------------
Your installation seems correct so far, you should see a small grid of thumbnails from your gallery
Fatal error: Call to a member function on a non-object in /home/texascam/public_html/forum/cpmfetch/coppermine.php on line 648
now besides the partialurl on the cftest.php i havent edited any other files. Are thier any other files i should edit?
<?php
// You need to change this variable to the directory that the Coppermine photo gallery is installed in.
// If you installed CPG to the root of your website, just use a /
$http//www.texascampingforum.com/gallery = "/sphotos";
?>
<html>
<head>
<title>CoppermineFetch Install Test page - version 1.2</TITLE>
</head>
<body>
<h1>CoppermineFetch Install test page</h1>
<p>Thank you for using CoppermineFetch...</p>
<hr>
<?php
error_reporting(E_ALL);
ini_set('display_errors',1); // 0 is off, 1 is on
include "./coppermine.php";
$objCpm = "";
$objCpm = new cpm( );
if ($objCpm != "") {
print "<p>Your installation seems correct so far, you should see a small grid of thumbnails from your gallery</p>";
$objCpm->cpm_viewRandomMedia(4,4);
print "<p> </p>";
$objCpm->cpm_close();
print "<p>If you do not see thumbnails, or get more warnings then something is pretty wrong. As long as you are using standard prefixes in Coppermine, you should see everything. If you are not using standard prefixes, then you need to adjust them by editing the first three variables in the coppermine.php file.</p>";
@Vuud: Maybe you should rename the variable to something else, like $cpglocation. I can see how someone might misinterpret the instructions, especially someone without PHP knowledge.
hi im sorry but im a real real idiot.. im not very pro in php
wat i want to do is to add the last 4 images into my invision2.0 board.
ive installed ur mod and tried the cftest.php and my thumbnails now.
but i dono what to do now.. how do i add the code into invision so tht it can display the images?
many thanks.
Thanks Keg, i knew i had edited it wrong, after a good nights sleep i see it clearly now how that was suppose to be edited. Unfortnately im still getting the same erros and it didnt fix it. i really appricate the help, any other idea ideas?
<?php
// You need to change this variable to the directory that the Coppermine photo gallery is installed in.
// If you installed CPG to the root of your website, just use a /
$ChangeThisToYourPartialUrlToCPG = "/gallery";
?>
<html>
<head>
<title>CoppermineFetch Install Test page - version 1.2</TITLE>
</head>
<body>
<h1>CoppermineFetch Install test page</h1>
<p>Thank you for using CoppermineFetch...</p>
<hr>
<?php
error_reporting(E_ALL);
ini_set('display_errors',1); // 0 is off, 1 is on
include "./coppermine.php";
$objCpm = "";
$objCpm = new cpm( );
if ($objCpm != "") {
print "<p>Your installation seems correct so far, you should see a small grid of thumbnails from your gallery</p>";
$objCpm->cpm_viewRandomMedia(4,4);
print "<p> </p>";
$objCpm->cpm_close();
Code: [Select]<?php
$objCpm = new cpm( );
$objCpm = new cpm($ChangeThisToYourPartialUrlToCPG);
OK good news, i did a clean install of it and edited the cftest correctly and FTP the file straight into the forum dir. instead of the whole folder into the forum dir. and it works now.
Problem im having now is it is not showing on my portal.
Well its working kinda. All im getting on my portal page is white boxes with red x's. I'll be honest im lost now, sorry. I have been reaidng the docs. and trying to figure it out, but i think im missing something. I have the actual block for the portal built, just need to get the radnom pics to show up in it. This is a great program from what im reading in the docs. Just need some help in the right direction to display the random pics.
<img src="gallery"/cfimageget.php?album=7" />
my portal is http://www.texascampingforum.com/forum/portal.php
<?php
include "./CoppermineFetch/coppermine.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>
OK thanks for the advice. I'm just trying to take the easiet approach to display random pics on my portal. Dont wanna get real fancy at the moment. I used this code in mt portal.php and still got nothing.Code: [Select]<?php
include "./CoppermineFetch/coppermine.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>
include "./coppermine.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();
Ok well i used this code and it worked, but it threw a ton or erros on my portal when i tried to replace the smartors code with this one so it would display in the ezPortalCode: [Select]include "./coppermine.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();
My idea i had didnt work so back to the drawing board...LoL Thanks for your help and patience with me.
echo '<div class="tborder"style="width: 180px;"><table border="0" width="180" cellspacing="1" cellpadding="5" style="table-layout: fixed;">
<tr>
<td class="catbg" width="100%" >ShoutBox</td>
</tr>
<tr>
<td class="windowbg2" width="100%" valign="middle" align="center" colspan="2"><div style="overflow: auto; width: 100%;">',smfshout(),'</div></td>
</tr>
<tr><td class="catbg" width="100%">Random Gallery Images</td></tr>
<tr><td width="100%" align="center">';
include "coppermine.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(6,1);
$objCpm->cpm_close();
echo'</td></tr>';
How do i go about using that code and what do i have to change in order to use that one?
@vuud
I have the following code within my BoardIndex.template file in smf forumCode: [Select]echo '<div class="tborder"style="width: 180px;"><table border="0" width="180" cellspacing="1" cellpadding="5" style="table-layout: fixed;">
<tr>
<td class="catbg" width="100%" >ShoutBox</td>
</tr>
<tr>
<td class="windowbg2" width="100%" valign="middle" align="center" colspan="2"><div style="overflow: auto; width: 100%;">',smfshout(),'</div></td>
</tr>
<tr><td class="catbg" width="100%">Random Gallery Images</td></tr>
<tr><td width="100%" align="center">';
include "coppermine.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(6,1);
$objCpm->cpm_close();
echo'</td></tr>';
and while it does return 6 random photos in 1 row. I get an sql error showing on the bottom of the forum, i am running a bridge version of smf and coppermine. Any ideas? Is it the bridging?
2: mysql_query(): 8 is not a valid MySQL-Link resource
File: /home/phantasy/public_html/forum/Sources/Subs.php
Line: 232
Thanks,
snork13
Have you made it where you can include gif custom thumbnails yet?
require_once "coppermine_dao.php";
// CHANGE THIS TO TRUE IF PEOPLE ARE ALLOWED QUERIES THROUGH HERE
$ALLOW_DIRECT_ACCESS = false;
if ($ALLOW_DIRECT_ACCESS && substr($_SERVER['SCRIPT_FILENAME'],-14) == "cfimageget.php") {
// This one you need to adjust unless your galler is at http://www.texascampingforum/gallery
// If you installed right to the root of your web site, just use a /
$urltocpm = "/gallery/";
// If no cmd= is submitted, it will do this:
$default_command = "random";
// This would allow for non-public photos to be shown if set to FALSE
$do_not_show_private = true;
// Change these only if you know what you are doing... its determines how your photos are named
$thumbnailprefix='thumb_';
$intermedprefix='normal_';
$fullsizeprefix='';
$cpmfetch = new cfimageget($urltocpm);
// $cpmfetch->setAllowedTypes(array(".jpg",".gif",".png",".bmp"));
OK im not just real sure what to edit, but here is what i did edit:Code: [Select]require_once "coppermine_dao.php";
// CHANGE THIS TO TRUE IF PEOPLE ARE ALLOWED QUERIES THROUGH HERE
$ALLOW_DIRECT_ACCESS = false;
if ($ALLOW_DIRECT_AC
CESS && substr($_SERVER['SCRIPT_FILENAME'],-14) == "cfimageget.php") {
// This one you need to adjust unless your galler is at http://www.texascampingforum/gallery
// If you installed right to the root of your web site, just use a /
$urltocpm = "/gallery/";
// If no cmd= is submitted, it will do this:
$default_command = "random";
// This would allow for non-public photos to be shown if set to FALSE
$do_not_show_private = true;
// Change these only if you know what you are doing... its determines how your photos are named
$thumbnailprefix='thumb_';
$intermedprefix='normal_';
$fullsizeprefix='';
$cpmfetch = new cfimageget($urltocpm);
// $cpmfetch->setAllowedTypes(array(".jpg",".gif",".png",".bmp"));
here is how the call is, i dont know if this is correct, if it is its not working
<img src="/gallery/cfimageget.php">
Im sooooo close now. I actually have a block built for my portal that will work with this code if i can get it working.
hi im sorry but im a real real idiot.. im not very pro in php
wat i want to do is to add the last 4 images into my invision2.0 board.
ive installed ur mod and tried the cftest.php and my thumbnails now.
but i dono what to do now.. how do i add the code into invision so tht it can display the images?
many thanks.
I don't know invision at all, but if you can edit the templates, you can probably do something by just adding in the php code
http://cpmfetch.fistfullofcode.com/projects/copperminefetch/quickstart.php
Instead of the call thats there though... use one of the last image ones shown in
http://cpmfetch.fistfullofcode.com/php-lib/showexternal.php?url=http://www.fistfullofcode.com/projects/copperminefetch/docs/readme.html
<?php
include "./CoppermineFetch/coppermine.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>
ok how about this.. how do i add into part of an existing php page?
coz the code below is meant to insert in a blank php page.Code: [Select]<?php
include "./CoppermineFetch/coppermine.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>
@vuud
I have the following code within my BoardIndex.template file in smf forumCode: [Select]echo '<div class="tborder"style="width: 180px;"><table border="0" width="180" cellspacing="1" cellpadding="5" style="table-layout: fixed;">
<tr>
<td class="catbg" width="100%" >ShoutBox</td>
</tr>
<tr>
<td class="windowbg2" width="100%" valign="middle" align="center" colspan="2"><div style="overflow: auto; width: 100%;">',smfshout(),'</div></td>
</tr>
<tr><td class="catbg" width="100%">Random Gallery Images</td></tr>
<tr><td width="100%" align="center">';
include "coppermine.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(6,1);
$objCpm->cpm_close();
echo'</td></tr>';
and while it does return 6 random photos in 1 row. I get an sql error showing on the bottom of the forum, i am running a bridge version of smf and coppermine. Any ideas? Is it the bridging?
2: mysql_query(): 8 is not a valid MySQL-Link resource
File: /home/phantasy/public_html/forum/Sources/Subs.php
Line: 232
Thanks,
snork13
It does not seem like it is a mysql error from my code... if you comment out the cpmfetch stuff do you still get the error? Strange
$ret = &mysql_query($db_string, $db_connection);
if ($ret === false)
$ret = db_error($db_string, $file, $line);
You do know that certain functions in SMF conflict with Coppermine, right? Most likely CpmFetch, which is probably use to the Coppermine database functions, is now using SMF's database functions, which are different and require different parameters.
You do know that certain functions in SMF conflict with Coppermine, right? Most likely CpmFetch, which is probably use to the Coppermine database functions, is now using SMF's database functions, which are different and require different parameters.
MySQL error!
Access denied for user: 'root@localhost' (Using password: NO)(Errno=1045)
Your query:
INSERT INTO evo_hitlog( visitTime, visitURL, hit_ignore, referingURL, baseDomain, hit_blog_ID, hit_remote_addr, hit_user_agent ) VALUES( FROM_UNIXTIME(1113071410), '', 'invalid', '', '', 2, '', '')
QuoteMySQL error!
Access denied for user: 'root@localhost' (Using password: NO)(Errno=1045)
Your query:
INSERT INTO evo_hitlog( visitTime, visitURL, hit_ignore, referingURL, baseDomain, hit_blog_ID, hit_remote_addr, hit_user_agent ) VALUES( FROM_UNIXTIME(1113071410), '', 'invalid', '', '', 2, '', '')
I just got cpmfetch installed & it loads a graphic just fine but I get this output at the bottom of my page. I'm using it with b2evolution. I'm sure its easy enough to input the correct username / pw but I dont know which file to edit. Coppermine Gallery works fine on its own so I know that Db is setup correctly. Any suggestions?
EDIT: only receive this error on directory open (ie; if I dont specify index.php).
Thanks in advance.
is this correct <img src="/gallery/cfimageget.php">
i have a real good feeling that its wrong. I couldnt find any real clear moron proof docs. on how to set it up...LoL
I made the changed to the file but still get nothing.
WOOOOHOOOOO it workie workie now. Thanks a lot. Do you hvae a donation link on your site?
You can see the final product at http://www.texascampingforum.com/forum/portal.php
Have you made it where you can include gif custom thumbnails yet?
Hey vuud, I've got cpmfetch working nicely using the cpm_showAlbumsUpdatedOverLastDays function (plus I added a DIV formatting thingy :) ), however I was wondering if its possible to just have a 'show last x updated albums' function (slap me if I'm missing something easy here :D ), and if such a function could include user galleries (maybe va $source?), which the current one doesn't seem to? I'm just thinking it could display album name/link with thumbnail (also link to album), date updated, and possibly number of new images added..
cheers ;D
luke
For including user galleries (Well private ones anyway)
You can always include user galleries by setting the private setting off after making your initialization call and before asking for images. From the documentation files:
cpm_unlockPrivate($bool)
This toggles access to non-public photos (default: false) It allows images not publicly available to be selected and displayed until it is turned off, or the object is lost. This program makes no distinction beyond if a media item is public or not - Meaning that photos that may be viewable by logged in users are considered private, not something in between.
As for limiting to the last 5 updated, no that is not in there right now. Sounds like a good idea though
Sorry if this is somewhat disjointed... I have this nasty headache rolling in right now
Thanks for the response vuud.For including user galleries (Well private ones anyway)
You can always include user galleries by setting the private setting off after making your initialization call and before asking for images. From the documentation files:
cpm_unlockPrivate($bool)
This toggles access to non-public photos (default: false) It allows images not publicly available to be selected and displayed until it is turned off, or the object is lost. This program makes no distinction beyond if a media item is public or not - Meaning that photos that may be viewable by logged in users are considered private, not something in between.
I gave this a go but it was returning a 'call to undefined function' error. I checked coppermine.php, and around line 169 the function listed is cpm_unlock_private ($bool) (note case change and extra underscore). I changed the name and it stopped returning errors, but I don't have any private albums so I'm not sure if it was working (I'm not a programmer so I'm just guessing here :) ).
Anyway, I should have been clearer in my post before - I'm using cpm_showAlbumsUpdatedOverLastDays , but its returning only the albums which appear under the main category structure, not (public) user galleries which have been updated. However, the number given for total number of images added over x days does include user galleries, which is a bit of a discrepancy. So, to give you an example, for me cpm_showAlbumsUpdatedOverLastDays is currently returning 3 updated albums, with 5, 1, and 1 new images respectively. However, it also says "13 new images have been added since ..." which is true since 6 new images have been added to user galleries (6+7=13), but these albums don't appear in the album list, but it would be good if they could! :DQuoteAs for limiting to the last 5 updated, no that is not in there right now. Sounds like a good idea though
Thanks, it would be really handy when albums are updated sporadically, as with last x days you might have 10 in the list sometimes, and 0 other times. For users I think it would be handy to just always see a consistent "last x albums" or whatever instead.QuoteSorry if this is somewhat disjointed... I have this nasty headache rolling in right now
No worries at all I totally understand, I hope I was a bit clearer too! :D
luke
I've gone and inserted mu cpmfetch code into an SMF template and everything seems to work as I would expect. if anyone is having / or had problems with SMF templates let me know.
The only difference I have found so far is that I cannot call the cpm_close() - since it apparently wreaks havoc with the existing database connection.
Basically that just shuts down the database connection anyway, and if the software is using the same one thats something to not worry about.
:D
Hmmm, one note: My coppermine and SMF tables are in the same database. Wonder what would happen if they were in different ones...
I've gone and inserted mu cpmfetch code into an SMF template and everything seems to work as I would expect. if anyone is having / or had problems with SMF templates let me know.
The only difference I have found so far is that I cannot call the cpm_close() - since it apparently wreaks havoc with the existing database connection.
Basically that just shuts down the database connection anyway, and if the software is using the same one thats something to not worry about.
:D
Hmmm, one note: My coppermine and SMF tables are in the same database. Wonder what would happen if they were in different ones...
@vuud
I should remove the cpm_close() call and it should work? Great news!!!
I do have coppermine and smf in the same database. I'll give it a try tonight
thanks,
snork13
vuud,
imo it's time to start a separate sub-board dedicated to cpgFetch with you as moderator. OK?
Joachim
//$objCpm->cpm_close();
worked with smf, no errors. I know many smf/coppermine users who will be super happy, GREAT WORK!
thanks
snork
vuud,done
imo it's time to start a separate sub-board dedicated to cpgFetch with you as moderator. OK?
Joachim
Ok by me... Just let me know what I am supposed to doHehe, no: making you a moderator give you the power to change the message icon of postings/threads ("solved" / "invalid" etc.) and to make them both sticky / super sticky / non-sticky as well as locking/unlocking them. You can split postings from threads and merge them as well. And of course, you can modify all postings within this sub-board (e.g. to hide an admin password if a user should post it accidentally or to display a "not worksafe" warning next to a link).
Do I get a key to the executive washroom? :D
I really like CPMFetch. However, I do wanna say 1 negative thing. This thread is so long that it is really hard to find answers. I do use the search engine, but that is only a go way to get in the right area most of the time. Since this thread is 24 pages long, that is a big area ;).
Any who....
I have modified my PHP-nuke's module NEWS' articles.php file to display 4 blocks (normally not there); 2 for ads, 1 for random pictures only, and 1 for random movies only. They all look and work great with 1 exception, the random movies link.
I am using NukeWrap to pull the movies from my stand alone coppermine into my PHP-nuke site. There in lies the problem. The link that is generated for the random movie thumbs is missing the NukeWrap.
Here is the link I am getting: "http://exposurestudio.com/members/modules/movies/displayimage.php?pos=-9" // works just not being pulled into site
Here is the link I would like to get: "http://exposurestudio.com/members/modules.php?name=NukeWrap&page=modules/movies/displayimage.php?pos=-9"// would work better
(This is an Adult web site I am using it on, so if you need to see it in action or something like that, let me know, I can set you up a temp user and pass)
I have looked at the code and here but not really sure how the link is set up. Any help or points in the right direction will be greatly appreciated.
function createlink($filepath, $filename, $aid, $pos, $imagelink="int") {
$link= $this->partialUrltocpm;
//if (array_key_exists('imagelink',$this->optionHash)) $imagelink = $this->optionHash['imagelink'];
if ($imagelink == 'album' || $imagelink == 'thumb') {
$link .= 'thumbnails.php?album=' . $aid;
} elseif ($imagelink == 'int') {
$link .= 'displayimage.php?pos=-' . $pos;
} elseif ($imagelink == 'large') {
$link .= 'albums/' . $filepath . $filename;
} elseif ($imagelink == 'none') {
$link = '';
} else {
$link .= 'displayimage.php?pos=-' . $pos; // This is where I need to edit the code to change the link
}
return ($link);
} //end function
$link .= 'displayimage.php?pos=-' .$pos;
.$link = 'modules.php?name=NukeWrap&page=modules/movies/displayimage.php?pos=-' .$pos;
thank you...
this a beautiful addition to coppermine....just thought I would put that out there ;)
also, I felt it necessary to point out the poignant banner on your site:
very cool 8)
peace
Is there a way to show the newest photos with cfimageget no matter what albums they are in?
But of course!
Well, you can show the newest one... cfimageget is really only for getting one image
I will check and let you know what the syntax is
EDIT: The syntax to do it is to add the parameter cmd=last to the call
If you don't specifiy any other albums or cats it should default to everything
Thanks vudd for the info. You helped me in this (http://forum.coppermine-gallery.net/index.php?topic=13255.msg76378#msg76378) post to get mulitiple images to show with cfimageget but how do I add that syntax to the url? TIA. :)
Sorry vuud for the spelling mistake ;D I got that part but what do I use to get the newest images?
Sorry to sound like a dummy but can you give me an example of what to add and where to put it?
I realize now that last is a bit confusing... the original thought was like "show last added".
<a href="http://domain.com/pics"><img src="http://domain.com/cpmfetch/cfimageget.php?number=1" border="0"></a>
<br>
<a href="http://domain.com/pics"><img src="http://domain.com/cpmfetch/cfimageget.php?number=2" border="0"></a>
<br>
<a href="http://domain.com/pics"><img src="http://domain.com/cpmfetch/cfimageget.php?number=3" border="0"></a>
<br>
<a href="http://domain.com/pics"><img src="http://domain.com/cpmfetch/cfimageget.php?number=4" border="0"></a>
<br>
<a href="http://domain.com/pics"><img src="http://domain.com/cpmfetch/cfimageget.php?number=5" border="0"></a>
<a href="http://domain.com/pics"><img src="http://domain.com/cpmfetch/cfimageget.php?cmd=last" border="0"></a>
Yes, last added are the one's I want to show meaning the newest photos uploaded. I added this added this but the last added photos are not showing. I want to show 3 of the most recent photos and 3 random images. Is this possible? This is the code I have below:Code: [Select]<a href="http://domain.com/pics"><img src="http://domain.com/cpmfetch/cfimageget.php?number=1" border="0"></a>
<br>
<a href="http://domain.com/pics"><img src="http://domain.com/cpmfetch/cfimageget.php?number=2" border="0"></a>
<br>
<a href="http://domain.com/pics"><img src="http://domain.com/cpmfetch/cfimageget.php?number=3" border="0"></a>
<br>
<a href="http://domain.com/pics"><img src="http://domain.com/cpmfetch/cfimageget.php?number=4" border="0"></a>
<br>
<a href="http://domain.com/pics"><img src="http://domain.com/cpmfetch/cfimageget.php?number=5" border="0"></a>
I tried entering the following code below but the newest photo did not showCode: [Select]<a href="http://domain.com/pics"><img src="http://domain.com/cpmfetch/cfimageget.php?cmd=last" border="0"></a>
* @version $Revision: 1.1 $
<a href="http://domain.com/pics"><img src="http://domain.com/cpmfetch/cfimageget.php?cmd=last" border="0"></a>
I'm not sure if this is the version I found it on line 28 of coppermine.phpQuote* @version $Revision: 1.1 $Code: [Select]<a href="http://domain.com/pics"><img src="http://domain.com/cpmfetch/cfimageget.php?cmd=last" border="0"></a>
I entered the code above and it showed an old image not the newest one. This is added on a PHP file on the same server and the site is the same. I am not using copperminefetch because the formatting of my nav menu gets screwed up in IE.
$ChangeThisToYourPartialUrlToCPG = "/gallery";
)$ChangeThisToYourPartialUrlToCPG = "/gallery";
$ChangeThisToYourPartialUrlToCPG = "/";
$ChangeThisToYourPartialUrlToCPG = "./gallery";
$ChangeThisToYourPartialUrlToCPG = "./";
$ChangeThisToYourPartialUrlToCPG = "";
$ChangeThisToYourPartialUrlToCPG = "";
I am tring to install this on my webserver, and am having NO luck.....
the test file is lacated at
http://www.scrantonprep.net/gallery/cpmfetch/cftest.php
(Its curentaly set like thisCode: [Select]$ChangeThisToYourPartialUrlToCPG = "/gallery";
)
My gallery is loacated at
http://www.scrantonprep.net/gallery
I have tried all off these:Code: [Select]$ChangeThisToYourPartialUrlToCPG = "/gallery";
$ChangeThisToYourPartialUrlToCPG = "/";
$ChangeThisToYourPartialUrlToCPG = "./gallery";
$ChangeThisToYourPartialUrlToCPG = "./";
$ChangeThisToYourPartialUrlToCPG = "";
Nothing has worked what am i doing wrong?
If my Particular URL =Code: [Select]$ChangeThisToYourPartialUrlToCPG = "";
The ERROR: Path to Coppermine incorrect. (/gallery//include/config.inc.php)
Goes away, but i am left with :
Fatal error: Call to a member function on a non-object in C:\PublicWeb\gallery\cpmfetch\coppermine.php on line 648
Thanks on both counts! Good to see someone who understands the banner :Dthank you...
this a beautiful addition to coppermine....just thought I would put that out there ;)
also, I felt it necessary to point out the poignant banner on your site:
very cool 8)
peace
Hello!
Everything work fine for me, but I want to "remove" the link from the pictures. If you understand..
When someone press on my pictures to get them big, they just opens in the current frame:/ I want them to open in an new page.
Sort of "target _blank"
How do I do that? Someone who can help me?
$options = array(
"windowtarget" => "_blank",
"imagesize" => "thumb") ;
$objCpm->cpm_viewRandomMedia ( 1,1,$options,array("subtitle"=>"%c"));
Hello!
Everything work fine for me, but I want to "remove" the link from the pictures. If you understand..
When someone press on my pictures to get them big, they just opens in the current frame:/ I want them to open in an new page.
Sort of "target _blank"
How do I do that? Someone who can help me?Code: [Select]$options = array(
"windowtarget" => "_blank",
"imagesize" => "thumb") ;
$objCpm->cpm_viewRandomMedia ( 1,1,$options,array("subtitle"=>"%c"));
check doc (or first post in this topic) for more on css options 8)
There are a few issues with running this on a windows server. Since I don't have access to one, and since Microsoft is a minority in the web server world, I have not really been able to fix it. I am not sure what to tell you... If you are running Apache on windows, let me know.
QuoteThere are a few issues with running this on a windows server. Since I don't have access to one, and since Microsoft is a minority in the web server world, I have not really been able to fix it. I am not sure what to tell you... If you are running Apache on windows, let me know.
I am running this on a windows 2000 Server with IIS
i have version 1.3.3 installed at this location
http://www.scrantonprep.net/gallery/cpmfetch3/cftest.php
$options = array(
"windowtarget" => "_blank",
"imagesize" => "thumb") ;
$objCpm->cpm_viewRandomMedia ( 1,1,$options,array("subtitle"=>"%c"));
Hello,
I can't get this to work in the sidebar of a Word Press template. It gives me one random picture, which is what I want, but screws up the other database calls.
I read your suggestion about not including the close command, but it just screwed up the sidebar in a different way :-[
I'm trying version 1.3.3.
Code: [Select]$options = array(
"windowtarget" => "_blank",
"imagesize" => "thumb") ;
$objCpm->cpm_viewRandomMedia ( 1,1,$options,array("subtitle"=>"%c"));
check doc (or first post in this topic) for more on css options 8)Quote
When I try this code, I get this error:
Fatal error: Call to undefined function: array_change_key_case() in c:\apache\htdocs\cpmfetch\coppermine.php on line 1161
Someone help me, please? =(
When I try this code, I get this error:
Fatal error: Call to undefined function: array_change_key_case() in c:\apache\htdocs\cpmfetch\coppermine.php on line 1161
Someone help me, please? =(
Under at least Windows XP (it should probably work for Windows 2000) you can
define a System (My Computer -> Properties -> Advanced -> Environment Variables)
environment variable called "DOCUMENT_ROOT" and point it at "C:\INETPUB\WWWROOT"
assuming you installed IIS on the C:\ drive. You have to reboot the computer
and then the $_SERVER['DOCUMENT_ROOT'] will be defined,
<h3>Random Picture</h3>
<div align="center">
<?php include "cpmfetch/coppermine.php";
$objCpm = new cpm('/pictures');
$objCpm->cpm_viewRandomMedia (1,1);
$objCpm->cpm_close();?>
</div>
Hi Vuud,
Here's the code:Code: [Select]<h3>Random Picture</h3>
<div align="center">
<?php include "cpmfetch/coppermine.php";
$objCpm = new cpm('/pictures');
$objCpm->cpm_viewRandomMedia (1,1);
$objCpm->cpm_close();?>
</div>
Deleting the headline and div doesn't make any difference. Here's a link to the screenshot ... http://www.gorey.com.au/images/word.jpg
As you can see, the Word Press database calls for "random posts" and "recent comments" are missing and a blog entry is inserted where there should be other sidebar stuff.
Here's what happens if I remove the close command ...
Yes, they're in different databases.
<head>
<style type="text/css">
img.test1 {
border-style:solid;
border-width:1px;
border-color: #000000;
margin: 2px; }
img.test1:hover {
border-style:solid;
border-width:1px;
border-color: #cccccc;
margin: 2px; }
</style>
</head>
<body>
<?php
include "/home/absolute/public_html/fetch/cpmfetch/coppermine.php";
$objCpm = new cpm("/nightlife/cpg");
$objCpm->cpm_viewRandomMedia(2,2,array("imagestyle" => "test1"));
$objCpm->cpm_close();
?>
I would like to know why my css is not working for the hover effect. It works to change border but no hover.
this is the code:Code: [Select]<head>
<style type="text/css">
img.test1 {
border-style:solid;
border-width:1px;
border-color: #000000;
margin: 2px; }
img.test1:hover {
border-style:solid;
border-width:1px;
border-color: #cccccc;
margin: 2px; }
</style>
</head>
<body>
<?php
include "/home/absolute/public_html/fetch/cpmfetch/coppermine.php";
$objCpm = new cpm("/nightlife/cpg");
$objCpm->cpm_viewRandomMedia(2,2,array("imagestyle" => "test1"));
$objCpm->cpm_close();
?>
also , how can i change the size of the images shown in fetch?
thank you.
Thanks for looking into this. The updated version is nearly there for my Word Press template!
The random photo and sidebar print fine, but for some reason I get this message across the bottom of the page:
Warning: mysql_affected_rows(): A link to the server could not be established in /home/xxxx/public_html/wp-includes/wp-db.php on line 155
I don't know if it's safe to delete that code in the wp-db.php file?
Commenting out the line in the Word Press file worked, and doesn't appear to have caused any grief elsewhere. Thanks :)
Yes, the code includes the cpm_close!
thank you for responding vuud.
You were right it was the browser. I actually use ie as a browser but have firefox installed as well but never tried it there till now. the hover effect works on there, is there a way to get it to work on ie?
AS far as sizing, i was referring to the images that i get when i call the images. for example, the images we see when running the cftest.php page. I would like them (thumbnails) to be smaller. Is the size controlled by the thumbnails from coppermine?
thanks for the help!
yes, i read a bit of the earlier posts and found the info for the dev version 1.3. i installed it and made the imagewidth adjustment with the array including imagewidth. Exactly what i needed! thanx!
i would like the hover to work on ie but its no biggie , i will research css options for that. thanx again for the help.
<style type="text/css">
.purple { color:purple;font-weight:bold }
img.text1 {
border-style:solid;
border-width:5px;
border-color: #990000;
margin: 2px; }
img.text1:hover {
border-style:solid;
border-width:5px;
border-color: #CC6600;
margin: 2px; }
</style>
<?php
include "./coppermine.php";
$objCpm = new cpm("/forum/cpg133");
$myarray = array("windowtarget" => "_blank","subtitle"=>"%c<br/>por: <b>%o</b><br/>Album: <b>%a</b>","imagestyle" => "text1");
$objCpm->cpm_viewRandomMedia(1,1,$myarray);
$objCpm->cpm_close();
?>
Hello.
First of all I feel by my low level of english, I am Spanish... I wanna put underneath my random image appeared the title, owner and album and that went links to the shown image, user profile and album. I know putting the title, owner and others. My test.phpQuote<style type="text/css">
.purple { color:purple;font-weight:bold }
img.text1 {
border-style:solid;
border-width:5px;
border-color: #990000;
margin: 2px; }
img.text1:hover {
border-style:solid;
border-width:5px;
border-color: #CC6600;
margin: 2px; }
</style>
<?php
include "./coppermine.php";
$objCpm = new cpm("/forum/cpg133");
$myarray = array("windowtarget" => "_blank","subtitle"=>"%c<br/>por: <b>%o</b><br/>Album: <b>%a</b>","imagestyle" => "text1");
$objCpm->cpm_viewRandomMedia(1,1,$myarray);
$objCpm->cpm_close();
?>
Thanks and great mod
Thanks for the answer. Yes, that is what I want, the Link to the user profile. Here it is the Link to my forum.
my forum (http://cosasdeloros.exoboards.com/)
Underneath the photos are (in bold text): the title, the owner and the album where it's upload. The title that links to the photo, the owner links to the user's profile and the album links to the album that contains the image. That is what I would like to do, but I don't know do it.
Hey vuud, this is probably already on your radar, but I noticed you can get images via pid in the latest release (iirc :) ), which reminded me of a feature request - is there any chance of stable url's (http://forum.coppermine-gallery.net/index.php?topic=5832.0) making it into cpmfetch at some stage? :)
cheers :D
-luke
hey vuud,
Im back to give a link to a coppermine displayimage page that has images with the mouseover border effect. This seems to work in IE too. Maybe this could help with the problem I encountered when applying the css of hover border where it was not supported by ie.
http://www.sortons.net/photos/tests/displayimage.htm#
Also I wanted to know if its possible to click on a fetched image and have it open on the same page instead of trying to get into the cpg console. Im trying to make photo additions as easy as ppssible and although I like the cpg script Im not sure where to start customizing it to integrate into the site. So if I have the fetch fuction and it leads to the bigger image on the same page I wouldnt need to customize.
or
Maybe you know of some good cpg customizing tuts. Anything could help. I appreciate your help.
thx
i think its cool too but unfortunately its not my work, i saw it posted in the cpg forum somewhere maybe I can talk to the guy who did it to see what he used. I know there is javascript involved. i have no idea how to even begin getting that to work.
here is a cool site I came across when searching for an answer:
http://www.456bereastreet.com/archive/200503/css_tips_and_tricks_part_1/
uodate-
I was able to get the hover border effect to work in IE but then firefox was distorted. I guess there is no easy way. The best bet is getting info on that javascript.
Hi, thanks for making this, I got it to work just fine. :) But I was just wondering...is there any way to pull the most recently added image as well as a random one? Some of the Docs pages on your site don't show up, I'm not sure if you address this there, but I figured I'd ask anyway. Thanks!!
Ahhh, I didn't see that! Thank you!
Hmmm...yes, I think I will subscribe. ;)
Actually, I am having a problem. This isn't correct, is it?
<?php
include "http://twilight-whispers.com/cpmfetch/coppermine.php";
$objCpm = new cpm('http://twilight-whispers.com/gallery');
$objCpm->cpm_viewRandomMedia (1,1);
$objCpm->cpm_viewLastAddedMedia (1,1);
$objCpm->cpm_close();
?>
I'm a real newbie at PHP (I know HTML though ;)), so excuse any glaring errors.
BTW Freesouljah... I am actually a Buddhist, generally in a Vietnamese / Mahayana tradition, currently in dharma teacher classes also - but not really locked into one way. Just thought I would throw that out there since you liked my "ad"
<a href="http://us2.php.net/manual/en/function.date.php1">documentation on Php.Net</a>
and replace with<a href="http://www.php.net/manual/en/function.date.php">documentation on php.net</a>
<img alt="foobar.jpg" title="foobar.jpg" src="/bla/whatever/thumb_foobar.jpg"/>, although it should be
<img alt="foobar.jpg" title="foobar.jpg" src="/bla/whatever/thumb_foobar.jpg" />. To achieve this, edit /cpmfetch/coppermine.php, find
function htmlTagIMG($imagefile,$extraAttributes) {
$htmlOut = '<img';
if (array_key_exists('imagestyle',$this->styleHash)) $htmlOut .= " {$this->styleHash['imagestyle']}";
if ($extraAttributes != "") $htmlOut .= " " . $extraAttributes;
$htmlOut .= " src=\"$imagefile\"" . '/>';
return ($htmlOut);
}
and replace with function htmlTagIMG($imagefile,$extraAttributes) {
$htmlOut = '<img';
if (array_key_exists('imagestyle',$this->styleHash)) $htmlOut .= " {$this->styleHash['imagestyle']}";
if ($extraAttributes != "") $htmlOut .= " " . $extraAttributes;
$htmlOut .= " src=\"$imagefile\"" . ' />';
return ($htmlOut);
}
. For better readability (although attributes don't matter in reference to html standards) I suggest putting the src attribute first and adding a border="0" attribute as well, so above code would become function htmlTagIMG($imagefile,$extraAttributes) {
$htmlOut = '<img src="' . $imagefile . '"';
if (array_key_exists('imagestyle',$this->styleHash)) $htmlOut .= " {$this->styleHash['imagestyle']}";
if ($extraAttributes != "") $htmlOut .= " " . $extraAttributes;
$htmlOut .= ' border="0" />';
return ($htmlOut);
}
var $thumbnailprefix = "thumb_";
var $intermedprefix = "normal_";
). This is not a good idea IMO: cpmfetch should do a query on coppermine's config table once it's called and use the settings made there for the thumbnail and intermediate prefixes.Here are some suggested improvements/fixes:
- wrong link to PHP manual
- Non-standards-compliant <img> tags
- No width and height attributes
- Why specify settings manually?
$_SERVER['DOCUMENT_ROOT']
ERROR: Path to Coppermine incorrect. (D:/WWW/Jakarta/sphotos//include/config.inc.php)
$this->filepathtocpm = $_SERVER['DOCUMENT_ROOT']
so it's always going to reply back with (D:/WWW/Jakarta/sphotos//include/config.inc.php)
$this->filepathtocpm = 'http://' . $_SERVER['HTTP_ROOT']
I am installing it on my organization intranet site and the cftest.php keeps giving me an error messageCode: [Select]ERROR: Path to Coppermine incorrect. (D:/WWW/Jakarta/sphotos//include/config.inc.php)
i think the problem is located in coppermind.php and coppermind_dao.php where there is a line:
I have successfully installed CPMFetch on my website with the gallery installed (guidinglightmultimedia.com). But the main page of my website is located at another url (guidinglightcity.com). I would like to show some random images to get people to visit the galleries more.
I did get the test to run successfully, but I'm not really sure how to get it to work on the other url. I have tried including cftest on the page, but the images don't show up and all the links are wrong.
What should I do?
Thanks for your help!
Cassie
I'm not sure how to check to see if I can access the database from a remote site. I'm not really that knowledgable on programming and such. I usually just follow the directions with scripts and use the message boards to troubleshoot, so I'm sorry if my questions are obvious or stupid. :P
How do I use cfimageget.php? And I thought I saw a thread that said you could use an image tag to retrieve an image, but the post was edited and didn't have instructions on how to do that...
Thanks Again!
Cassie
Error in getImageTouse: Extension (strtolower): .png File:/home/pr/public_html/renders//albums/userpics/10163/thumb_darKnight.png
Error in getImageTouse: Extension (strtolower): .png File:/home/pr/public_html/renders//albums/userpics/10163/thumb_post-10-1114549552.png
Error in getImageTouse: Extension (strtolower): .png File:/home/pr/public_html/renders//albums/userpics/10163/thumb_renderanimechick283iy.png
Error in getImageTouse: Extension (strtolower): .png File:/home/pr/public_html/renders//albums/userpics/10163/thumb_renderanimechick337gv.png
<?php
include "cpmfetch/coppermine.php";
$objCpm = new cpm('/renders');
$objCpm->cpm_viewLastAddedMedia (1,4);
$objCpm->cpm_close();
?>
hi, im using v1.2.2 of cpmfetch and i got this error yesterday:QuoteError in getImageTouse: Extension (strtolower): .png File:/home/pr/public_html/renders//albums/userpics/10163/thumb_darKnight.png
Error in getImageTouse: Extension (strtolower): .png File:/home/pr/public_html/renders//albums/userpics/10163/thumb_post-10-1114549552.png
Error in getImageTouse: Extension (strtolower): .png File:/home/pr/public_html/renders//albums/userpics/10163/thumb_renderanimechick283iy.png
Error in getImageTouse: Extension (strtolower): .png File:/home/pr/public_html/renders//albums/userpics/10163/thumb_renderanimechick337gv.png
(the thumbnail links show up under the error, but the thumnail images don't show up.)
this morning it started to work again, but now the errors are showing up yet again <_<
btw, this is the code i use:Code: [Select]<?php
include "cpmfetch/coppermine.php";
$objCpm = new cpm('/renders');
$objCpm->cpm_viewLastAddedMedia (1,4);
$objCpm->cpm_close();
?>
i read what you said before, on this forum, about this error, but it didn't help :/
oh and also, i've noticed that this error only appears on images which were uploaded after i started using cpmfetch
if (file_exists($this->fullpathtocpm . '/albums/' . $filepath . $fileprefix . $filename)) {
if ($this->fullpathtocpm . '/albums/' . $filepath . $fileprefix . $filename) {
thanks for the reply. i tried using the latest dev version but the error still shows up.
the paths are correct, i check through FTP, and the images are there. e.g. the thumb_darKnight.png image is in the 'renders//albums/userpics/10163/thumb_darKnight.png'.
i don't think i was doing anything differently, either :/
btw, here's a test page i set up with the code on there: http://www.planetrenders.net/test.php
edit: i think i've found out the problem... everytime i upload using URI/URL the error shows up, but when i use a normal file upload it works.. any ideas on how to fix this?
edit 2: i've solved the problem, lol. i had to edit the coppermine_dao.php file
it was around line 787:Quoteif (file_exists($this->fullpathtocpm . '/albums/' . $filepath . $fileprefix . $filename)) {
i changed that to this ( i just removed the 'file_exists' bracket):Quoteif ($this->fullpathtocpm . '/albums/' . $filepath . $fileprefix . $filename) {
i hope what i did was safe, everything works now anyway :). it seems as though with URI/URL uploads, the file doesn't exist all the time :S
lol yea, it sure is a strange issue.
i've looked at the permissions and i dont think there's a difference - they're pretty much all set to 666.
it could be something wrong with my coppermine, since i moved host a while ago i had to also backup my coppermine with all the files and moved it to the new host.. maybe something happened from that :-\\
you wrote: "This one of many calls you can make to the program. This displays 6 random images in 3 rows x 3 column"
but... 3x3 is 9 ;-)
hello there, VUUD!
im done playing with cfimageget and becoming ambitious. I'm trying to make my own costum made page, I cleaned your cftest page and trying to built around it. there are some limitations though there is no object command to unlock or lock back my private albums. the cftest only works with public album. will you be so kind to give me the exact code that i can copy and paste to the page im building?
i tried this but with no luck.
$objCpm->cpm_unlockPrivate(true);
would be a good idea to have a page template comes in a package. :)
thanks so much.
betan
im sorry for not being clear.
first off: thank you for being patience!!!
second: i dont know anything about php codes, im just winging it. how i do is like hit and miss and most of the time misses. ;D
here is the page (http://villacorta.us/files/myblog/?page_id=46) that im experimenting on. the picture on the top page i use imageget and the thumbnails at the bottom page i use object fetch.
my problem in object fetch iis that i can only fetch images from my public albums. i want to fetch images from my private albums as well but i cant make it work. that is a good thing about imageget everything is there.
i did try to include this function on my comand line,
$objCpm->cpm_unlockPrivate(true);
but it did not work.
what i need is if you can provide me the complete syntax to unlock my private albums. i did try to figure it out by myself thru your documentations but still didn't have any luck. sorry for being so dense. :D
again thank you,
betan
@vuud
You Rock! Great News. Thanks for all the hard work! I'll give it a try tonight.
snork13
Hi all, im new her end ave read all the post but not get my answer:(
I wanna have tha latest up load images in a plain html.... is it poseble?
Thanks
I guess he wants to pull coppermine contents on a plain html page (one that is not php-powered). If I'm correct with my guess then the answer is: not possible, unless you use some foul tricks with an iframe that points to a php-enabled page. HTML pages are static, there's no way to add dynamic content to it (well, there is limited dynamics when using JavaScript, but you can't pull stuff that require server-sided calculations).
Thanks, am happy for all help ;) And yes its a html that is not php-powered.
I need help. My site is game portal. I want my website's main page to load the latest 6 titles of the last updated or created albums, from one cathegory only (e.g. catherory 2). At present I'm doing this manually all by my own, but it takes awfully long time ( http://pszone.headoff.com - Sections "Screenshots" and "Videos"). I also wandered if it is possible before every new name of an album to apeear tha date of the update. For example:
02/05/05 Max Payne 2
06/05/05 Metal Gear Solid 3
Yes, I want just last 6 text list of albums and dates only from one categorie, thats all, but I don't know how to do that. Is there possible to put some code, becouse I am not gut with PHP. Sorry for bad english.
Try this:
<?php
include "/cpmfetch/coppermine.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewRandomMedia (1,1);
$objCpm->cpm_viewLastAddedMedia (1,1);
$objCpm->cpm_close();
?>
That will show 1 random and also the last added.
If not, let me know what it does...Hmmm...yes, I think I will subscribe. ;)
Actually, I am having a problem. This isn't correct, is it?
<?php
include "http://twilight-whispers.com/cpmfetch/coppermine.php";
$objCpm = new cpm('http://twilight-whispers.com/gallery');
$objCpm->cpm_viewRandomMedia (1,1);
$objCpm->cpm_viewLastAddedMedia (1,1);
$objCpm->cpm_close();
?>
I'm a real newbie at PHP (I know HTML though ;)), so excuse any glaring errors.
Thank you for that code. I had to add in the direct address to CPMFetch, but then it worked. However, I have to wonderfully fashionable blue link squares around my images...how would I go about eliminating them? I already set it not to in my CSS, but it does it anyway. Any suggestions? Thanks!
Ahhh, but now I've discovered another problem. Is there some way to target the link? Since there's no <a href> section to put "target="target"" into, I'm completely lost. ::)
ERROR: Path to Coppermine incorrect. (/usr/local/www/data//include/config.inc.php)
Your installation seems correct so far, you should see a small grid of thumbnails from your gallery
Fatal error: Call to a member function on a non-object in /files/home1/stez/gallery/coppermine.php on line 648
Hello,
I have to say that I'm stumped at the first hurdle, and I don't usually get stuck with installing php scripts - running cftest.php brings up an error and no thumbnails:QuoteERROR: Path to Coppermine incorrect. (/usr/local/www/data//include/config.inc.php)
Your installation seems correct so far, you should see a small grid of thumbnails from your gallery
Fatal error: Call to a member function on a non-object in /files/home1/stez/gallery/coppermine.php on line 648
I've tried variations of the directory path to attempt to make it find it, and I noticed that the test script displays a path to something like
usr/local/www/data/gallery/ rather than files/home1/stez/gallery/
and I can't see where I can change this as I'm don't understand php language. Coppermine is the latest 1.3.3 stable. I've extracted the files into the /gallery dir as well as a directory of it's own at same dir level as gallery.
It doesn't run on a windows server (as you can see, but on FreeBSD, dunno what version, and runs at least php version 4.2 (I know it's the latest version, but not php v5) with mysql admin for the db.
I appreciate the help, and looks like a fantastic idea from what I've seen from other sites :-)
Cheers,
Kyle
It looks like I'm getting the same type of error that Stez was getting.
"Your installation seems correct so far, you should see a small grid of thumbnails from your gallery
Fatal error: Call to a member function on a non-object in /home/liquidem/www/www/gallery/coppermine.php on line 687"
It should be correct. The coppermine.php file is in that location. I'm using Coppermine 1.3.3 and CoppermineFetch 1.3.5-dev. I also tried it with version 1.2.2 and got the same error.
Thanks!! I'm really excited about using this once I get it working, lol.
-Stephanie
Hey, it's no problem about the forum. Well, actually now that I look at it... yes, there are supposed to be two 'www', but it should just be
'/www/www/gallery/', not '/home/liquidem/www/www/gallery/coppermine.php'. :-[ I don't know where the '/home/liquidem' part is coming from.
Well, it seems that there is a workaround - at least for me as it's now working - but I'll leave it to the expert to explain later. :)
Good luck with yours letdotn!
Cheers vuud, excellent support and product ;-)
I need help. My site is game portal. I want my website's main page to load the latest 6 titles of the last updated or created albums, from one cathegory only (e.g. catherory 2). At present I'm doing this manually all by my own, but it takes awfully long time ( http://pszone.headoff.com - Sections "Screenshots" and "Videos"). I also wandered if it is possible before every new name of an album to apeear tha date of the update. For example:
02/05/05 Max Payne 2
06/05/05 Metal Gear Solid 3
<?php
include "./cpmfetch.php"; //Change this so it reflects your system
$objCpm = new cpm('/photos'); //Change this so it reflects your system
$objCpm->cpm_setReturnType("resultset");
$data = $objCpm->cpm_viewLastAddedMediaFrom(1000, 1000, "cat=5"); //Change cat=5 to the category(s) you want
$cnt = 0;
$albumstoshow = 6;
$arrayofalbums = array();
foreach ($data as $row) {
if (! in_array($row['aTitle'],$arrayofalbums)) {
print date("m/d/y",$row['pCtime']);
print " ";
print "<a href=\"/photos/thumbnails.php?album={$row['pAid']}\">"; //Change /photos so it reflects your system
print $row['aTitle']. "</a><br>\n";
array_push($arrayofalbums,$row['aTitle']);
$cnt++;
if ($cnt == $albumstoshow) break;
}
}
$objCpm->cpm_close();
?>
Realy thanx Vuud, it works perfect ;D http://pszone.headoff.com - Sections "Screenshots" and "Videos" ;) Thanx again!
Ok . I got it working fine on my site. The only question I have now is...
Can I make a limit to the height of the thumbnail (its 75 pixel right now but some people are submitting portriat format making the height of the thubmnail bigger, thus messing up my site layout. I tried to add the tags in coppermine.php but got errors so I know I have no clue what to do.
Besides that I give this 3 thumbs up!!!
I like those test pages - it gives me lots of ideas of what can be done with it. As I'm dog sitting tonight, I'm going to have a play with the different examples... :-)
I love this ability.... works great on my site. How would i go about formatting the category name that you can have displayed under the pic? Something like a bold and center?
vuud,
thanks... got that working. Great examples. Have you coded the ability so that there could be a line that says "X number of pics added in the last week". I see the example of listing by categories ect.. but i was trying to have just that line...
Also... i have been meaning to ask about an error that i get. Not really an error.. i get the image not found error once in awhile. I then go into the gallery and the thumbnail exists. I am not sure why it appears. Any ideas? Is there any way that a default blank image could appear if that error appears? The reason why this is a problem is because some of the filenames are very long so the message pushes my page over.
thanks again. And i really like the examples... gave me great ideas.
src="/gallery/albums/x/thumb_Tyler #2 (University Place, WA) 121904.jpg"
In one ear out the other... i keep telling family members to stop naming their files like this... no one listens... i figured it had something to do with the spaces. Thanks for you support.
In one ear out the other... i keep telling family members to stop naming their files like this... no one listens... i figured it had something to do with the spaces. Thanks for you support.
<?php
include "../cpmfetch/coppermine.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewRandomMediaFromAlbum (1,1,7, array("imagesize"=>"thumb"));
$format = '%c';
$objCpm->cpm_formatStats ($format);
$objCpm->cpm_close();
?>
What's the correct way to display a random pic from an album with the caption? Here's my current code, but it just displays a "1" everytime for the caption:Code: [Select]<?php
include "../cpmfetch/coppermine.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewRandomMediaFromAlbum (1,1,7, array("imagesize"=>"thumb"));
$format = '%c';
$objCpm->cpm_formatStats ($format);
$objCpm->cpm_close();
?>
$styleguide = array(
"subtitle" => "<span class='genmed'><center>%d<br />%o</center></span>",
"imageheight" => "112",
"alttag" => "%f, %d by: %o"
);
I am having a problem with the imageheight tag. I have the following code:Code: [Select]$styleguide = array(
"subtitle" => "<span class='genmed'><center>%d<br />%o</center></span>",
"imageheight" => "112",
"alttag" => "%f, %d by: %o"
);
Yet when the script pulls the images the height limit is not being put in the html as you can see from just looking at the source. The other two style items are showing up. You can see whats happening at http://www.felineadvice.com
I would have downloaded the lastest stable and that appears to be only 1.2.2 on your site. I downloaded 1.3.8-dev from your site but I see there is a changelog for 1.4.0 as being the latest stable release. I dont see 1.4.0 on your site. 1.3.8-dev does not have a coppermine.php script. It looks like this was replaced with cpmfetch.php and cpmfetch-dao.php. I modified my scripts to call that file instead and the forced size now works like it should.
Thanks.
P.S. When I ran the cftest.php script it said I was using 1.3.6 when I downloaded 1.3.8 and if I look at cftest.php in a text editor it says 1.3.8.
CoppermineFetch Install test page
Thank you for using CoppermineFetch...
--------------------------------------------------------------------------------
ERROR: Path to Coppermine incorrect. (/usr/local/apache/htdocs/studio//include/config.inc.php)
Your installation seems correct so far, you should see a small grid of thumbnails from your gallery
Fatal error: Call to a member function on a non-object in /home/animati/public_html/cpmfetch/coppermine.php on line 648
$ChangeThisToYourPartialUrlToCPG = "/studio";
I know this has been discussed already in this thread, but there didn't seem to be an answer posted. I'm having the same issue, where I'm getting the following error on the cftest.php page:Code: [Select]CoppermineFetch Install test page
Thank you for using CoppermineFetch...
--------------------------------------------------------------------------------
ERROR: Path to Coppermine incorrect. (/usr/local/apache/htdocs/studio//include/config.inc.php)
Your installation seems correct so far, you should see a small grid of thumbnails from your gallery
Fatal error: Call to a member function on a non-object in /home/animati/public_html/cpmfetch/coppermine.php on line 648
The name of the coppermine directory is "studio"
The variable in cftest reflects this:Code: [Select]$ChangeThisToYourPartialUrlToCPG = "/studio";
This is the link to the test page:
http://pass27.dizinc.com/~animati/cpmfetch/cftest.php
I've included phpinfo() at the top.
Any help is appreciated. Thanks.
This isn't strictly a feature request from me but more of an idea suggestion - if you fancy making your todo list longer, maybe something about displaying the comments - such as showing the last nth comments submitted?
Hi, it's me again. :) I just have a simple question that I couldn't find a answer to in the docs. Is there any way to have a text statistic say when you last added content? Thanks!!
Hi, it's me again. :) I just have a simple question that I couldn't find a answer to in the docs. Is there any way to have a text statistic say when you last added content? Thanks!!
<?php require("/home/jwwwazen/public_html/forum/SSI.php");
include "forum/galleria/include/config.inc.php";
include "scripts/cpmfetch/coppermine.php"; ?>
<?php $objCpm->cpm_viewRandomMedia (1,1);
$objCpm->cpm_close(); ?>
Hi,
I have my cpm fetch installed in: http://www.zenigata.it/scripts/cpmfetch/cftest.php and my coppermine installed in http://forum.zenigata.it/galleria/ (or http://www.zenigata.it/forum/galleria/
I try to include a fetch in http://www.zenigata.it/index1024_v3.php by doing this:
At top of the page I've added:Code: [Select]<?php require("/home/jwwwazen/public_html/forum/SSI.php");
include "forum/galleria/include/config.inc.php";
include "scripts/cpmfetch/coppermine.php"; ?>
and in the table I want to display random image (at lines 120 and 121):Code: [Select]<?php $objCpm->cpm_viewRandomMedia (1,1);
$objCpm->cpm_close(); ?>
...but I have this error message:
Fatal error: Call to a member function on a non-object in /home/jwwwazen/public_html/index1024_v3.php on line 120
What's wrong?
Thanks
include "./scripts/cpmfetch/coppermine.php";
$objCpm = new cpm('/galleria');
$objCpm->cpm_viewRandomMedia (1,1);
$objCpm->cpm_close(); ?>
There is a minor typo/bug in the HTML output generated by one of the cpmfetch calls, as follows:
In cpmfetch.php : cpm_listMediaAddedOverLastDays(), there is a closing double-quote missing from the width attribute of the table. That is, line 1108 (I think) should be:
$htmlOut .= $this->htmlTagTABLE('width="80%"');
vuud - your example on the test page is not quite what I meant. An example of what I meant might perhaps generate a result that looks like this in the output:
32 comments were added in the last 90 days.
Similar to your lastAddedMedia object call...:
23 items were added to the gallery in the last 90 days.
Just a thought really.. nothing more!
Now, I've installed your latest dev (1.38 last time I checked, seems to be a new one out every week ;) )... and I've put it on a new php host (my isp has decided to upgrade their cgi servers where dynamic scripts are hosted) and I sometimes get an error when using cfimageget.php (still using C_DOCUMENT_ROOT fix).
<br />
<b>Warning</b>: fopen(/files/home1/username//gallery/albums/new_pics/weardale2-june2005/thumb_weardale_june05%20072.jpg): failed to open stream: No such file or directory in <b>/files/home1/username/cpmfetch/cfimageget.php</b> on line <b>275</b><br />
The file do exist thumb_weardale_june05 072.jpg (without the %20 onto it as above) , having checked up via ftp and I know you previously said "spaces" were ok a few posts ago to another user, but it appears to not to work in instances like above?
I hate spaces and funny symbols too but some ppl never learn. :-\\
Kind regards,
Kyle
src="/portal/gallery/albums/wpw-20050507/thumb_Emma Dressed Up as a Flower Girl for Candice & Walt's Wedding #1 (UP, WA) 050705.jpg"
Now, I've installed your latest dev (1.38 last time I checked, seems to be a new one out every week ;) )... and I've put it on a new php host (my isp has decided to upgrade their cgi servers where dynamic scripts are hosted) and I sometimes get an error when using cfimageget.php (still using C_DOCUMENT_ROOT fix).
<br />
<b>Warning</b>: fopen(/files/home1/username//gallery/albums/new_pics/weardale2-june2005/thumb_weardale_june05%20072.jpg): failed to open stream: No such file or directory in <b>/files/home1/username/cpmfetch/cfimageget.php</b> on line <b>275</b><br />
The file do exist thumb_weardale_june05 072.jpg (without the %20 onto it as above) , having checked up via ftp and I know you previously said "spaces" were ok a few posts ago to another user, but it appears to not to work in instances like above?
I hate spaces and funny symbols too but some ppl never learn. :-\\
Kind regards,
Kyle
I get an error message when trying cftest.php
CoppermineFetch Install test page
Thank you for using CoppermineFetch...
ERROR: Path to Coppermine incorrect. (/home/bymnews/public_html/sphotos//include/config.inc.php)
Your installation seems correct so far, you should see a small grid of thumbnails from your gallery
Fatal error: Call to a member function on a non-object in /home/bymnews/public_html/copperminefetch/cpmfetch/coppermine.php on line 648
I hope you can give me some advice, please let me know if you want further information.
Can you do time sisce added? (This image was added 1 hour and 23 minutes ago. And if it's days later (3 days 4 hours and 32 minutes ago)
Also ;D This gallery was updated 6 days 2 hours and 15 minutes ago.
Short answer: no
Long answer: no
Perhaps something to be added in the future. I will accept patches for this for functionality... but it has to be in %x format for the subtitles... since that way it is language independent. Also, there would have to be one for days ago, hours ago, minutes ago... it opens up a whole can of works to do it right and in a non-language dependent manner. Once you do that there is no logic in there for eliminating the days if there are 0 days...
If lots of people want this, I will do it... but otherwise I have other spots I can improve it in
Sorry
Can you do time sisce added? (This image was added 1 hour and 23 minutes ago. And if it's days later (3 days 4 hours and 32 minutes ago)
Also ;D This gallery was updated 6 days 2 hours and 15 minutes ago.
Short answer: no
Long answer: no
Perhaps something to be added in the future. I will accept patches for this for functionality... but it has to be in %x format for the subtitles... since that way it is language independent. Also, there would have to be one for days ago, hours ago, minutes ago... it opens up a whole can of works to do it right and in a non-language dependent manner. Once you do that there is no logic in there for eliminating the days if there are 0 days...
If lots of people want this, I will do it... but otherwise I have other spots I can improve it in
Sorry
Is this still no? LOL
Why did you put sphotos ? surely that should be just photos ?I didn't put sphotos. I just downloaded Copermine Fetch, about 4 d&ys ago, and followed the instructions and that is what I got.
OK, I'll download again and reinstall. It will be tomorrow as its late here and I still have a pile of work for tonight.I get an error message when trying cftest.php
CoppermineFetch Install test page
Thank you for using CoppermineFetch...
ERROR: Path to Coppermine incorrect. (/home/bymnews/public_html/sphotos//include/config.inc.php)
Your installation seems correct so far, you should see a small grid of thumbnails from your gallery
Fatal error: Call to a member function on a non-object in /home/bymnews/public_html/copperminefetch/cpmfetch/coppermine.php on line 648
I hope you can give me some advice, please let me know if you want further information.
Nibblers right - you need to edit the top of the cftest.php file...
Do yourself a favor and download the latest dev version instead. It will save you time later as the filenames have changed and the install works a bit better...
I think its 1.3.9 and its at http://cpmfetch.fistfullofcode.com
It will be a stable release in about a week so its fine for use..., unless this other program kills me first.
OK, I'll download again and reinstall. It will be tomorrow as its late here and I still have a pile of work for tonight.I get an error message when trying cftest.php
CoppermineFetch Install test page
Thank you for using CoppermineFetch...
ERROR: Path to Coppermine incorrect. (/home/bymnews/public_html/sphotos//include/config.inc.php)
Your installation seems correct so far, you should see a small grid of thumbnails from your gallery
Fatal error: Call to a member function on a non-object in /home/bymnews/public_html/copperminefetch/cpmfetch/coppermine.php on line 648
I hope you can give me some advice, please let me know if you want further information.
Well, it is great at what it does... At least I think so.
Anyway, the sphotos is the default in the cftest.php file... Look at the top of the file.
The one thing that is lacking in cpmfetch is comprehensive documentation... I forget half the stuff I added.
I have half an eye on the docbook format, which may be what I redo a nice user guide in.
Anything is possible
Nibblers right - you need to edit the top of the cftest.php file...
Do yourself a favor and download the latest dev version instead. It will save you time later as the filenames have changed and the install works a bit better...
I think its 1.3.9 and its at http://cpmfetch.fistfullofcode.com
It will be a stable release in about a week so its fine for use..., unless this other program kills me first.
Looking forward to getting it going, it sounds great! :)
Can you do time sisce added? (This image was added 1 hour and 23 minutes ago. And if it's days later (3 days 4 hours and 32 minutes ago)
Also ;D This gallery was updated 6 days 2 hours and 15 minutes ago.
Short answer: no
Long answer: no
Perhaps something to be added in the future. I will accept patches for this for functionality... but it has to be in %x format for the subtitles... since that way it is language independent. Also, there would have to be one for days ago, hours ago, minutes ago... it opens up a whole can of works to do it right and in a non-language dependent manner. Once you do that there is no logic in there for eliminating the days if there are 0 days...
If lots of people want this, I will do it... but otherwise I have other spots I can improve it in
Sorry
Is this still no? LOL
Im using this code:
$objCpm->cpm_viewLastAddedMediaFromAlbum(1,1,4,array("subtitle" => "<center>The gallery was last updated:<br>%w","imagelink" => "album"));
the problem is that you can center the text but not the image.
Is there a way to show last added date(%w) without showing an image?
I would use
$objCpm->cpm_viewLastAddedMediaFromAlbum(1,1,4,array("subtitle" => ","imagelink" => "album"));
And then use seperate code to show when the last image was added.
I tried this but I suck at coding and it didnt work...
$objCpm->cpm_formatStats(0,0,4("Last updated %w");
Do yourself a favor and download the latest dev version instead. It will save you time later as the filenames have changed and the install works a bit better...
I think its 1.3.9 and its at http://cpmfetch.fistfullofcode.com
It will be a stable release in about a week so its fine for use..., unless this other program kills me first.
$urltocpm = "/photos/";
$cpmfetch = new cfimageget($urltocpm);
$cpmfetch->setSourceString("cat=7");
$cpmfetch->getRandom();
Hi!
How do I use the cfimageget to get the 2 last photos uploaded?
Like for example the code:Code: [Select]$urltocpm = "/photos/";
$cpmfetch = new cfimageget($urltocpm);
$cpmfetch->setSourceString("cat=7");
$cpmfetch->getRandom();
What do I change in this case, to display the 2 last images upload in the gallery?
I'm puting like for example my site is: http://hilaryduff.hostingportugal.com , and the gallery is in http://hilaryduff.hostingportugal.com/fotos
so how can I show in my frontpage site the last uploaded photos...
I don't mind if is only one ... pls give me the code for one
its htm... but I have no problem in creating my site in php :)
thanks
stez sorted it ...
Thanks again Stez...
Hello!
Great Mod! However, Im trying to use the RandomMedia function and it keeps pulling only one image from my gallery (of only 3). Currently I have it set for LastAddedMedia but Id like to use the random one. Any suggestions? http://www.myspecialdog.com
Also, above this random image, Id like to say "Today's Special Dog is (nameofdog)"... how would I pull that from the database... I have nameofdog as File Title...
Kevin
well, kinda... Im using CPMFetch v. 1.2.2. Is there a newer version than that? I am using CPG 1.3.3.
Unfortuantely the people's dog's names are attached to "File Title" and not the File Name. I didnt see any tags that allow for title... only name.
is this the reason its not randomizing?
<?php
include "/home/httpd/vhosts/myspecialdog.com/httpdocs/spotlight/cpmfetch/cpmfetch.php";
$objCpm = new cpm('/spotlight');
$objCpm->cpm_viewRandomMedia ( 1, 1);
$objCpm->cpm_close();
?>
hmmm... well I upgraded to the new 1.3.9 version (which, by the way, you changed the coppermine.php to cpmfetch.php... caused some havoc on some pages but I figured it out ;D)... the random is still having the "unrandom" features... check it out
http://www.myspecialdog.com on the spotlight at the right... keep refreshing and it pulls up the same every time. This is how Ive invoked the code. Do you see any mistakes?Code: [Select]<?php
include "/home/httpd/vhosts/myspecialdog.com/httpdocs/spotlight/cpmfetch/cpmfetch.php";
$objCpm = new cpm('/spotlight');
$objCpm->cpm_viewRandomMedia ( 1, 1);
$objCpm->cpm_close();
?>
Thanks again for all your help!
I get the following error:
CoppermineFetch Install test page
Thank you for using CoppermineFetch...
ERROR: Path to Coppermine incorrect. (/home/bnowpics/public_html../public_html/galleryindex//include/config.inc.php)
Your installation seems correct so far, you should see a small grid of thumbnails from your gallery
Fatal error: Call to a member function on a non-object in /home/bnowpics/public_html/cpmfetch/coppermine.php on line 648
I HAVE edited the cftest file. My gallery is stored in the galleryindex folder (../public_html/galleryindex), this addon CPMFetch, is installed in the CPMfetch folder (../public_html/cpmfetch). I edited the path into: ../public_html/galleryindex, but it still doesn't work. What am I doing wrong ?
Hi all,
I'm so very close (I think) to doing what I really want this mod to do. Here's the URL in question:
http://www.fogpeople.org/test/test.php
Basically, the current background is a random image puller script from a directory of non-coppermine photos for testing. The thumbs in the box on the page are a currently working install of CPMFetch. On the right is a static block of what I want to be some stats about the random image pull.
I would like to able to have CPMFetch pull a single, random, full-size image and use it in the "background" declaration for the page, replacing the current random image rotator. (ultimately I'll replace the coppermine gallery with full size background images) THEN, I want to include some info about said image in the div on the page, namely the name of the uploader linked to their home page.
Is there a way to isolate the random pulls so I can just drop the particular info as a variable or something where I want? Combing the forums currently looking for an answer.
Thanks!!!
-m
I would like to able to have CPMFetch pull a single, random, full-size image and use it in the "background" declaration for the page, replacing the current random image rotator. (ultimately I'll replace the coppermine gallery with full size background images) THEN, I want to include some info about said image in the div on the page, namely the name of the uploader linked to their home page.
Is there a way to isolate the random pulls so I can just drop the particular info as a variable or something where I want? Combing the forums currently looking for an answer.
<?php
// This tells it you want the data back, not pretty html tables
$objCpm->cpm_setReturnType('resultset');
// This gets an assocative array of the 1 random image from anywhere public in the album
$data = $objCpm->cpm_viewRandomMediaFrom (1, 1, "");
// This gets the image to display...
$imagename = $objCpm->cpm->getImageToUse($data[0]['pFilepath'], $data[0]['pFilename'] ,"");
print "<img src='$imagename'>";
?>
Do yourself a favor and download the latest dev version instead. It will save you time later as the filenames have changed and the install works a bit better...
I think its 1.3.9 and its at http://cpmfetch.fistfullofcode.com
It will be a stable release in about a week so its fine for use..., unless this other program kills me first.
I have done that and changed line 5, but I still have 1 Fail
80 CPG Config file not found: /home/bymnews/public_html/public_html/photos/include/config.inc.php FAIL
I have tried various changes to the script, but I still get the error message with public_html in twice.
My latest change was to:
$testnumber = 80;
$cpgconfigfile = $_SERVER['DOCUMENT_ROOT'] . $ChangeThisToYourPartialUrlToCPG . '/photos/include/config.inc.php';
if (file_exists($cpgconfigfile)) {
OutputTestRow($testnumber, "Found CPG config file", "PASS");
Sorry to have to ask, I did try to fix it myself.Quote