forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: vuud on December 17, 2004, 10:19:07 am

Title: CpmFetch - (OLD/LOCKED) stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on December 17, 2004, 10:19:07 am
THIS THREAD HAS BEEN LOCKED... PLEASE POST TO THE NEW THREAD

http://forum.coppermine-gallery.net/index.php?topic=19564.0

Note: Stable release attached here / dev versions available at the homepage.

http://cpmfetch.fistfullofcode.com - latest info, news, development versions, tips, etc

This is a PHP object that allows you to easily display random or latest images from your coppermine gallery on external php and html pages.  It is being actively supported and developed by me.  Its simple, but I am also trying to make it as feature rich as I can without achieving bloat.  You can draw images (random or otherwise) from the entire gallery, a specific category or a single album.


:D Notifications of new releases

I added a sign up to my site for email notifications of new updates to cpmfetch.

http://www.fistfullofcode.com/projects/copperminefetch/index.php

A little ways down the page there is a signup entry.


 ??? What is this all about

Basically It takes criteria and returns tables containing thumbnails based on a row col combination you specify.  You tell it what kind of random images you want, in how many columns by how many rows (1 x 1 being a single image).  It gets the images and gives you back HTML code that displays them all.

 ??? What about private albums?  This library will not display any images that are not viewable by the world or are not in an approved state.  If you request the number of images in the gallery, it will count the private images in the number it returns. 

 ??? Reporting Problems?  Make sure you have the newest version!  Message me on this board or contact me via my website www.fistfullofcode.com (http://www.fistfullofcode.com).  Do me a favor and:


Also, try adding this to the top of your php page.  It will cause more errors and warnings to be displayed.

Code: [Select]
<?php 
error_reporting(E_ALL);
ini_set('display_errors',1);  // 0 is off, 1 is on
?>

 ??? What if its close to what you need, but not quite?.  Contact me and let me know what you think it needs.  I won't quarentee anything, but if it sounds reasonable I will probably do it.

 ??? Can I control the HTML it generates?  Currently you can control the tables and images it gives back via css settings and passing the css class to the object.  Future plans include adding titles and such.  Examples of CSS control are on the website (some are pretty cool)

Aside from images, it can also returns other data such as (note: the album names are links)

Since Friday, December 10 2004 we've added about 355 images
Category nameAlbumNew count
Haley - The early years (1999-2002)2000 Haley - the second year17 new 
  1999 Haley - the first year  69 new 
  2001 Haley - the third year   30 new
Haley, Christi and meOur furry friends 18 new
  May 2003 - Beckett Trip15 new
  Misc - Just don't fit anywhere11 new
     

More examples and downloads are here:
http://www.fistfullofcode.com/projects/copperminefetch/

Among the functions so far are stuff like this...  Many more have been added, so see the web site

Functions that return images

Functions that return textual statistics

Functions that return gallery level images and text

Functions that control this program and its behavior


Brief explanation of some of the above parameters

$albumid - is always the numerical id of the album
$catid - is always the numerical if of the category
$source - this is a new way of specifying albums and categories at the same time
$rows,$columns - the combination determine how many total to show and in what orientaion
$columns - how many columns of images to show
$options - this is an array of options (covered below)
$format - text to display interspersed with placeholders for variables



Some features are:


(http://www.fistfullofcode.com/projects/copperminefetch/css_example_2.jpg)

Example of usage:

The HTML version of the library only allows for one image to be retrieved at a time via an img tag.  To do this you simply point the image tag at the php page supplied and away you go.

Code: [Select]
img src="/cfimageget.php?category=7"
(http://www.fistfullofcode.com/php-lib/cpmfetch/cfimageget.php?category=7)
The above image was served up from my gallery via an img tag .


The following code shows how you would get 3 random images in a column from album #7
Code: [Select]
<?php 
include "../php-lib/cpmfetch/coppermine.php";
$objCpm = new cpm('/photos');
$objCpm->cpm_viewRandomMediaFromAlbum(1,3,7); 
$objCpm->cpm_close(); 
?>


A more intricate example passing some CSS info for the table is

Code: [Select]
<?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); 
?>


 ??? Boy I am impressed!  I want to send you things... money, gifts, girls, etc... how can I do this?  Well, tell you what... the Coppermine people have put probably at least 2000x more work into Coppermine.  Why not send something to them instead.  I tried finding a link on the site to send you too... couldn't - if you can't either, send a donation to the www.eff.org (http://www.eff.org) instead. 

 ??? Whats coming up in the near future for this?  There is a big list of things for the next release probably stable at the end of January 2005.  See the link off this post to the topic discussing it or see the website for the most comprehensive list
[
Any advice, comments, request for something new in it, etc... pass them on, please

http://cpmfetch.fistfullofcode.com

See the readme.html enclosed for information, etc - or available online in the docs section of the website.  Toward the bottom a list will show you what has been added to new development versions since the stable.

The version attached below is the latest stable version.  However, there are always development versions available at the web site shown above... those should always work, and sometimes have neat new features added.   I only post the latest stable version here and remove old ones.  If you need an older version, see the web site.


The downloads have been moved to the new thread.  I am removing them from here to save server space and it is also one less place I will have to update

http://forum.coppermine-gallery.net/index.php?topic=19564.msg89802#msg89802


Title: Re: php object to display stats / thumbnails / randoms / last added outside cpm
Post by: Tarique Sani on December 17, 2004, 10:21:47 am
Does this mod respect the Admin and Private settings on albums?
Title: Re: php object to display stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 17, 2004, 09:09:57 pm
Regarding the admin / private settings.  It does and does not.  I think in logical places, although I could probably be convinced otherwise.

Here is how it breaksdown.

No image will ever be counted or shown if it has not been approved

Functions that return numbers (total images in the gallery) will count private galleries images

Functions that display images will never display a gallery marked as private.  I suppose there should be an allowance on bypassing this rule, but for now it will not show anything that does not have a album.visibility = 0.

As for the admin, do you mean unapproved?  I was unsure.  If approved = NO, then things are not counted or displayed.

Hope that helps
Title: This is a better description (from my website)
Post by: vuud on December 18, 2004, 07:52:18 pm
http://www.fistfullofcode.com/projects/copperminefetch

CoppermineFetch allows you to easily display thumbnails from a Coppermine photo gallery. Out of all the web based photo galleries, I would recommend Coppermine over the rest of them. Installation is a breeze, its feature rich and works with large libraries.

CoppermineFetch allows for the easy insertion of single PHP tags into your web pages that display thumbnails from your Coppermine installation based on criteria you specify. Among the different options at your disposal you can:

    * Display the number of images in the gallery or in a single album
    * Display the number of images added since X days ago
    * Ask for any amount of images in a single call
    * Display random images from the gallery
    * Display random images from a category
    * Display random images from a specific album
    * Display the last number added for the gallery, category or album
    * Display a list of images added over past # days

CoppermineFetch creates tables to display your thumbnails, allowing for you to not worry about the handling the return data. You can also extend the main object and add your own formatting, or submit css styles and have CoppermineFetch apply them. All HTML returned is XHTML 1.0 Transitional compliant.

What about my private albums? CoppermineFetch will not display any thumbnails unless they are set to be viewable by the public. The function that returns the total number of images in the gallery will count them however. Pictures in an unapproved state are never counted or displayed.

CoppermineFetch connects to your database at the last possible moment, and releases the connection as late as possible. Since the database connections are comparatively slow, this allows the most use for the least wait.
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: n3n on December 19, 2004, 12:37:47 am
Tnx alot for this awesome mod, its just what i was searching for, i really like it that i can choose which output it gives.
i just have one problem, i just get a white page. I don't have to change any settings right ? (im a little tired)
Any tips on how to solve this problem ?

tnx
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 19, 2004, 03:24:47 am

Well, I am still working on some documentation, and as I think about it - I may have just removed some really important things from my web site that you need to know.

First) At the top of the page that you want to display you need to initialize the library by something like this:

Code: [Select]
<?php 
include 
"./config.inc.php";
include "./coppermine.php";
$objCpm = new cpm($mysql_dbname$mysql_host$mysql_username$mysql_password$cpm_mysql_tableprefix$urltocpm);
?>

In this example, the first include is just a PHP file that declares the variables,  Instead of doing that you can just put them in, but I find it easier to put them in a file (as I use this around my site alot).  The includes also have to be a correct path to the program (sorry if this is obvious to you, but its hard to determine a skill level from here). 

After that, anywhere in the php you can insert any call you want without having to do that again.  For example.

Code: [Select]
<?php $objCpm->cpm_viewRandomMediaFromCategory(1,1,7); ?>
At the end of the page, you should call the close function to close out database connections.

Code: [Select]
<?php $objCpm->cpm_close(); ?>
Mind you, if you only want to do one call on your page you can stick it all together like so:

Code: [Select]
<?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();
?>

But, if you plan on doing more than one call on a page, its best to do it the second way (that way only one database connection is created).

If that does not help, let me know...  Its pretty new, so if you have any other need that it does not fit - let me know and I can probably add it in - if it fits with my general scheme of things!


BTW: If you are unsure of your database name and such, look on your website in your coppermine directory under includes/config.inc.php - that contains all the information you need.  You could probably even just include this file and alter the variables show above.

The $urltocpm is the path a web browser takes to get to your coppermine directory,... for example, mine is http://www.fistfullofcode.com/photos - so my $urltocpm variable gets set to '/photos'

Hope this helps!








Title: CoppemineFetch - using an existing coppermine config file
Post by: vuud on December 19, 2004, 03:36:56 am
...also...

You can also use your existing coppermine config file to provide most of the information. 

Code: [Select]
<?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');
?>


*note* the '/photos' at the end should be whatever directory your coppermine is installed into.

For most people this would probably be the best way to go about things.

Happy holidays  ;D

Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: n3n on December 19, 2004, 01:21:27 pm
Tnx for the reply.
For now i just wanna have one code on my page to test it and stuff.
Still i dont get any result :( very weird.
my code:
Code: [Select]
<?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();
?>


You dont happen to see any errors right ? the test.php is in the root dir, the coppermine in the /grafflix dir

tnx
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 19, 2004, 06:17:55 pm
The code you have there looks good to me and could work, but here are some things that could be doing it.

1.  The paths you have set for your includes... they point at the the root and then graffix.  That could tell the php script to head off to the top of the drive and look for it.  Try adding a leading period to the path.  That tells it to start in the current directory.

2.  You do have this code in a .php page right?  I am working on something that will work from HTML pages, but it has less functionality and is just done prototyping

3.  Last but not least, do you have a category 7?  The code says 1 image from category 7 and unless you have one of those - you will get nothing back (since it did not find any for that).

I am thinking it is #3...  You can find out what category numbers you have by going into your coppermine programs main page and looking at the links onto the different categories.  The URL should have category=(a number).   You can always try the viewRandomMedia(1,1) to make sure thats not the problem also.

Hope that helps!  Let me know which one it was




Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: n3n on December 19, 2004, 06:49:56 pm
Tnx for the reply again.
I tried everything you said, you we're right that i didnt have a categorie 7, changed the 7 to a 9 (that DOES exist), but nothing happened.
I have the code in a php file, so that shouldnt be a problem.
I didnt really understand what you meant with "adding a leading period to the path" (although my english is ok, it isnt my native language)

Also i would like to know what the two 1's mean in front of the 7 (or the 9 in my case), i suppose that one "1" stands for a picture, but wasnt sure about the other "1" (hope this makes any sense :P)

tnx for the help
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 19, 2004, 06:56:49 pm

First the easy question:

What does the 1,1 mean.  It determines how many photos you get back - it means (rows, columns).  So if you do 2,2 - you get 4 back.  If you do 1,5 you get one row of five photos.

The leading periods are probably not it, but you can try adding them to your includes before the first slash

include "./grafflix/config.inc.php";
include "./grafflix/copperminefetch/coppermine.php";

Try the viewRandomMedia(1,1) call.

And what version of coppermine are you running?

We can do this!
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: n3n on December 19, 2004, 07:01:20 pm
aah still nothing :(

tried the ./ thing, and also tried the function. This is quite weird.
Im running version 1.3.2
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 19, 2004, 07:08:18 pm

Do you get back anything...  broken images?  Can you send me a link to the page that is displaying the nothing?
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: n3n on December 19, 2004, 08:27:03 pm
yes the page is at: http://xxx/flix.php, let me know when you got it, then i'll remove it here.

tnx

Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 19, 2004, 10:42:15 pm

Hey, I got the url, so you can remove it.

Strange that it does not show anything at all.  Can you do me a favor and post the entirety of your page here (or email it to me  bill (at) Explosivo.com

Also if you can do one more thing and try the

cpm_listMediaCount ( );

call.  It sounds like nothing in your database is matching the criteria...  Strange...

One other thing... are you setting the $urltocpm variable?  That should be the directory coppermine is installed in.

In your case it would be either $urltocpm="/grafflix" or just replace it in the command with '/grafflix'


Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: n3n on December 19, 2004, 11:03:42 pm
tried all of them, just found out that i dont seem to have a config.inc.php in /grafflix, i only have a config.php there, i do have a config.inc.php in grafflix/include... changed the code to:

<?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, 'grafflix');
$objCpm->cpm_listMediaCount ( );
$objCpm->cpm_close();
?>

but still nothing :(

oh yea, thats my entire page, so dont think it will be any use to mail it :P apreciate your help btw :)
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 19, 2004, 11:09:18 pm
I think we have it this time... you have a combination of all the different ways to do it - probably due to my documentation in progress.  Change your code to this:

I am almost sure that will get you there.

Code: [Select]
<?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();
?>


Let me know!


Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: n3n on December 19, 2004, 11:15:57 pm
sorry to dissapoint you.. but still nothing :(

im starting to think that my server doesnt like it or something..
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 19, 2004, 11:21:58 pm
Do mea favor and add in

print "Test";

somewhere inside the <?php       ?> tags.

You should be getting an error or something at least! 

Strange!
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: n3n on December 19, 2004, 11:24:57 pm
got test onscreen, no error.
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 19, 2004, 11:39:06 pm
 ???

I've been trying to duplicate the error here on my test page and no matter what I do I cannot get it to do what yours is doing.  In the case of that function you should either get 1) Errors, 2) a zero if there are none.

One thing I'd like you to grab is the distrobution off my site again... The only thing I can think of is that there is some bug in there that I fixed.

http://www.fistfullofcode.com/projects/copperminefetch

Also, can you change the print "test"; to something wrong like priiiint "test"

I want to see if your PHP installation will report errors at all :)

If it does not report any errors, add in:

error_reporting(E_ALL);

just after the <?php entry
This should force errors to be displayed and perhaps that will shed some light on things



Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: n3n on December 19, 2004, 11:55:04 pm
still not getting errors
think im gonna change some settings in php.ini
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 19, 2004, 11:57:01 pm
I updated the post above again with a suggestion to try

error_reporting(E_ALL);

Not sure if you saw it.

Also in the php.ini you will want

display_errors = On
(from what I read)

If you insert a phpinfo(); into your page I can help you look

Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: n3n on December 20, 2004, 12:02:05 am
yea i saw it, didnt do anything :( this is so weird, all other scripts seem to run fine
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 20, 2004, 12:05:50 am

Can you add in the phpinfo() so I can look at it?

Was the error reporting off?
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 20, 2004, 12:12:23 am
Your display_errors is set to off.

That could be hiding what the problem is
Otherwise we have the same php version
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: n3n on December 20, 2004, 12:13:37 am
turned on error reporting now, couldnt get the phpinfo to work when the other code was in the file, flix.php now only contains
the phpinfo tag
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 20, 2004, 12:14:59 am
Great, lets try the original code in there!
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: n3n on December 20, 2004, 12:19:32 am
checkout test.php, put this code in there and getting weird output.

Code: [Select]
<?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();
?>


Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 20, 2004, 12:23:50 am
Your back to the original set... you need to change to the other parameters I gave you a few posts back.  The ones you are using are if you want to define your own... the coppermine include/config.inc.php uses different ones:

$objCpm = new cpm($CONFIG['dbname'], $CONFIG['dbserver'], $CONFIG['dbuser'],$CONFIG['dbpass'], $CONFIG['TABLE_PREFIX'], '/grafflix');

At least we are seeing errors now!
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: n3n on December 20, 2004, 12:37:42 am
gettint this error, just changed my password for security reasons :P

Code: [Select]

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
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 20, 2004, 12:47:22 am
Do you have a password in your includes/config.inc.php assigned to $CONFIG['dbpass'] ?

It looks like that is what is failing... although your gallery still works, so that should not be it

And you have the newest one from my site right?
 

Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: n3n on December 20, 2004, 12:49:30 am
yea i got a password in the include/config.inc.php file, the correct password aswell :P

Yup, just downloaded the last version from your website, so that should be ok :)

Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: n3n on December 20, 2004, 01:05:13 am
gonna turn in.

spreek to you later, tnx for the help
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 20, 2004, 01:06:14 am
Alright, I think its a windows / odbc issue with the call. I will come up with some way to test it'
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: Nibbler on December 20, 2004, 01:21:09 am
You wouldn't be putting actual values into the $CONFIG bits would you? ie. $CONFIG['localhost'], $CONFIG['root'] ...
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 20, 2004, 01:34:51 am
gonna turn in.

spreek to you later, tnx for the help

Okay, here are a few things to try.  Add a new php page and use this for the content:

Code: [Select]
<?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));
?>


Make sure that you fill in the variables with the correct data.  If this works, then change your other test.php page to pass the exact values (replace all the variables with the actual information) - like 'localhost' instead of $CONFIG['dbhost'] or whatever.

I am convinced something is not reading right.  If that works, please post a copy of your config.inc.php with the password XXXXX'd out

I hope something here works!
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: n3n on December 20, 2004, 01:41:36 am
(still awake for a sec)

got this output with your code

Code: [Select]
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

my config.inc.php:

Code: [Select]
<?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_';
?>


Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 20, 2004, 01:48:27 am

whoops.  Take out the $this->dbname and replace it with $dbname

but that all means the other part was working...

Try the changes to the test.php with the real variables....




Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: n3n on December 20, 2004, 11:10:50 am
new cpm('coppermine', 'localhost'

did it like that and so on, is that what you meant ? got a whole load of errors with that.
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 20, 2004, 06:11:20 pm
new cpm('coppermine', 'localhost'

did it like that and so on, is that what you meant ? got a whole load of errors with that.


No, that line should now read

$objCpm = new cpm('coppermine', 'localhost', 'root','XXXXXXXX', 'cpg132_', '/grafflix');

You need to replace the XXXX with your password (inside the quotes).  Otherwise the error I am seeing on test.php is some sort of syntax error.  If you do the above then please post the exact code you have again. 
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: n3n on December 20, 2004, 07:16:36 pm
ooh, major breakthrough, got a pic :D still getting few error lines though, checkout test.php
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 20, 2004, 07:28:26 pm

Okay, thats probably something I need to fix on this end.  I have a few other things I need to take care of and then I will fix that and let you know to update to it.

I am thinking I had the error levels too high on my test box so I did not get those... my bad.

Glad to see you are getting pics!  Brings me great joy and relief.

 ;D

Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: n3n on December 20, 2004, 07:54:55 pm
Yea me too, tnx alot for all the help, and happy holidays !

Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 20, 2004, 08:19:39 pm
okay, there is a new version up on the site that eliminates all the errors,  my bad.

give that a whirl....

Since your thumbnails are so small, would you like to have an option to show normal size instead of just thumbnails?

Have a nice day

 ;D
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: n3n on December 20, 2004, 09:21:50 pm
Yea that would be a nice function :D

tnx for the new version, gonna test it right away
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 20, 2004, 10:16:29 pm

Okay, I have a few things I want to roll into a new version... That will be one of them then.

In the one you downloaded there is another file called cfimageget.php - that one is there so that you can get a random image from an html page via the img tag

<img src="url/cfimageget.php" />

But its only good for one image at a time and the code is still very *new*.

It will probably be a day or two, but I should have the new featues worked out and documented.  Plan is also to change the stylehash to an optionshash - that can contain style information amongst neat new features.

More on this later

Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: n3n on December 21, 2004, 01:20:34 am
tnx for the new version, tested it and get 0 errors with all_error enabled in php.ini :)

also gonna give the html thingie a try, first finding out how to position the images on a page.
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: peeps on December 21, 2004, 02:09:41 am
It seems to work if I comment out this line:

Code: [Select]
header ("Content-Length: " . filesize($filetoget));
As soon as I uncomment, I just get a broken image (red x).

Also, it seems to display a broken image (red x) when it trys to display a pic from a private gallery...

http://www.philpeeps.com/wp/test.php

refresh it a bunch and you will see what I mean.

It would also be helpful to allow it to be a link to that picture.....
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 21, 2004, 03:13:12 am

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




Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: peeps on December 21, 2004, 03:22:38 am

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
IMO, I think if it tries to get a private image, it should loop until it gets a public image.

Currently, I have a script outside of cpg that returns an image with a link to that image but does not obey album permissions, so I am very intersted in getting yours to work....

Keep it up!
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 21, 2004, 04:22:36 am

Oh no, you misunderstand me...  The only way to get into the situation of getting a private image is if you specifically request an album id that is private.  The queries it does will never return any image from a private album... no way no how.

As for returning a link, I am not sure how to do this.  The normal php calls can do this easily, but from a straight html page I don't know if it is reliably possible.

Hmmmm

What kind of media do you have in your gallery?  just jpg mostly?
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: peeps on December 21, 2004, 04:44:31 am
just jpeg and 1 video....

wonder why i get the broken images if it cannot request private galleries....

my code is the minimum....

Code: [Select]
<img src="http://www.philpeeps.com/gallery/CoppermineFetch/cfimageget.php" />
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 21, 2004, 08:57:54 am
I did some more work on it tonight and posted a dev version for you to download.  There are a few things you should know.

Download from here:
http://cpmfetch.fistfullofcode.com
(Look for the lastest dev version in the download area)
[this has been edited due to a broken link from here]

I was not able to reproduce the error here, but I have only jpegs.  I will try putting in some videos and filtering them out.  The code is simple, so I am guessing that it is getting your video. 

The version of cfimageget.php has a new var named $debug at the top.  When set to true, it will attempt to create a file in the same directory each time it serves an image.  I had to change my file perms to allow it on my server, so if you get it on yours then please relax the file permissions temporarily in that directory.

Once installed, keep hitting the code until you get the broken image.  Then look in the file:  "cfimageget.last" I think that was the name anyway.  it should have a line of data in it (only one) with the extention and then the file it tried to serve.  let me know what that was.

Sorry for the issues, but the code is really new and I am still getting over it.

Also, the default if you dont request a size now is the thumbnail size. 

Bill



Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 21, 2004, 09:00:50 am
Yea that would be a nice function :D

tnx for the new version, gonna test it right away

The development version now will take an extra parameter in the stylehash called imagesize.  That can be:

thumb, int, large

It will cause the program to return back a larger or really big image.

Here is an example

<?php
   $styleguide = array(
      "alttag" => "One of the last photos submitted",
      "imageSIZE" => "large");

$objCpm->cpm_viewRandomMedia(1,1,$styleguide);
?>

Download from here:
http://cpmfetch.fistfullofcode.com  - look in the download section
You can play with it if you want or wait till its all done.

See ya

Bill
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: tedd on December 21, 2004, 09:55:10 am
Heyy, when i'm jusing your code for the random image or any other code im getting this error:
Code: [Select]
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"
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: cxprod on December 21, 2004, 10:10:17 am

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
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: n3n on December 21, 2004, 10:39:56 am
tedd checkout the new version he posted on his website, it doesnt give any errors.
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: n3n on December 21, 2004, 10:44:09 am
and vuud, tnx for the work, gonna give it all a go when im done with school.
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: tedd on December 21, 2004, 11:06:55 am
indeed, no errors anymore.

now i see nothing  ???  :-\\
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 21, 2004, 04:56:39 pm
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"

Well, I am not sure why it would give XX pictures.  If xx is a number than it is correct.

There is no functionality to do the other line, but it does not seem like it would be hard to do.  I will poke at it later when I get bored with my normal work.  I like the idea anyway.
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 21, 2004, 05:01:36 pm
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 :)


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
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 21, 2004, 05:04:07 pm
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

Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: peeps on December 21, 2004, 07:41:15 pm
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


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.
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 21, 2004, 09:55:25 pm


Quote
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.
Quote


 ??? Thats strange, but not inconceivable... Being on linux I tend to avoid spaces.  Well, there is only one place that could be causing a problem.  I will tinker with it today.   

I was able to recreate the getting a bad image for other media types.  I am deciding on if it should return the media type icon versus not allowing those to come up at all and only selecting image files.

Ah well.  Hopefully tonight I can get this resolved.
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 22, 2004, 01:38:40 am
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
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: peeps on December 22, 2004, 01:45:31 am
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
Code: [Select]
[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....

The change in line #'s is when I switched to your new code....
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 22, 2004, 04:44:29 am
Quote
As you can see, all failures have a space in the filename....

You do make a compelling case on that.  Its strange that the read is executing as a url though, as I believe it should be referring to it as a file://....  Anyway, the spaces may be what causes the problem in that case as they are not encoded (or appear to be).

I coded in a more direct way of sending file contents, and it is in the test version for download.  The coding for the path to cpm has also been moved to the top as a convienence thing. 

http://www.fistfullofcode.com/projects/copperminefetch/copperminefetch-dev.tar.gz

There is also another option in php called allow_url_fopen  (boolean) which if you can, check its state.  You can do that through a phpinfo() call.

The only other difference I can see between my test cases here and there are the extra directory, but I can't see why that would matter.

Let me know how it goes...

Vuud
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: peeps on December 22, 2004, 05:20:22 am
After adding your code, this is what I get

Code: [Select]
[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

I have to add my full URL to get it to work the same that is has with an error for filenames with spaces...

Code: [Select]
[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

If I set the filename to

Code: [Select]
$filetoget = 'http://www.philpeeps.com//gallery/albums/wedding/rae_pics_our_wed/thumb_Tasha%20and%20Philip%20Wedding%20-%20228.jpg';
then it works just fine, so maybe it should search out spaces and replace with "%20" or search for spaces and exclude the files....
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 22, 2004, 05:45:41 am

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. 

If we can figure out that, then I can solve your problem pretty easily.

As for having the full url to get to the config.inc.php it looks like you have a setting wrong.  To get from where you have cfimageget installed to where your config.inc.php would be ../../gallery or just ../include ...

What kind of webserver is it, and is there anyway you can put me up a page that shows a phpinfo( ) output?  You can email me the link if you want.

Thanks much






Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 22, 2004, 07:40:14 am
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. 

Never mind all that.  I was able to recreate your problem exactly and the problem is all in the less-than-wonderful-docs

In your php file for $pathtocpm you have your website as in URL to cpm I will bet.

So you have $pathtocpm="http://www.philpeeps.com/gallery" or something similar?  Right?  Am I right?

What this should really be is the path from where the cfimageget.php file is to where the coppermine directory is.

For me on my server its $pathtocpm="../photos";

If you have the copperminefetch directory inside your coppermine directory like /gallery/CoppermineFetch/

then you could probably get away with $pathtocpm="..";

Basically it needs to be able to append /albums onto the end to show photos.

If you put the http:// in there, it floats fine all the way through the script until it tries to read the file, then the presence of http:// in the front of it triggers a reaction in php to access it the other way and we end up in unencoded space hell.

 ;D

Hope that does the trick... You should not have any http's anywhere in that script.

Yours should probably look like so:

Code: [Select]
include "coppermine_dao.php";
include "../include/config.inc.php";
$pathtocpm = "..";





Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: cxprod on December 22, 2004, 08:39:01 am
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
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 22, 2004, 08:45:09 am
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)




Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: peeps on December 22, 2004, 07:32:55 pm
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?
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 22, 2004, 08:54:50 pm
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?



Doing it that way, you will not be able to make it a link that I know of.  Unless you make the img tag a link to a specific album and then request from that album.

If you want the other way, I suggest using the main part of the code and not using the cfimageget.php if that is an option.  That actually generates all the html for you.

See the first post in here for more details, I update that often

Glad it worked  ;D

PS. yes .. means go up one, but . means this one.  So ./gallery would mean the directory gallery from where I am now





Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: peeps on December 23, 2004, 12:28:47 am
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)

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...
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 23, 2004, 05:47:00 am
I will post a note here when that is working, or I have a good development release ready.  I also updated the first post on this thread with what I hope to have done for the end of the year.

Happy holidays to all
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: snork13 on December 23, 2004, 06:36:22 am
Working good for me, i've made a few changes, nothing big..thanks

snork
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 23, 2004, 06:44:10 am
Working good for me, i've made a few changes, nothing big..thanks

snork

Good to see it worked for someone off the bat.  If you don't mind my asking, what did you change?  I'm on an improvement kick for it now and any thoughts are welcome.

I just coded in the calls for last images from an album or category.  Tinkering with the default media icons now. (neither of them are up yet)
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: Tranz on December 23, 2004, 10:59:33 am
Great job and mod, vuud. (http://tu2.net/forums/images/smiles/icon_thumbs_up.gif) I got it up on my home page. I added the filmstrip look to it.
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: blackhat on December 23, 2004, 12:53:58 pm
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 :)
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 23, 2004, 05:05:10 pm

I can try, but I am not quite sure what you mean?

vuud


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 :)
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: Titooy on December 23, 2004, 06:14:06 pm
Great mod !

(Could you numerate your packages in order to know if we have the last version?)
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: cxprod on December 24, 2004, 12:02:16 am
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)

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... 


Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 24, 2004, 01:38:37 am

Thanks!   Since there has actually been a response to this mod, I am rewriting part of it based on new needs.  By the end of this month, version 1 will be released.   I will start a formal numbering system with the release of that one (as 1.0)

The basis will be the same, but somethings will be easier, like installation.

thanks again

Great mod !

(Could you numerate your packages in order to know if we have the last version?)
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 24, 2004, 01:39:36 am
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... 

 ;D No problem.  I was able to achieve the same functionality with some mp3's and custom images.

Title: new development release - if you feel brave (0.6)
Post by: vuud on December 24, 2004, 09:45:43 am
 ;D Just in time for xmas

Version 0.6 - http://www.fistfullofcode.com/projects/copperminefetch/copperminefetch-dev.tar.gz

This is not quite everything I want to get done this year, but its enough where you can start playing with it.  In summary:

<ul>
<li>Changed stylehash is now optionhash</li>
<li>Added imagesize=[thumb,int,large] as optionhash option</li>
<li>Improved cfimageget.php program</li>
<li>Initialize by pointing to the cpm directory</li>
<li>Multimedia images returned for video, sound, etc</li>
<li>Last added media by album and category</li>
<li>Text reporting on how many added, how many comments, etc</li>
</ul>

Some really really important notes:

The biggest change, and the one that will cause you the most grief is the way the coppermine object is constructed.  The old way involved this:

   include "../photos/include/config.inc.php";
   include "./coppermine.php";
   $objCpm = new cpm($CONFIG['dbname'], $CONFIG['dbserver'],
                     $CONFIG['dbuser'],$CONFIG['dbpass'], $CONFIG['TABLE_PREFIX'], '/photos');

No more!  The new way has been reduced to this:

   include "./coppermine.php";
   $objCpm = new cpm('/photos');

Now, the parameter there is the url path to the coppermine directory.  NOT THE WHOLE URL... in my case my coppermine gallery is at http://www.fistfullofcode.com/photos.  So I just have to put /photos.  it will figure everything else out.


If you still want to do the old way (for some reason), you can do it with

$objCpm = new cpm( );
$objCpm->init( ... all the old parameters ... )

But why on earth would you want to? 

Okay, we have something for everyone here.

 ;D The Stylehash is now an option hash and takes a size argument. 
imagesize = thumb, int, large.  More options will be added to this in the future and it will become the main way to customize your returned images

I also reworked the code so the parameters you pass in are case insensitive.

 ;D Somewhat graceful handling of multimedia files.   CoppermineFetch will, when getting something other than a JPG check first for a custom thumbnail for the file, and if that does not work, it will return the default image for that file type.  This is less than perfect as if you request intermediate sized files, you still get a little thumbnail.  More work will be done on this in the future, but for now you at least get something back.  IT DOES NOT at this time take into account themed icons.  That could be coming up, if you use them, let me know and I may bump it up my list.  That would involve extra DB calls to get configuration which I refuse to do - unless absolutely need to.  I have a work around in mind, but thats coming up later.

 ;D Last added media by album or category.  By popular demand:
Code: [Select]
cpm_viewLastAddedMediaFromCategory($rows, $columns, $catid, $options="")
cpm_viewLastAddedMediaFromAlbum($rows, $columns, $albumid, $options="")

 ;D Nifty stats ouputing.  For the guy who wanted it to say 72 files in 3 albums, etc.
Code: [Select]
cpm_formatStats($format);

Format would be a string interspersed with whatever text you want and placeholders.  The following placeholders are valid at this time:

%f - file count
%a - album count
%c - category count
%v - view count
%n - comment count (note count)
%% - Escapes a percent sign. (I dont know either, it just seemed like a good idea)

This example:
Code: [Select]
$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");
outputs:

Here is a percent sign % There are 366 files in 8 categories containing 27 albums, having served 243 views and getting 0 comments

Still to do for the 1.0 release.
* Access override into private albums<br />
* Subtitles under images generated<br />
* Option to link images to album or specific image<br />
* Improved documentation<br />
* Docs on how to use this for random avatars<br />
* Added private_override as optionhash options<br />
* Limiting what kinds of media to return (not music, etc)<br />

For those of you not familiar with development releases... this means it may work really well for you, or somethings may be broken.  What tests here on my box, may not run on yours for some unknown reason.  So PLEASE send me feedback if it works fine for you, if something is strange, etc...  If I don't know about it, I cant fix it.

I also promise some usable docs!


Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: Tranz on December 24, 2004, 09:53:00 am
* 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 using specific albums.
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 24, 2004, 09:55:44 am
* 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.

Heh, its incredibly simple...  You need to get the cfimageget.php working.  Should be simple, there are only like two things in the top of the file to configure.

After that, whenever you have the option to specifiy a url for an avatar... just enter

http://www.yourwebsite.com/path/to/cfimageget.php

Thats it, a random thumbnail all the time

You can also add on ?category=3   or ?album=3 (whatever numbers you want)

I use it like that here

Me sleep now

Happy holidays



Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: Joachim Müller on December 24, 2004, 09:58:21 am
attaching your files to my posting (for future reference in case the original files go down), both the original and a zipped version.

Joachim

[edit]
removed attachments, use the attachments in the first posting on the thread for the most recent versions of the files.
[/edit]
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 24, 2004, 05:09:29 pm

Thanks much, is that something I should do with current versions?  Probably not a bad idea :)

Thanks much!
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: Joachim Müller on December 26, 2004, 10:39:15 am
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
Title: Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 26, 2004, 04:55:56 pm
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

Well, Mom alwatys told me to fit in and conform so I have no problem doing it that way :)

I will probably go with the later, since I am tied very very little to coppermine, the version scheme is not as applicable.  And most of what I tie to would not change between releases probably.

I'll keep the most up to day on the intial post using your second way... 

Thanks for coppermine!






Title: End of the year release - 0.7 - please test this out
Post by: vuud on December 28, 2004, 06:52:05 am
Okay, I have produced a test version to make sure that it works before I give it the big version 1.0.

 ;D Much going on if you did not get the last development release.  Much has been added.

 :-\\ I am sorry to say that some of the plans for this release have been put of.  This basically means the "subtitles" and also the multiple category / album selection.  On both of these counts I have run into some issues that I need to think over more.

I am attaching both a tar.gz and a .zip file.  There is an updated Readme.html in the docs directory.

Changes and updates include:

Well, if you try it - let me know if it works - comments and suggestions.  If some people can try it out and it works, I can roll out 1.0 and start on some new features.

Happy holidays
 ;D
Updated:  31-Dec-2004 - The 0.7 release has been superceeded.  The first post in this thread will always have the latest Dev and dist versions (although 0.8 is the best right now)

http://forum.coppermine-gallery.net/index.php?topic=12679.0


Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: kaptainkory on December 30, 2004, 11:42:40 pm
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
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 30, 2004, 11:53:52 pm
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

Hey Kory,

For your suggestions #1 & #3 above - those are in the works.  The ALT tag will be handled with much like the stats one... give it some text with placeholders....  "From album %a" would give "From album Summer Vacation".  A few other tags.  #1 is on my list, but it was going to be pretty intrusive, so I skipped it for now.  Starting on that one soon. 

Suggestion #4: That explains why I was never seeing them in firefox!  I'll put that one in to the next dev release.  After I will handle it the same way as the alt tag will be later.

Suggestion #3:  MM_OpenBRwindow a coppermine function? 

Thanks for the bugs... the boxes on the end are probably an artifact of my linux box converting the files to be readable by windows easily.  I think I know where I made that mistake. 

I am working on some other stuff right now that I really dont want to do... so this gives me an excuse to stop that :D

Thanks and check back later for 0.8



Title: New test version out (0.8)
Post by: vuud on December 31, 2004, 07:29:22 am
Okay, this is probably it before I just give it a 1.0 and move onto some new functionality/

Since the 0.7 release
<ul>
<li>Limiting what kinds of media to return (not music, etc) - setFilter($filters)</li>
<li>BUG Fixed: Fixed windows distrobution of end of file characters being added (probably)</li>
<li>BUG Fixed: Extra slash in link name </li>
<li>Added title attribute (same as alt attribute)</li>
<li>BUG Fixed: Frmat stats code - would fail if % was first char</li>
<li>Added ALTTAG / TITLE formatting</li>
</ul>

As for alt tags, I broke a big rule of development and added in new features after the code was frozen.  But I figure that this is small enough that I could get away with it.  If you set an alttag in your options hash you can insert place holders.

Code: [Select]
<?php $objCpm->cpm_viewLastAddedMedia(1,2,array("alttag" => "filename: %f")); ?>
Would produce alt and title tags that said "filename: myphoto.jpg".

This is the full list of available placeholders:

<p>
%p - filepath of the media<br />
%f - filename of the media<br />
%s - filesize in bytes<br />
%S - filesize in KB rounded to one decimal place
%t - title given to the media<br />
%c - caption for the media<br />
%o - owner name for the media<br />
%w - when added (reformatted ctime field)<br />
%W - raw Ctime field data (seconds)
%h - hits for the media<br />
%a - album name it belongs in<br />
%d - album description<br />
%% - inserts one % sign<br />
</p>

I plan on using the same for the subtitle generation in a near future release.

Credit to KaptainKory for two bug reports :D

THE DOWNLOADS are either on the first post in this thread
http://forum.coppermine-gallery.net/index.php?topic=12679.0

Or on my website at:

http://www.fistfullofcode.com/projects/copperminefetch

Thanks!













Title: Any advice?
Post by: vuud on December 31, 2004, 08:38:26 am
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)

Let me know if you have any ideas on this thing about linking to the intermediate photos.  I have tried to keep my database access very light and very fast.  I am having trouble coming up with a single sql statement that will give me the data I need back.  I need to know the position in the album, but that is calculated by a sql call to get all the photos in an album.  This means that I have to do 1 + 1 per image calls to the database.  That is bad.  Hopefully I will be able to work some sql magic...

As for the MMOpenBrowser code... that is part of the coppermine javascript library.  I try to not tie to the actual coppermine implementation as much as possible (less work between releases probably - works on more versions) so I don't want to add that in directly.  I'm going to work in something so you can pass javascript commands to the CF program.  That way you can import the JS from coppermine in your page if you want and craft the javascript call and pass it in.  I think that will get you where you want to go.

As for now, I may tinker with the SQL, but I wont get either of those in until after this one is released as 1.0.  I want a stable version :) - but that should only be a few days anyway.

I hope I hit everything you could want in the ALT tag formatting :D










Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: kaptainkory on December 31, 2004, 08:13:38 pm
The new alt and title tag features are great.  I agree that calling a javascript function straight from Coppermine is probably a bad idea, however replicating the same action isn't.  What Coppermine seems to do--without looking at the code too closely--is to open a pop-up window (without menus, status bar, etc.) that is sized to match the image AND centers it on the screen.  These are nice features beyond just using target="_blank".

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.

Cheers,
Kory
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on December 31, 2004, 08:48:31 pm
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.

Well that seems like a simple enough solution.  I poked at that before, but did it without the - sign, which does not work. That is way to simple to not put in the final release.  And, yes - that one should definately be the default.

As for the extra spaces I will get around to that, but its not high on my priority list.  A lot of it is due to using straight html in the php library which I can fix pretty easily.   Legacy code... you know the deal.

The EOF characters were being generated by a setting I had in my ANT build file.  I adjusted it - glad to hear they are gone.

I am unsure about changing the packaging... I did it that way exactly for the reverse of what you are saying... I wanted to keep the rest of the stuff out of the installation :)  I will give this some more thought though - I can see benefits to both ways.

Thanks for the notes and the solution to the intermediate file... If I had a bigger ego I would be incredibly embarrassed that I missed that :D




Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: peeps on December 31, 2004, 08:55:49 pm
I am working with the last release you had and everything seems to work great! However, I am getting broken images when it access only 1 particular album....

Code: [Select]
[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

Any ideas?

Ah I figured it out....for albums where the intermediate picture is so small that there is no larger picture, there is no normal_imgxxxx.jpg.

That might be a tough one to figure out for the intermidiate picture call from cfimageget.php....

Like you may have to check for "normal_" and if it doesn't exist, display the "large" file.....

http://www.philpeeps.com/gallery/thumbnails.php?album=4

That is a link to my album that has only small 400x300 images....so only thumbnails and "large"...there is no intermediate file.....
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on January 01, 2005, 06:57:13 am

Yo Peeps

I had no idea this condition would exist until last night when I tried viewing a larger version of a very wide image and there was none.  Didn't put that together with this until you mentioned it.  Thanks for the troubleshooting - saves me much agony... I can just fix it now

I am going to do some code tomorrow night and get this fixed and get the link to the intermediate page working.  Maybe fix some html formatting issues and I think there was one other thing - but I can't remember it right now.

Well happy new year to all... Promise a new release will be out late tomorrow (most likely) - maybe 0.9, maybe 1.0

Bill (Vuud) Chmura
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: Titooy on January 01, 2005, 11:17:55 am
Maybe it's a stupid question but why does it write "Since XXX we've added about XX images" ?
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: peeps on January 01, 2005, 07:36:37 pm
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.....
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: Titooy on January 01, 2005, 09:38:53 pm
Of course but my question is: Why is it "about"? isn't it an exact number?
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: kegobeer on January 01, 2005, 09:41:16 pm
Maybe because the person who coded it doesn't speak English as their first language.
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: Tranz on January 01, 2005, 09:48:58 pm
Well, the stats include the private albums, but the viewer might not have access to all those files, so it would make sense that the number is approximate. If it is exact and the viewer somehow figured out that they're not seeing all the images that are counted, then that could cause confusion.
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on January 02, 2005, 05:42:06 am
Of course but my question is: Why is it "about"? isn't it an exact number?

Heh, all good answers...  The actual reasons are:

1) That part was never really redone after I created it for personal use

2) The tag line generated is going to be customized by you

3) When I was working with the date functions the PHP docs stated that depending on a few factors, the date could end up being off a little bit (based on when midnight fell) hence the "about" part.

4) I thought there was a forth, but it eludes me right now...

Gonna go fix everything now... will probably post something with all the fixes tonight


Title: Last test release... (lets hope) >> 0.9 is done <<
Post by: vuud on January 02, 2005, 07:57:40 am
... and there was much rejoicing

The files are attached to the original post here, or can be found on my web site.

http://forum.coppermine-gallery.net/index.php?topic=12679.msg57492#top

 ;D - Things fixed and added in this release

Thanks to Peeps and KaptainKory for bug reports, suggestions and some code!

I hope this is all the bugs.  I have some things on my todo list I want to work in I can start on sometime soon, but won't do that until after the stable release is out (1.0)

 ??? Post any problems to this board.

Thanks

Bill "Vuud" Chmura

PS. KaptainKory: Hope the html is clean enough for you - fixing that actually forced me to get rid of some ugly raw html sections in my code.  so thanks!


Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: peeps on January 02, 2005, 05:08:57 pm
Now, when using cfimageget.php, i get teh following errors when getting a broken image...

error_log
Code: [Select]
[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

cfimageget.last
Code: [Select]
.jpg:/home/philpeep/public_html
Everything else is still working fine from what I can tell.
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on January 02, 2005, 06:09:24 pm

hah!  there is always something. 

Can you do a "view image" from your web browser and see if it gives you any other warnings and outputs?  I will be back in later today and will see what happened to it.

(I think I know what it is)

Bill
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: peeps on January 02, 2005, 09:29:10 pm
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
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on January 03, 2005, 04:55:25 am
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!

(note: attachment removed and added to original post until it becomes irrelevant)

Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: peeps on January 03, 2005, 05:20:21 am
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!



I updated and refreshed my test file ~100 times with no errors...

Looks good! Thanks!
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on January 03, 2005, 06:35:13 am
Fantastic...

Sorry for that bug... Until you came along I had no idea that coppermine did that!  You've been a great help - I appreciate the patience

Let me know if other strangeness occurs or you think of anything good for the next version :D

Vuud

PS. For all that care: The 0.9.1 release fixed this problem - and is the newest download on the original post in this thread
Title: copperminefetch align center
Post by: NEOo on January 04, 2005, 01:52:16 pm
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??
Title: Re: copperminefetch align center
Post by: vuud on January 04, 2005, 07:28:52 pm
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??

I guess this was moved here...  So yes, there are a few things you can do to solve this.

First:  The first real release (1.0) in a few days will provide centering as the default... A quess it makes sense instead of forcing everyone to override it.  Not much more is changing in it till after that.

Second: The way you can do it now is through CSS and the options hash.  This is the way I originally envisioned all the formatting and style to be controlled (hence the lack of an align tag).   For example:

Code: [Select]
<style type="text/css"> .photoclip {  text-align:center; }  </style>

<?php $objCpm->cpm_viewRandomMedia(5,1, array("cellstyle" => "photoclip")); ?>

This will insert a class tag into the td entry that will make it go to whatever alignment you want.  This also opens up a whole world of borders, padding, etc...  There are options for tables, headers, cells, rows, images, links, etc...

Disclaimer:  I am not up on CSS as much as I'd like to be so if I am wrong or anything - someone please tell me!

Hope this gets you where you want to go.  ;D

Bill

PS. If anyone has done anything interesting with the CSS for this, or with CoppermineFetch in particular - let me know!  ;D









Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: dale on January 05, 2005, 02:49:20 am
Hi, looks like a great script. Im having this error though.
Code: [Select]
Fatal error: Call to a member function on a non-object in /home2/barstone/public_html//cpgfetch/coppermine.php on line 371
I am using CPG 132. with the invisionboard bridge. I have tried to show images in my forum portal as well as on a test page and get the same error.

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();
?>

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
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

Thanks for any help, Dale.
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on January 05, 2005, 05:20:46 am
Lets take these one at a time...

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.

If you have one of the newest versions (a recent dev version) then the configuration you have above will not work.  Ironically I changed that because it was hard to use.  That also probably means my docs are wrong somewhere (and out of date).  I shall go and find the errant documentation and fix it. 

Code: [Select]
<?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();
?>


Now this assumes that where ever this page is, the cpgfetch directory is under it.  The new two lines at the top are strictly for troubleshooting and will force errors to be displayed no matter what the server error reportings are set too.

I am going to look at the cfimageget problem you reported next

Have a nice day!   ;D

Update:  I was just looking at your profile to find your coppermine site to try to figure it out.  if you are doing this on the site you have listed (storm riders) then your installation is at /cpg not /gallery.  So above it should be:

$objCpm = new cpm('/cpg');

If this is the case




Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on January 05, 2005, 05:35:26 am
The saga continues...

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

Hmmm, I guess I have to ask if you are on the latest version (see first post in this thread).  and also, if you can check via ftp that you do have a file:  /gallery/albums/userpics/10002/thumb_CIMG0030.JPG

The header errors are normal once things are broke, so we can ignore those.  In the latest version of the program the only way to get that error is if all three of these fail:

1) The file and size that you want (in this case: thumb_CIMG0030.JPG) does not exist
2) If it does not and you wanted an intermediate, it gives a large
3) If it does not and you wanted a large it gives an intermediate.

So you must have wanted a thumbnail, but it can not be found.

I fixed some code after 0.9 was out (hence the last one) that could be causing this problem.  Can you make sure you are at 0.9.1?  See the first post in this thread for download

Later

Bill




Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on January 05, 2005, 09:23:07 am

I have greatly updated and altered the home page for this project.  Its the most extensive place to get documentation and help.  This forum is still here for dialogs and such, but for docs, downloading and everything else, try here:

http://www.fistfullofcode.com/projects/copperminefetch/index.php

Thanks! 

Bill
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: NEOo on January 05, 2005, 12:35:53 pm
@ Vuud

I wanna thank you for the center thing!
It works great!!
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on January 05, 2005, 07:41:49 pm
No problem...  if you read up on CSS there is a ton of stuff you can do.  I hope to get sometime to play with it myself and then post a few on the tricks and tips page on my web site for copperminefetch.

Thanks for the feedback ... its nice to get a happy note with no problems once in a while  ;D
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: dale on January 05, 2005, 08:54:50 pm
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  :)

Attached is my testimage file. I tried it two ways, but dont really know what it all means :-\\

Thanks  :)
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on January 05, 2005, 10:51:31 pm
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  :)

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

Title: CSS Examples on the web site now
Post by: vuud on January 05, 2005, 10:54:34 pm

http://www.fistfullofcode.com/projects/copperminefetch/tips.php

Aside from updating and formatting all the documentation, I added in two examples for using CSS and the options hash to create nice borders around the images and also how to make the borders change on a mouseover. 

If anyone has any other cool tricks, please send them over for credit and inclusion
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: --Martin-- on January 06, 2005, 10:50:36 am
Hello.
Im new on this...:)
I got this error....dont know what to do..

Anyone who wants to help me?


Warning: main(/coppermina/include/config.inc.php): failed to open stream: No such file or directory in /home/virtual/site14/fst/var/www/html/test.php on line 182

Warning: main(): Failed opening '/coppermina/include/config.inc.php' for inclusion (include_path='.:/php/includes:/usr/share/php') in /home/virtual/site14/fst/var/www/html/test.php on line 182
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: Titooy on January 06, 2005, 12:20:33 pm
It's most probably because your gallery is not located at /coppermina/
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: --Martin-- on January 06, 2005, 05:03:22 pm
is there anyway to show last comment image?
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on January 06, 2005, 05:07:05 pm
is there anyway to show last comment image?

Do you mean show the last image that had a comment added along with the comment? 

If so, then right now - no.  But thats not a bad idea and i will look into it over the next few days (after 1.0 is put out)

If not, then what ? :P
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: --Martin-- on January 06, 2005, 05:34:24 pm
Great:)

hmm I got an other problem, the script cant handle å,ä,ö right?
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on January 06, 2005, 05:36:56 pm
You mean the characters:  å,ä,ö

Well I don't know.

1) Which part seems to be bugging out on them
2) Can you point me to a URL that this is happening on

Seems like it should, but to be honest I dont have any of those.  I'd be happy to see if I can make it do that  (as it probably should)

 ???
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: --Martin-- on January 06, 2005, 05:40:08 pm
Oki :)

http://www.flottig.se/test.php

Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on January 06, 2005, 05:58:37 pm
Oki :)

http://www.flottig.se/test.php

Hi is it the status line that is not doing it?
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: --Martin-- on January 06, 2005, 06:21:30 pm
No, its the image preview under... :)
Reload the side...
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on January 06, 2005, 06:35:12 pm
No, its the image preview under... :)
Reload the side...

Hey, you take some really nice pictures (I reloaded a bunch of times)  :D

Well, I could not see any problem... I got one with an ö (Capital though) and it worked...  I could be misunderstanding you.

Which part do of the thumbnails underneath do you think is not workng?

Sorry for the confusion, its still early here :D
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: --Martin-- on January 06, 2005, 06:54:10 pm
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!!
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on January 06, 2005, 07:22:10 pm
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!!

Thank you.

I don't mind tracking this down if you want to continue... I'd rather have a working add on than a workaround


Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: --Martin-- on January 06, 2005, 07:31:05 pm
Thanx ! :)
If you can find it, really nice!!
But I dont think i can help u, no skills :)
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: Titooy on January 06, 2005, 09:05:48 pm
Maybe a hint is that coppermine's charset is iso-8859-1 and the page where copperminefetch is used is windows-1252
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on January 06, 2005, 10:02:20 pm
Maybe a hint is that coppermine's charset is iso-8859-1 and the page where copperminefetch is used is windows-1252

I don't even understand where the problem is?

Is it am image thats not displaying? 
Is it a problem in the alt tag?

I just don't even know where to start :)
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: --Martin-- on January 06, 2005, 10:23:17 pm
I change to charset iso-8859-1 on the page...the same thing is happening.
I think it´s a problem whit the alt tag....
Every image or album whit å.ä.ö letter is not shown on the page.
Wonder if there is any others from sweden who has the same problem?
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on January 06, 2005, 11:29:00 pm
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!
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: dale on January 07, 2005, 12:57:14 am
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

Everything seems to be working the way it should now. My testimage.php file pulls the files from the gallery just fine. I am still getting errors when I try to use the script in my forum portal. I think that has to do with the portal script though. Im going to try a few things yet.

My forum gives me the following error when I try to include the script into a portal block.
Code: [Select]
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

Ill keep trying some things to see if I can make it work. Ill let you know what I find. let me know if you have any ideas.

Cool script though. Ill definitely use it one way or another. Thanks for the help.

By the way the docs on your site are great. thanks for setting all that up.
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on January 07, 2005, 01:26:27 am

Well, it could be a few things I can think of off the bat.  Can you point me at a url on your site where I can see where its failing in the portal.   I know your under development, so I have the domain name here if you want to exclude it.

With the "ERROR path to coppermine does not exist"...
This is given when the program takes the path  you  give it and it tries to find the config.inc.php file (from whick it grabs the rest of the data).  In theory, it should.

Do me a favor and download the 0.9.2 dev release from my web site
http://www.fistfullofcode.com/projects/copperminefetch/downloads.php

It will give you an error with where it was looking when it generates that message.

And where can I see the problem in motion


Bill



Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on January 07, 2005, 01:31:27 am
Dale, if you could also try the cftest.php page that comes with the 0.9.2 release that would be great (I just added it)
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: --Martin-- on January 07, 2005, 06:56:54 am
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!

Okioki here is one :)
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on January 07, 2005, 07:07:52 am
Good news!  I was able to replicate your problem...

That means two things:

1) Its not you
2) It can be fixed

 ;D

Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: --Martin-- on January 07, 2005, 07:14:26 am
Good news!  I was able to replicate your problem...

That means two things:

1) Its not you
2) It can be fixed

 ;D



tell me, tell me :)
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on January 07, 2005, 07:45:44 am
Good news!  I was able to replicate your problem...

That means two things:

1) Its not you
2) It can be fixed
 ;D
tell me, tell me :)

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








Title: My wish list for version 1.2 <- Any thoughts
Post by: vuud on January 07, 2005, 08:15:32 am
The following is a list of things I want to get into the stable release after this one (1.2).  This is a probably a month or so before a stable is out, but dev releases will be out in the meantime as I finish a function.

So anyway, this is not a vote or anything, but I value your thoughts.  If there is anything not on the list you can think of, please let me know.  I am not making promises, but I have yet to turn down a suggestion.   So be the first on your block to have a feature request shot down!! ;D

Here they are, in no particular order:

Specify more than one album or category: - Available as of Development release 1.1.0
This would allow anywhere you wanted to specify more than one album or more than one category to draw information from.(album=1,3,2 or category=1,4,2 or even combinations, cat=3,album=3,4,6)

Category=1 requests to show all user albums- Available as of Development release 1.1.0
Instead of doing nothing like it does now :D

Subtitles generated for images:
Allow subtitles to be specified to appear under the images (or next to or on top of) complete with placeholders to dynamically generate the text

[b]Last added category or albums (with thumbnails):[/b]
Show the albums and or categorories that have been added recently - potentially since the last number of days or the last number of them added
This will not be done in the foreseeable future.  Cpg does not track creation times for albums and categories.  I do not see that as part of what I want my code to do (start its own metadata) so this is off the list

Last added comment with image:
Someone was asking for this... show the last image that was commented on along with the comment.  It seemed fun

Show last albums or categories that have had images added - trand
(along with title and descriptions and placeholders)   A list of categories or albums that have new photos along with a representative thumbnail and some text (title, description, total number of images maybe   

Possibly a method to limit the size of the files returned(width)
I have a few wide ones that always screw up my random image tables :( - just pisses me off

Set option to have html results returned instead of output
This way you could fiddle with them on your own php page, whatever you want to do to them

Set option to have html results returned as data instead
You would have to do all the formatting, but coppermine fetch could be used more as a generic interface to the coppermine gallery

Framing popup option for large photo version requests
As pointed out to me, this would be much nicer than the target="_blank" option

Is there anything else?  What would be cool?

I have a few other thoughts, but I am not sure they are technically possible - so I will not mention them here!

Thanks for all your appreciation and positive comments! 

BTW: Dont forget the main site for anything besides this discussion is on
http://www.fistfullofcode.com/projects/copperminefetch

Docs, Tips, etc, etc...
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: --Martin-- on January 07, 2005, 10:22:15 am
Good news!  I was able to replicate your problem...

That means two things:

1) Its not you
2) It can be fixed
 ;D
tell me, tell me :)

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










Sorry for all the problem!!
It was my browser...arggg
The script works fine whit letters like åäö!!
Again sorry :)

Loking forward to the "last image whit comment" add :)
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: Casper on January 07, 2005, 08:35:07 pm
Hi Vuud,

excellent work.  I installed version 0.9.2 today, and have the following questions.  I looked through the thread, and didn't see them, so apologies if already asked.

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).

But other than that, brilliant.
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on January 07, 2005, 09:07:52 pm
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).

Hi Casper,
First off thanks for the kudos on this... I appreciate it

As for your problems:

Q1: About multiple categories...  Not right now, but its on the list for the next version - so over the next few weeks that will be added.  As for selecting category 1 not working, technically it does work (at least how I programmed it) but aparently the user categories do not follow the normal categories.  Thats okay.  I will fix that in the next release also.  I just had no idea that cat 1 stood for that :D


Q2: As for the gif... that should work, so that is actually a bug.  I will have to fix that.  There is a pretty robust filtering mechanism you can do to limit what is selected.  See the cpm_setFilter method
http://www.fistfullofcode.com/projects/copperminefetch/docs.php#cpm_setFilter

I will look into the gif problem - does it show the image, but mess up the link?

Where are you having the problem with the pid not being added?  Thats strange.  Is it only on the gif file or something?

Interesting.

Thanks for the feedback!

Update: this means I have to apply the kegobeer mod to get gif upload support.  This will have to wait till tonight then :(





Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: Casper on January 07, 2005, 09:57:43 pm
Hi Vudd,

thanks for the reply.

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.
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on January 07, 2005, 10:32:19 pm
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








Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on January 08, 2005, 06:37:38 am

Oh screw me.  I don't have a new enough GD on the server I am on to do the gif mod.  I am moving servers over the next few days, so hopefully the new one is new enough to do it.  Is there any other way I can get  gif image into the system for testing this problem that you know of?


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









Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: Tranz on January 08, 2005, 06:41:46 am
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.
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on January 08, 2005, 07:00:34 am
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.

I actually already have php, mysql, apache on my computer and on my server here... just no coppermine.  I suppose I could install that there.  Windows machines?  Don't have any of them either :)

(Actually there is one in the other room - also known as the box no one likes - I need it for webtrends... no monitor attached to it though)

I'm not doing development on the core coppermine product so my testing is a bit easier... I have an ANT build file that I just hit ant posttest and it does syntax checking and uploads for me.  Yeah, local would be easier...

Ah well



Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: Casper on January 08, 2005, 11:50:35 am
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 will pm the url, as this is a test site under development for some friends, and not yet live.
The <img src is correct, it is just the <a href that is broken. It is not picking up the pid and attaching it at the end of the url.

I should have said, this is a 1.4 install, bridged to smf, using a custom theme, and the page showing the images is in the coppermine root folder.

As a dev I know full well there is no support for 1.4, and this is probably related to that, so please use this report as such, if you have no problems with 1.3 users, and hopefully it may help you prepare this mod for the 1.4 release  ;)
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: Casper on January 08, 2005, 12:51:26 pm
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)
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on January 08, 2005, 06:34:20 pm
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)

Strange.  The pid problem is probably 1.4 related, but the gif thing worries me with 1.3.2 releases.  The code that makes the path is the exact same lines that make the path for the jpg files.  When you checked the source path for the gif, did you actually look at the html code?  There is a default alt tag that gets set that is album/photo

Yeah, the gif thing worries me a bit



Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: Casper on January 08, 2005, 07:07:33 pm
No I didn't check the code, so I just refreshed untillit came back, and here is the output html code for you to see.  The gif is the bottom image;

Code: [Select]
<table  border="0" width="100">
<tr>
<td align="center"><a href="/gallery2/displayimage.php?pos=-&amp;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=-&amp;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=-&amp;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=-&amp;PHPSESSID=2b57d8eec23a8ae029f80d40ff79ecf9"><img src="/gallery2/images/" alt="casper/cup.gif"  title="casper/cup.gif"  border="0"/></a></td>
</tr>
</table>
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on January 08, 2005, 08:16:57 pm

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
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on January 09, 2005, 06:59:57 am

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 give.  I updated my GD library, did the gif mod, added in three gifs at three different sizes and have had no problems so far with it.  I think my next step is to install CPM 1.4 and see what is going on with all those issues.

Wish I could be of faster help, but I just cant replicate the problem. 

 >:(


Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on January 09, 2005, 07:47:02 am
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)


Well, I just installed a CVS version of 1.4 and got it running.  I've had no problems with the pid not being included.  I did not do the GIF mod, as I just don't have the time tonight.  The ones that are being not included with pid's are they user galleries only?

(did not test that)

Sleep time... sleepy sleepy sleepy
Title: Stable 1.0 is done
Post by: vuud on January 09, 2005, 08:23:32 am

The stable release is on the web site or attached to the original post here. 

Note:  If you were on 0.9 really nothing has changed, but the directory it comes in (formally known as CoppermineFetch) has been renamed to cpmfetch

1) Its shorter to type into pages
2) Its all lowercase which will avoid casesensitivity issues at some point I am sure

It wont be moving again

Okay, onto the neat features for the next little bit

Vuud

Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: Casper on January 09, 2005, 11:59:46 am
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.
Title: Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
Post by: vuud on January 09, 2005, 04:39:28 pm
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.

Ah okay...  In the 1.4 docs (somewhere) it says only imagemagik for gif still.  i came across that last night night sometime - if I remembered where it was I would tell you :)

I will upload a gif to my 1.4 (CVS version) and see what happens


Title: CoppermineFetch dev version 1.1.0 is out
Post by: vuud on January 11, 2005, 08:10:27 pm
Its available on the website in the downloads section
http://cpmfetch.fistfullofcode.com
If there is a dev version higher than 1.1.0 then I suggest that instead (that will have fixes in it)


Okay, I don't have all the features done, but I have gone a reworked all of the html generation routines and a few other internals.  So I figured I would get it out as early as possible if anyone wants to play with it.  There are some neat new things though:

USER GALLERIES ARE CATEGORY 1
Thats right, unlike before any request for a category #1 will be translated internally to represent any publicly viewable user galleries.

IMPROVED STYLES AND OPTIONS SUPPORT
Part of the aforementioned improvements make it much easier for the code to handle all of the options.  So more of the same style tags and alt tags, etc are handled by all the functions the same.  Before some of them behaved differently

NEW FUNCTIONS (3 of them)
cpm_viewLastAddedMediaFrom( $rows, $cols,$source, $optionHash)
cpm_viewRandomMediaFrom( $rows, $cols,$source, $optionHash)


The above two are essentially the same except one returns the last media added and one returns random selections.  The difference between these calls and the already existing calls is that these accept the $source.  The souce is a string containing either or both "albums= " and "cat= "

Here are some examples:

"album=16,4,6:cat=5,6"
This one will only use albums #16,4,6 and anything from categories 5 and 6.

"cat=6,1"
Uses only category 6 and any user galleries

"album=14"
Uses only album 14

Note, the format has eithe cat or album, a comma seperated list of numbers.  If you do both cat and album they must be seperated by a colon ( : )

cpm_showAlbumsUpdatedOverLastDays( # days )
This shows two columns.  The first column has an image from the album it found a recently added picture in.  The next column shows how many new were added, the title of the album, what category and the description.

Looks like this with some css styling applied:

(http://www.fistfullofcode.com/projects/copperminefetch/showalbumsupdatedoverlastdays_example1.jpg)


Like I said, this is a dev version... Everything looks okay, but of course there is a reason we have dev versions!




Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ver!
Post by: Rodinou on January 12, 2005, 04:54:34 pm
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 ?!
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: protox on January 12, 2005, 05:04:36 pm
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();
?>
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: Casper on January 12, 2005, 05:18:41 pm
@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.
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on January 12, 2005, 05:58:02 pm
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();
?>


Hey Protox. thanks of course for the kind words... in opensource is like being paid :)

Anyway, the problem you are having is because coppermine is installed in the root of the web site, which I was not anticipating.

This is not a terrible problem, just something else I did not ever think anyone would do with coppermine.  Basically, your URL's are ending up with double slashes which confuses the server and it does not add the domain name on when sending back a page.

I guess I will have to install one somewhere like this and try it.

In the meantime, you can try this:

open coppermine.php (1.1.0) in an editor

Goto line 84

On the line after $this->filepathtocpm = $_SERVER['DOCUMENT_ROOT'] .... blah blah blah

Add in:

Code: [Select]
if ("/" == $urltocpm) $this->$urltocpm = "";

With any luck, magic will happen and it will be all better

Try it again.  I will get a fix in soon for this - something else I did not anticipate :)

Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on January 12, 2005, 06:00:05 pm
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.







Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on January 12, 2005, 06:01:51 pm
@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.

One of the dev versions started working for you?

Your problem is just....  wierd...   :-\\     I was unable to replicate it on CVS 1.4 - perhaps somethign in there changed?

Bill

Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: Rodinou on January 12, 2005, 06:07:37 pm
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 ...
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on January 12, 2005, 06:28:16 pm
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










Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: Rodinou on January 12, 2005, 06:36:27 pm
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












Not really. Dawn it. I dream of a "very simple and customizable coppermine". Maybe gods of this universe hear my preach :)

Sorry for inconvenience, I'll go again in my planet, to search a solution to surf a different way with coppermine.
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ver!
Post by: n704fn on January 14, 2005, 01:10:32 am
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
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on January 14, 2005, 01:20:29 am
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

Well, Thanks!   ;D

PS. Personally I am not happy with the docs...   

Oh yeah, and check back soon for nifty stuff that is being added...

Title: Yay! Development 1.1.1 is out
Post by: vuud on January 14, 2005, 08:17:38 am
To whom it may concern:

The latest dev release, 1.1.1 is available for download from the web site. 

cpmfetch.fistfullofcode.com (http://cpmfetch.fistfullofcode.com) < and see the downloads section.

 ??? What wonderous stuff is in this iteration... you may ask:

Bugfix for coppermine being installed in the root of a web server - hopefully this fixes a slight bug when coppermine is installed right in the web root

setReturnType([print, html, resultset]) to have functions return rowsets, htmldata or print it
All functions recoded to support setReturnType as much as possible


These sort of go together.  The default behavior for a function called in CoppermineFetch is to print the output.  Now, you have the option to call $obj->cpm_setReturnType( type ); to tell it what to return.  not everything is supported across all options... see the phpdocs to see which ones are.

Valid types:
print - dumps directly to output
html - returns a string variable containng the html
resultset - returns a mysql result set containing the data that would have been formatted.


Lots of internal changes to make extension easier (aka RSS Feeds) - I've been tinkering with RSS and figured I would try extending in that direction.  Its coming along pretty well.  There is an example in the cpmfetch directory... Not recommended for use, but if you are good with php you can try it out  All these changes have helped the code some, but may also have broken things.  if you can test - great!

Added a debug flag in case anything happens out there - right now setting cpm_setDebugMode(true) mostly dumps out sql statements.  Primarily for my use.

Added in prototype for java popup window
This provides a nicer way to display full size images instead of a whole new browser window.  Right now it only works if three conditions are met

1) Somewhere in your page you include the cpmfetch.js as an external javascript
<script language="JavaScript" src="./cpmfetch.js"></script>

2) Your imagelink option is set to "large"

3) Your windowtarget option is set to "_blank"

*note* this is still really new, and there is much I do not like about it.  So it will be changing, but let me know if you have any suggestions.

 :( Promises broken  :(

I had noted a function for showing the last added albums and categories.  I checked and this is just not going to work out.  CPM does not track when these were created, and if I start tracking metadata about the data I am going to be more tied to one release.  I like to keep it as loose as possible.

Sorry if anyone was thrilled with that idea

So right now, I have on my list still to do:  subtitles for images, last comment added with image, limiting the size of an image displayed, category list with images added recently (like the album one), and polish up the javascript popup

Take care, have a nice day





Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on January 16, 2005, 08:33:11 pm
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();
?>


The last suggestion I issued probably did not work all that well.  There is a 1.1.2 dev release that definately fixes this problem.  I made a dev server here to test it and it works good now.

Its on the web site


Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on January 16, 2005, 08:35:45 pm
@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.


Hey Casper,

Same goes for you with the new version... if you were experiencing path problems there are two new functions you can call for wierd situations:

$objCpm->cpm_OverridePathToCoppermine("/var/www/html/artiphoto");
$objCpm->cpm_OverrideUrlToCoppermine("/artiphoto");

To be honest with you, at 5:30am this is not completely clear to me.  What the
two new functions (in order)

#1 - Tells copperminefetch to not use its generate path based on the document
root and instead uses what you tell it

#2 - affects how the links are made.

You still need to get the object created, but after that this will adjust the behaviour specifically.  90% of the people should not need this...

Hope this helps

Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: protox on January 17, 2005, 04:26:13 pm
Just small words to say that everything is working good with your mod Vuud; THXXXX ;)
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on January 18, 2005, 05:21:38 am
Just small words to say that everything is working good with your mod Vuud; THXXXX ;)

Excellent to hear.  Within the next few days I will be putting out the final dev release, so it will have all the features of the next stable version.  otherwise I will be only doing bug fixes, documentation improvment and possibly some more work on cfimageget.php and cfrssget.php

Have a great day!

Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: protox on January 18, 2005, 04:41:37 pm
Now .. next problem : I cannot write the xml file ... strange ..
it says :
Quote
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.

I think that I've got a CHMOD thing to do .. but where ...
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: fpatten on January 18, 2005, 06:02:40 pm
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
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on January 18, 2005, 06:27:24 pm
Now .. next problem : I cannot write the xml file ... strange ..
it says :
Quote
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.

I think that I've got a CHMOD thing to do .. but where ...

The RSS feed is still very much in its beginning stages...  You do need to have writeable mods to that directory though... 

It will be better supported soon, not to mention finished!





Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on January 18, 2005, 06:36:24 pm
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

I guess to answer your question - nope.  At this point it can only do random from specific albums, categories, etc.  That does seem like a good feature though - so I will add it into the next dev release.  That whole cfimageget.php really needs a good once over from my point of view.

Possibly by tomorrow (ie: very late tonight) or the next day I will have a new dev version up that has pretty much everything I had to do left.  Especially subtitles for under photos...  cool stuff.

Have a nice day

Bill






Title: Re: CoppermineFetch - CSS
Post by: Alaska on January 18, 2005, 11:03:14 pm
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
Title: Re: CoppermineFetch - CSS
Post by: vuud on January 18, 2005, 11:42:18 pm
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

Hey Jim,

Being the first one to admit that I can do little more with CSS than change fonts and alignment...  I think they are really cool, and I really could not tell what was a table and what was not...

Any feedback on what I could do to make it easier for people that want to use pure CSS (e.g.: CSS for layout and stuff) would be great.

Thanks

Bill






Title: Re: CoppermineFetch - CSS More
Post by: Alaska on January 19, 2005, 12:15:26 am
Bill:

In order to make this work, the coppermine.php file was altered to remove all of the table tags (table - td - tr).  i.e. to totally remove all table functions.  Then <ul class = "photolist"> is used to replace the beginning table tag.  The close table tag then becomes </ul>

Then the td tags were replaced with <li> and </li>.  The tr tags were just commented out so that they would not show up.

This makes for a nice fluid design in which the text below the pictures moves up or down as needed.  The next task will be to see what can be done for either a left or right vertical photo gallery.  Most likely that can be done with the same code being place in a few nicely placed  <divs>.  Will see if it works out and if so, will then add them to the sample.

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.

Jim
Title: Re: CoppermineFetch - CSS More
Post by: vuud on January 19, 2005, 01:48:48 am
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.

Thats pretty much the plan - I just have to figure out the whole CSS thing... :)



Title: Dev 1.1.3 is out
Post by: vuud on January 19, 2005, 06:54:02 am
Dev version 1.1.3 is out

This marks the last features to be added to the core coppermine.php program for the 1.x series.  When I think it is ironed out enough it will become 2.0.  I beg, and plead for anyone interested in using cpmFetch to use this version (or whatever the newest in the dev listing is) and report any bugs or problems so we can iron out all the little bugs that creep up :)

I'll be ironing out some of the accessory programs.

This release has the

Added subtitle option (same syntax as alttag) - to display subtitles in the grid layouts

Added cpm_showCategoriesUpdatedOverLastDays($numberOfDays,$options="")

Added cpm_viewLastCommentedImages - shows last commented images, provides subtitle access to comment

As I said, go for the newest release on my downloads page... 1.x.x ...

http://cpmfetch.fistfullofcode.com

If you check the readme file, you can see what has been updated since whatever version you have now.

Take care all!




Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: fpatten on January 19, 2005, 04:06:25 pm
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
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on January 19, 2005, 11:39:09 pm
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

Yep, that should work fine.  Part of the download has phpdocs in it, so you can even get a better idea of what other wonders are available for those brave enough to face the undocumented coppermine_dao (better in line code documentation is on the way).  :)

I also layed out the replacement for cfimageget which will have the same call but more options - and be easier to add on your own calls.

Good job!

Bill

Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ver!
Post by: Rodinou on January 20, 2005, 04:56:40 pm
Vuud : I use on my site http://www.sortons.net/photos/

with displayimage.php 0 TABLE ...

Do not use UL LI ... bad thing for galleries (but great for menus)

Rather instead <div></div> or <p></p> using float:left

Or ... <dl><dt><dd></dd></dt></dl>
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ver!
Post by: n704fn on January 20, 2005, 08:22:16 pm
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
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on January 20, 2005, 09:23:15 pm
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"

I am 50% done with a complete re-write of that code.  Maybe tonight it will be done and be posted in a new dev release.

Fun fun fun

Bill



Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ver!
Post by: n704fn on January 20, 2005, 09:53:55 pm
Quote
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"

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?

Looking forward to the new docs.  Thanks again,

N704FN
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on January 21, 2005, 03:24:30 am
Quote
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"

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?

That is interesting.  If you are not setting a path to cpg132 anywhere, it should not be able to find your photos.

Yeah, your avatar is here.    ???






Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ver!
Post by: hueznar on January 28, 2005, 04:58:31 pm
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.
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on January 31, 2005, 08:26:54 pm
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.

Hello Hueznar, I'm an Enlish user with a non-existant spanish level, so your ahead of me :)

In the last development version I beleive you can have the last added comment and its image displayed.  Also, in the general part you can have the title and or description shown.  I don't think you can have a comment displayed along with the image.  I did start into that, but decided on postponing it.

I do not think that as it is you can do what you want.  It may be added later, but at this point I am not adding on new functionality until the next stable version comes out - that way I don't mess anything up :)

Sorry

Vuud





Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: dondo521 on January 31, 2005, 09:38:52 pm
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
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on February 01, 2005, 01:14:07 am

Subdomains are a tricky beast with this mod, but not impossible.

Let me figure out what I did last time to get it working and get back to you.  It won't work the way it is, you need to add in two extra function calls.  Let me dig those up and I will repost the info later on tonight (can't do it right now)

Vuud


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

Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: dondo521 on February 01, 2005, 01:49:59 am
Thanks Vuud!

I really appreciate that, will check in later...

dondo521
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ver!
Post by: hueznar on February 01, 2005, 11:03:44 am
Thank you for your reply Vuud :)

Quote
Also, 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 )
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on February 01, 2005, 06:31:46 pm
Thank you for your reply Vuud :)

Quote
Also, 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 )

Well, thats a first... someone who actually learned something in high school!

 ;D

You need to be running a newer version of coppermine fetch (one of the development versions).  After that it is very easy.to do...  You need to pass in another entry in the options hash

$objCpm->cpm_viewRandomMedia(1,1,array("imagesize" => "int", "subtitle" => "%t - %c"));

That will add a subtitle (text under the photo consisting of the title of the photo and the caption.

Bill

PS. Let me know if that does not work












Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on February 01, 2005, 06:35:35 pm
Thanks Vuud!

I really appreciate that, will check in later...

dondo521

Last time I had to do this, I had to get into the server to work it out... but I think this is it...

Keep what you have for settings, getting back the links without images is okay at this point.

After creating the cpm object, you need to make these calls also:

 $objCpm->cpm_OverridePathToCoppermine("/var/www/dom/subdom");
 $objCpm->cpm_OverrideUrlToCoppermine("/subdom/");

Basically what this does is mixes it up internally so everything still goes in the right directions.  The first one is the actual path as the server see's it (not the url).  The second is the partial URL

I really hope this works, since then I can document it :)

Most likely you will need the newest dev version for this















Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: PCGUY112887 on February 02, 2005, 12:46:55 am
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
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on February 02, 2005, 12:56:24 am
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

Your welcome for the mod.

visably removing the table and the border can be done through the css control... just pass it a style using the optionshash for that.

if you want to completely get rid of the html surrounding the image, the cfimageget.php script may be easier.  if you want to dive into the coppermine_dao object, you can probably get it that way, but it will take several calls - at least in theory it should be able to be done that way.

If I have completely misunderstood what you were asking, then let me know :)

Also, I'd advise the dev version over the last stable... Its darn near the next stable version right now.



Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: PCGUY112887 on February 02, 2005, 01:35:33 am
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?
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on February 02, 2005, 01:58:07 am
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?

Hmmm,  your not really "mod"'ng any files... you just have the change the variables at the top of the file for your configuration.

That is all in the cfimageget.php file.  The only other thing you need is the image tag in the file that will display the photo.  If you are doing much more than that I have led you astray somehow!


Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: dondo521 on February 02, 2005, 09:29:35 am
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
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on February 02, 2005, 06:05:56 pm
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

Okay, just remember, you need the newest dev version to use those function calls
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: PCGUY112887 on February 02, 2005, 11:17:32 pm
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?  :\'(
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on February 02, 2005, 11:54:44 pm
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?  :\'(

Well, cpmfetch is for providing image data back.  You can always wrap the img call in an href to point at album=1.

If you want it to link to a specific photo, then you need to work something out through the main library. 

Can you send me the url of the page you are trying to work it into and where you want it... I feel like I am not sure what you are trying to accomplish...  You can personal message it to me if you dont want it public.


Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: PCGUY112887 on February 03, 2005, 12:44:18 am
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.
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on February 03, 2005, 12:47:39 am
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.

Thats fantastic!  My brother made a spud gun a little while back... probably about 6 feet long and powered by right guard aerosol spray I think :)

Title: Update on the next dev release
Post by: vuud on February 03, 2005, 06:47:58 pm
I am almost done with the changes to the next dev release, which will not be the last one.

I hope that his weekend I will be able to spend some time coding and gettting most of it out of the way. 

The main program as shown in the development versions is pretty much working as it should, so little will be changing in there.

The cfimageget and cfrssget programs will be updated over the next two development releases

Essentially they will become objects in addition to programs.  This will allow you to create extra programs that access them.  It will allow you to limit what is used in them also, so people cant create thier own queries unless you want them to be able too.

1.1.4 - A redone cfimageget program with more features (most likely the same basic options as the main coppermine program).

1.1.5 - A somewhat complete RSS feed (cfrssget) - at least something that works.  This is tricky since I have never really worked with RSS feeds before.

1.1.6 - 1.1.9 Fixes to bugs in the above and core as needed, then a 1.2 release.  During this time I will also update the documentation on the main web pages. 

If ANYONE out there is really good with phpdocumentor, let me know - I have questions and could really use the help!  :P







Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: Omniscar on February 04, 2005, 01:07:19 am
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.
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on February 04, 2005, 04:34:01 am
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.

Crap, this means I have to go use windows somewhere.  Damn IE and not sticking to the w3c :D

Please upgrade to the latest dev version...  Any changes I make will be to that and not the stable.  The dev is very stable, more so that the last stable (easier to use also).  http://cpmfetch.fistfullofcode.com has the downloads with the dev versions

If that does not fix it, can you describe what the problem you are seeing exactly?  Is it not displaying at all or something?  I can probably get into windows sometime tomorrow and check my test pages.  Phooey.   Everyone I know is either in Linux, or uses firefox... 

Lemme know


Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: Omniscar on February 04, 2005, 05:09:23 am
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.
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on February 04, 2005, 05:40:24 am
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.

Two points of interest:

I am thankful I don't have to boot windows

What was the misspelling, I'd like to play with that one...
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: dondo521 on February 04, 2005, 06:31:59 am
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
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on February 04, 2005, 06:43:19 am
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

Hmmm, do you need to use cfimageget.php? Can you just access it the normal way?

Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: dondo521 on February 04, 2005, 07:08:03 am
Not sure what you mean ???
(the normal way)

dondo521
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on February 04, 2005, 07:20:27 am
Not sure what you mean ???
(the normal way)

dondo521


cfimageget is an extra program that comes with copperminefetch.  It is basically for use where it is remote or straight html is where you want the image.

I am not sure that the extra parameters will help in cfimageget.php

See the quickstart quide on the web site for an overview of using it.

Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: dondo521 on February 04, 2005, 07:45:47 am
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
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ver!
Post by: equi on February 04, 2005, 11:41:31 am
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
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: Tarique Sani on February 04, 2005, 11:44:16 am
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?
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on February 05, 2005, 09:14:23 am
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

It should work with subdomains... It has before
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on February 05, 2005, 09:17:31 am
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?

Plans?  I don't even understand the request :D

Its also 3am and I have a presentation at 9am, so I am a bit fried

Can you expound on this idea?

Thanks much

Bill
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on February 05, 2005, 09:19:07 am
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


Well the $this = "" Should kill the object itself.  I promise to look more into this tomorrow... If I survive that long



Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: Tarique Sani on February 05, 2005, 09:24:31 am
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 :)
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on February 05, 2005, 10:49:06 pm
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 looked at google and at some pages at flikr that I could get at without creating a user... and still have no idea what you mean.

I get the idea of the front end that lets you decide the behavior... after that, what would the javascript do to display the photos?  It has to be able to query the database to get the photos, which means that it has to talk to the php script...  thats where I am not understanding what happens.  I am also really tired, so I may not be making much sense,,,

I need a nap - 4 hours of sleep last night is not cutting it








Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ver!
Post by: slicer on February 12, 2005, 04:36:12 am
I'd like to add this to a forum under the header but I haven't a clue where to enter the code.
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on February 12, 2005, 06:38:02 pm
I'd like to add this to a forum under the header but I haven't a clue where to enter the code.

I've only played with two forums at all, so I am not sure how to help you.  I guess starting with what forum you are trying to add it to would give me a fighting chance of helping ;)
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ver!
Post by: mrmike987 on February 13, 2005, 06:39:09 am
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

___________________________________________________________________
This is the code im testing with

<?php

include "./coppermine.php";
$objCpm = new cpm($CONFIG['dbname'], $CONFIG['dbserver'], $CONFIG['dbuser'],$CONFIG['dbpass'], $CONFIG['TABLE_PREFIX'], '/gallery');
$objCpm = new cpm("/gallery");

$objCpm->cpm_viewRandomMediaFromAlbum(3,6,6,array("imagestyle" => "test1"));


print "<hr>";

$objCpm->cpm_viewRandomMediaFromAlbum(3,6,5,array("imagestyle" => "test1"));
$objCpm->cpm_formatStats("% There are  %f files with %v views  ");
$objCpm->cpm_close();

?>
<style type="text/css">
img.test1 {  
          border-style:solid;
          border-width:5px;
          border-color: #7e7575;
          margin: 2px; }
   
img.test1:hover {
          border-style:solid;
          border-width:5px;
          border-color: #000000;
          margin: 2px; }
</style>


I would like to just get New Images instead of random but I cant get it to work...

Thanks
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ver!
Post by: FutschiKato on February 14, 2005, 10:45:06 pm
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
 :)
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: peeps on February 15, 2005, 03:05:30 am
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
 :)

I don't understand...why not just hard code the link to the image if that is what you are wanting to do...
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ver!
Post by: Tranz on February 15, 2005, 06:31:16 am
I was thinking the same thing.
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ver!
Post by: FutschiKato on February 15, 2005, 10:18:48 pm
Thanks for your quick answers! Perhaps I will describe what should be the final result of my questions:

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
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: peeps on February 15, 2005, 11:55:38 pm
Thanks for your quick answers! Perhaps I will describe what should be the final result of my questions:

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

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#...
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ver!
Post by: Tarique Sani on February 16, 2005, 05:57:23 am
Abbas has a bbcode hack with which you can write [thumb=324] and it shows a thumbnail linked to the proper picture (and it also respects permissions) - I will see if he can be cajoled into releasing it :)
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ver!
Post by: FutschiKato on February 16, 2005, 02:52:14 pm
peeps: I never thougt that way round.
Tarique: That sounds a lot like a solution. I would really appreciate this.

Cheers
Georg  :)
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on February 16, 2005, 06:04:59 pm
peeps: I never thougt that way round.
Tarique: That sounds a lot like a solution. I would really appreciate this.

Cheers
Georg  :)

If you need to access the coppermine database from elsewhere, you can directly use the coppermine_dao object...  its undocumented really, but I wrote it so it will function standalone to make it easy to get the data without all the formatting stuff. 

Thanks everyone for handling this question - I painted the room my computer is in a few days ago and the fumes are nasty.  That and I have stopped getting email notifications for some reason :(

Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ver!
Post by: mrmike987 on February 16, 2005, 09:18:36 pm
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
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on February 17, 2005, 10:08:35 pm

Hey Mike,

I emailed you the code to accomplish that.  Let me know if you did not get it...

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

Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: boboli on February 19, 2005, 12:02:06 pm
Hi vuud, thank you for the mod..
Big Problem:
can't have the test page to work:
here is the link
http://boboli.altervista.org/cpmfetch/cftest.php

if you click on the "Click on this link to get into your coppermine gallery. it should not work, but the path shown in the web browser should help you to find what the correct one should be." it works so I presume the
Code: [Select]
$ChangeThisToYourPartialUrlToCPG = "/gallery"; is correct

the strange is
Code: [Select]
ERROR: Path to Coppermine incorrect. (/var/www/html/gallery//include/config.inc.php) where I see 2 slashes after gallery...

any idea ???
thanx
Roberto - Italy
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ver!
Post by: deltafun on February 21, 2005, 01:04:07 am
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 :)
 
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: micro on February 23, 2005, 04:28:22 pm
i'm having some problems trying to get images posted to another site,,thought  copperminefetch (cfimageget.php) would be the solution but i'm getting error messages..
Code: [Select]
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

tried changing file permissions.

/photos   is the correct path
running coppermine 1.3.2
copperminefetch 1.0

thanks
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ver!
Post by: lilcgt on February 23, 2005, 04:41:39 pm
help please here is my erroe mess.

Notice: Undefined index: DOCUMENT_ROOT in C:\Inetpub\wwwroot\cpmfetch\coppermine.php on line 87
ERROR: Path to Coppermine incorrect. (photo//include/config.inc.php)
Fatal error: Call to a member function on a non-object in C:\Inetpub\wwwroot\cpmfetch\cftest.php on line 5

and this is my test file

<?php
include "../cpg132drop/include/config.inc.php";
include "coppermine.php";
$objCpm = new cpm($CONFIG['dbname'], $CONFIG['dbserver'], $CONFIG['dbuser'],$CONFIG['dbpass'], $CONFIG['TABLE_PREFIX'], '../cpg132drop');
$objCpm->cpm_viewRandomMediaFromCategory(1,1,9);
$objCpm->cpm_close();
?>

i have in following dir
/cpmfetch    this program
/cpg132drop  my coppermine photo gallery

i have tried several diff things and no luck i tried the test which comes with it and it gave some errors has well im a newbie so
SHOOT me
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: katharsis on February 24, 2005, 08:40:11 pm
I've got cfimageget working.  I've read through all this thread but I don't see where anyone has asked or explained how to get a result like cfimageget but rather than random, have it display a single thumb of the last image added to the gallery.  That's all I want, just a single image, not even a link.  I can't figure out where I should butcher the code. I'm suffering from option paralysis.
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: Nibbler on February 24, 2005, 08:52:53 pm
Tried this ?

Code: [Select]
cpm_viewLastAddedMedia (1, 1);
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: katharsis on February 24, 2005, 10:51:54 pm
Quote
Tried this?
Code: [Select]
cpm_viewLastAddedMedia (1, 1);Well...I have NOW.
Thanks!
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ver!
Post by: BZRK on February 25, 2005, 06:19:31 pm
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
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on March 01, 2005, 07:41:20 am
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

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


Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on March 01, 2005, 08:21:26 am

Sorry for the delay... the first one is already done... check the latest dev versions for the subtitle features.

CFImageget is being completely rewritten and will be very extensible after I am done.  You could be able to add this sort of functionality without changing the core application (leaving you open to upgrades).  Although that feature would get into the coppermine_dao library and need changes there.  I have not done anything with favorites, but if you get something going in that respect, send me a diff or patch so I can add it in here. 

Thanks!

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 :)
 
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ver!
Post by: unknown_girl on March 03, 2005, 06:31:11 pm
Hello! can anyone tell me a way to put in my site the 2 last images uploaded? like in htm if possible (not in php)
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ver!
Post by: Tranz on March 03, 2005, 06:35:24 pm
Not possible in html. The difference between html and php is like the difference between walking and driving.
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ver!
Post by: Nibbler on March 03, 2005, 06:38:18 pm
You can create a php page to get the pic, and link to it using an img tag from an html page.
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ver!
Post by: unknown_girl on March 03, 2005, 06:39:22 pm
Thanks, can you know explain me so how to do it in a php file?
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ver!
Post by: Tranz on March 03, 2005, 06:41:24 pm
The script comes with instructions.
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ver!
Post by: unknown_girl on March 03, 2005, 06:59:30 pm
the coppermine Fetch?? I download it, but I only know the random way, thats way I am asking, specila because my english is not so good
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ver!
Post by: n704fn on March 04, 2005, 12:33:43 am
Thanks again for this awesome script!  I've recently decided to make my gallery private, but would still like to use cpmfetch for avatars, and cpm_viewLastAddedMediaFromCategory, etc...  Can someone give me a hint as to how to use cpm_unlock_private  and the ramifications of doing so? Got that figured out, but...

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


 
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ver!
Post by: Rodinou on March 04, 2005, 03:11:01 am
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.php

Code: [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.php

Code: [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.php

Code: [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 ?
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ver!
Post by: unknown_girl on March 04, 2005, 01:02:00 pm
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)

Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: BZRK on March 04, 2005, 03:01:08 pm

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


Thank you, it did help :)
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ver!
Post by: canelli on March 04, 2005, 04:42:10 pm
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']  ?
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on March 05, 2005, 12:29:54 am
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']  ?



Its really starting to bother me that I dont get email notifications about new postings :(

The CONFIG is read by the program, but it finds it based on the DOCUMENT_ROOT

You can probably do something with cpm_init to start it instead of using the normal cpm constructor.  After that you can also call

cpm_OverridePathToCoppermine($path)
cpm_OverrideUrlToCoppermine($path)

The first should override where it looks for images from a filesystem point of view, the second is from a web browser point of view.  These are probably only available in the lastest version

Hope that makes sense to someone :D






Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on March 05, 2005, 12:35:01 am
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









Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on March 05, 2005, 12:38:54 am

What version are you using?  The 1.1.3 is much better with cfimageget - try that if you are still using the stable version (which is old)

My bad, I decided to redo all the cfimageget stuff again before the next release - then got real busy.  I want to finish it, but wont be able to for at least a few days.  The new way will be much better



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.php

Code: [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.php

Code: [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.php

Code: [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 ?

Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on March 05, 2005, 12:41:31 am

To say the least, the cpmFetch RSS stuff is not ready for primetime.    It seems like you are sending a feed, so I do not understand if this is fixed, or if its a problem with your newsreader.

I just dont know  ???



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)


Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ver!
Post by: unknown_girl on March 06, 2005, 06:25:11 pm
vuud, thanks any way
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on March 06, 2005, 08:26:54 pm
vuud, thanks any way

Are you sure your reader is working correctly?  I am working on a new release right now, then the RSS functionality will get a good going over for the next one. 

Good luck
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: n704fn on March 06, 2005, 08:43:44 pm
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
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on March 06, 2005, 10:35:44 pm
Tried that, but it just broke cfimageget.  No errors, just no image.  Looking forward to the next version.
Mark

Hmmm, okay.  Well, I have been working today on it, and have the cfimageget up to where I think I want it.  Depending on a few other things I could have the new development version (which is really going to be a release candidate for the next stable) out later today or tomorrow.  Depending on how much I feel like testing later on today.

Private message me with an email addr if you have time and want to try this one in the meantime...

Happy days





Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: pierse on March 07, 2005, 12:40:26 am
I have been trying to re-create this:
Quote
$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");
but 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. ;)
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on March 07, 2005, 01:39:20 am
I have been trying to re-create this:
Quote
$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");
but 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. ;)

Is tiny portal (SMF) related to the SMF forums?  If so, I just installed SMF so I can actually try this.

What are the errors you are getting?  Does anything happen?

Also, what version of Coppermine fetch are you running? 
Title: Is anyone using this on cpg 1.2.x?
Post by: vuud on March 07, 2005, 02:29:07 am

I was just wondering if it worked back to that version... If it does, then I will request this thread gets marked for 1.2 also... 

I've tested it with 1.4 beta and it worked alright (more testing when 1.4 goes final)

Vuud

Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ver!
Post by: Rodinou on March 07, 2005, 02:48:07 am
From my part, I'm usign Coppermine 1.3 ... and the latest version of your mod available on your site ...
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: pierse on March 07, 2005, 06:28:16 am
I am using version 1.0 of the fetch...  The error is a parsing error. 
Title: Okay, development 1.1.4 is up for download
Post by: vuud on March 07, 2005, 07:31:43 am
Once again its code freeze time. 

http://cpmfetch.fistfullofcode.com <- get it there

No real changes will be made between this and the 1.2 STABLE release.  Bug fixes and minor stuff only.

So please try this one...  Its better than the 1.0 stable... a few problems people have found are much better with the development versions, which is why I am going to put the 1.2 out before I am sure the RSS stuff is stable.

So PLEASE use this one instead of the stable.

Okay, the big change between this version and the last dev version is with two things:

* Randomization is better (thanks to M. Sidon)
* cfimageget is 100x better (complete re-write)
* Fix to the new ___from calls - bug in certain circumstances

The changes to cfimageget.php are pretty significant.  You can continue to run it exactly how you have been doing it, but that will require you to change line 25 (in version 1.1.4) from:

$ALLOW_DIRECT_ACCESS = false;

to

$ALLOW_DIRECT_ACCESS = true;

This was put in place since you may or may not want people able to just change the parameters and retrieve whatever.  If you do not want people to have this ability, leave it false and check the new file in there cfig_random.php for an example of making a single use file.  So you just call the file with no parameters instead of the old way.

Easier to look at, and you will see what I mean



Overall, since the last stable - these are the changes:
(1.1.4) - Release candiate for 2.0
Randomization improved in coppermine_dao calls
cfimageget.php completely redone
Bug fix to getRandomImageFrom and getLastImageFrom routines
(1.1.3) - Development release
Added subtitle option (same syntax as alttag) - to display subtitles in the grid layouts
Added cpm_showCategoriesUpdatedOverLastDays($numberOfDays,$options="")
Added cpm_viewLastCommentedImages - shows last commented images, provides subtitle access to comment
(1.1.2) - Development release
Added call to cpm_OverridePathToCoppermine($newpath_)
Added call to cpm_OverrideUrlToCoppermine($newpath_)
Bugfix for uninitialized variable in some situations
Second attempt at fixing the bug with being in the root
(1.1.1) - Development release
Bugfix for coppermine being installed in the root of a web server
setReturnType([print, html, resultset]) to have functions return rowsets, htmldata or print it
All functions recoded to support setReturnType as much as possible
Lots of internal changes to make extension easier (aka RSS Feeds)
Added a debug flag in case anything happens out there
Added in prototype for java popup window for imagelink=large / windowtarget = _blank
Included javascript file for providing pop method
(1.1.0) - Development release
Show user galleries when category 1 is asked for (category 1 = cid > 10000)
Internal opimizations
styles now standard across all functions
cpm_viewLastAddedMediaFrom( )
cpm_viewRandomMediaFrom( )
cpm_showAlbumsUpdatedOverLastDays( )


On a more personal note:
I would like to thank anyone who answered a question for anyone else in here since I put this up.  It makes things easier on me, and having that sort of occurance makes me want to continue with this project.  So thank you all very much.  In fact, people who answer questions would probably have a better chance of getting feature requests fullfilled ;D







Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on March 07, 2005, 07:42:18 am
I am using version 1.0 of the fetch...  The error is a parsing error. 

Hello,

A few things... first - I would recommend version 1.1.4 (or newest dev) instead of 1.0 - especially if you are doing something like putting it in a template.

Second, are you doing the $objCpm = new cpm('/photos'); and stuff before hand?  Can you post the parse error, or email me the template or give me any idea of where it is breaking?

I want to help, but version 1.0 and parse error is not enough info for me to give you a suggestion (except upgrade :D )

Talk to you soon







Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ver!
Post by: Arlo on March 08, 2005, 07:03:44 am
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?
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on March 08, 2005, 07:12:42 am
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 ;)


Title: Current function list (as of 1.1.4)
Post by: vuud on March 08, 2005, 08:22:00 am
So I was working on the documentation, and realized there was a lot that was not really touched on lately...  I made a nice list of the basic functions you would use in cpmfetch and thought I would post it, just so people knew what was in there

The functions you can call can be divided into four groups by what they do.

Functions that return images

Functions that return textual statistics

Functions that return gallery level images and text

Functions that control this program and its behavior


Brief explanation of some of the above parameters

$albumid - is always the numerical id of the album
$catid - is always the numerical if of the category
$source - this is a new way of specifying albums and categories at the same time
$rows,$columns - the combination determine how many total to show and in what orientaion
$columns - how many columns of images to show
$options - this is an array of options (covered below)
$format - text to display interspersed with placeholders for variables

There are some real nifty new things in here... 
For example:

cpm_setReturnType($type)

$type can usually be:  html, print or resultset - resultset actually gives you back the mysql result set - so you can do whatever you want with it.  have a ball.  html and print do the same thing most times.

Another good one is the

cpm_viewRandomMediaFrom  and cpm_viewLastAddedMediaFrom calls
These accept a source string:

Here is a hint  $source = "cat=1,2,3:album=27"

Well more later

Vuud
 :P
Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: Arlo on March 08, 2005, 01:32:34 pm
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!
Quote
:-\\

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 ;)



Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: vuud on March 08, 2005, 04:50:58 pm
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!
Quote
:-\\

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 ;)

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 :)


Title: Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
Post by: Arlo on March 08, 2005, 07:09:56 pm
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 :)

Yeah, the only reason I went to imageget was because coppermine.php broke.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: vuud on March 08, 2005, 09:37:25 pm
Arlo was nice enough to test a fix for PHP5 for me...  Here it is in case anyone else is sitting around waiting for it... Mind you this only applies to version 1.1.4 (but could be applied to older ones).  Version 1.1.5+ will have this done already

Code: [Select]
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=""

So AFAIK, this is now PHP5 compatible

:D

Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: pierse on March 09, 2005, 08:28:07 pm
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. ;)
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: vuud on March 09, 2005, 08:44:16 pm
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. ;)

Okay, so this is being done in a tiny portal template?

Can you post the actual code you used here... are you using cfimageget.php?  If you are, you need to go into the file and enable direct access (instructions are in the file)?

One of the changes to cfimageget.php is that while it can start to support greater functionality, it had to become more secure.  So by default direct access ships as being off.





Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: Joachim Müller on March 10, 2005, 09:08:26 am
Well I upgraded to the latest dev release
If 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.
If you're refering to the devel version of CoppermineFetch, please ignore this posting.

Joachim
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: n704fn on March 10, 2005, 09:21:07 am
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. ;)

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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: pierse on March 10, 2005, 03:09:20 pm
 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.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: vuud on March 10, 2005, 05:05:00 pm
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.

Since you did not mention it, I have to assume you missed it in my above posting (which in retrospect should have had more !!!!!!).  This is very important and I cannot help you if you do not check this.  So do this.  Now.  Make sure.

Open cfimageget.php in an editor and look near the top (around line 28 in version 1.1.4)

Code: [Select]
// CHANGE THIS TO TRUE IF PEOPLE ARE ALLOWED QUERIES THROUGH HERE
$ALLOW_DIRECT_ACCESS = false;

If use see it and it still looks like that, change it to this:

Code: [Select]
$ALLOW_DIRECT_ACCESS = true;

Until you do this, cfimageget.php is doing exactly what it should do.  The new alternative way is to create your own file to call it, as shown in the cfig_random.php file (basically its just settings you use, instead of a long URL to set categories and stuff).

Hope this helps you


Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: vuud on March 10, 2005, 05:06:54 pm
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

Mark,
See my post to pierse above...  the cfimageget.php file has changed and by default direct access as it was before is disabled.  Very easy to enable though.

Sorry for any confusion,

Bill
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: vuud on March 11, 2005, 02:09:38 am

Pierse,

You can make this change now, or wait for later tonight and I will post a new version.
(This fix applies to version 1.1.4 only - it will be fixed in 1.1.5 and beyond)

Find line 147 in cfimageget.php
$this->setAllowedTypes($allowedtypes);

Change to
$this->setAllowedTypes($this->allowedtypes);

That should help bunches with this error :)

Sorry about that ::)

Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: daverad on March 11, 2005, 04:12:14 am
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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: pierse on March 11, 2005, 05:26:59 am
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.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: vuud on March 11, 2005, 05:33:26 am
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

Yes.

In the optionshash set
imagelink - [none|album|large] - Where to link to when clicked.

Also, if you use
windowtarget = _blank

and you include the popup.js you should get a nice popup.  I am looking and you probably will have an error if you dont.  I should work on that



Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: vuud on March 11, 2005, 05:36:28 am
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.

no, you have to use the standard coppermine.php and the statistic functions in there.  You cannot get statistics out of cfimageget or the cfig_random functions.  Follow the quickdocs on the website

http://cpmfetch.fistfullofcode.com


Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: vuud on March 11, 2005, 08:04:17 pm

Okay, one more step along the road to a new stable release.  Development version 1.1.5 is now up for download.

http://cpmfetch.fistfullofcode.com - see the download section

There are two fixes:
* One to the randomizer code
* One to cfimageget's object init

The documentation has the most changes... see the readme in the doc directory.  Much work has gone into this and more will before the next release. 

If you like the program, click the applaud link on the left of any of my posts, I'd appreciate it :D

As always, send comments and suggestion

Vuud




Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: mrmike987 on March 11, 2005, 09:14:41 pm
Is it possible to show the date the image was added under each thumbnail?
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: vuud on March 11, 2005, 09:41:33 pm
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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: vuud on March 13, 2005, 06:28:10 pm
Is it possible to show the date the image was added under each thumbnail?

Oh, BTW - when you do display the date or time, it will be using the servers date and time, not your machine.  So if you are in one time zone and the server is in a different time zone, the date could be off.  I guess its all relative since who ever is viewing your photos could be in yet another time zone.

Happy happy joy joy
Title: A wee hack of mine...
Post by: Arlo on March 13, 2005, 10:55:12 pm
Forgive me if this has come up, but I made a small change (I wouldn't be so presumptuous to call it a hack :) ) to coppermine.php which allows dynamic thumbnail sizes within a given <div> block. I simply changed line 1119 from:

Code: [Select]
$htmlOut .= " src=\"$imagefile\"" . " />";to:
Code: [Select]
$htmlOut .= " src=\"$imagefile\"" . " width=\"100%\" />";
You can see it in action at my site, http://www.dalahus.com, where I have a mix of both a single full-size random thumbnail and a 2,2 block of last additions at half the size. I'm sure there are better ways to do this, but this seems to work well enough (for my needs anyway).

Hopefully a future version of cpmfetch will give us thumbnail sizing as a proper parameter (please please?)
Title: Re: A wee hack of mine...
Post by: vuud on March 13, 2005, 11:58:40 pm
Hopefully a future version of cpmfetch will give us thumbnail sizing as a proper parameter (please please?)

Its good to see someone hacking the code... the more people that get in there, the better the chances things will improve.

Anyway - there is no plans at this time, and probably will never be an option for this under cpmfetch.  Hah!  So there!  >:(

But before you feel too bad, I have plans to add an option so that you can include whatever you want in the img tag, and probably in the td and table tags too.  So if you want to include width='100%' you can.  If you want to include doesnothing='yes' you can do that too.  This way, it lets you do anything you want without ending up with 1000 different options. ;D

It would also allow people to insert alignment settings if they want to without using css to do it.

But that does not work yet so your gonna have to do your way you want it to work for now...

Vuud




Title: Re: A wee hack of mine...
Post by: Arlo on March 14, 2005, 02:07:04 pm

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! ;)
Title: Re: A wee hack of mine...
Post by: vuud on March 14, 2005, 05:30:17 pm
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! ;)

Everything is going according to plan then... excellent.  Wait, did I say that out loud?
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: mrmike987 on March 17, 2005, 12:36:20 am
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"
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: vuud on March 18, 2005, 07:04:00 am
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"



No, but that is a damned good point.  I will add that in and post when I build a new dev version (a day or two I'd say) - maybe sooner





Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: mrmike987 on March 20, 2005, 01:56:08 am
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?
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: vuud on March 20, 2005, 04:24:08 am
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?

Absolutely...  check the docs for the options array at this link:
http://www.fistfullofcode.com/projects/copperminefetch/docs/readme.html#optionsarray

There is much that can be done in that array
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: mrmike987 on March 20, 2005, 05:14:30 am
Thanks for the responce but I suck at code and have no idea how to do it. The docs dont help people like me,,
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: vuud on March 20, 2005, 06:01:56 am
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!





Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: pierse on March 20, 2005, 06:56:48 pm
okay... still trying to get this code to work:

Quote
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();

I am using Tiny Portal For SMF beta .5; using a phpbox block;

I get the following error:

Quote
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

Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: vuud on March 20, 2005, 07:12:00 pm

I am thinking that it is the include, and not being able to find coppermine.php.   I am guessing here, but I am thinking that whereever the php file is being executed from is not right above the gallery directory.  If you can try including the whole path to the coppermine.php file, it may help.  The trick is the reference has to be right from where the php is being executed... so if file A includes file B (which is your block), file B's contents are executed at file A's location.

More on the include function is at:
http://us2.php.net/manual/en/function.include.php

Let me know if this helps!


okay... still trying to get this code to work:

Quote
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();

I am using Tiny Portal For SMF beta .5; using a phpbox block;

I get the following error:

Quote
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


Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: mrmike987 on March 20, 2005, 08:14:25 pm
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!






Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: vuud on March 20, 2005, 10:36:15 pm

See, thats what happens when you ask for help...  Sorry about that...

Replace where I said "gallery" with "album"... that will fix it.

If either one us read the docs, we could have fixed this by now :D





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!






Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: pierse on March 21, 2005, 05:31:50 am
I changed all the information to direct url address. All the other errors are gone... I have a new one now...

Quote
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 link... but I'm new to php code... so all that coding, got me lost and confused.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: vuud on March 21, 2005, 06:57:22 am
I changed all the information to direct url address. All the other errors are gone... I have a new one now...

Quote
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 link... but I'm new to php code... so all that coding, got me lost and confused.

Pierse, I am note sure what is going on in there.  If the other errors are gone then you should not be getting a problem finding the object.

For lack of the energy to install tinyportal or any other real ideas right now (its late) try the following:


* Change the include to require

* Add this in above the code there
error_reporting(E_ALL);
ini_set('display_errors',1);  // 0 is off, 1 is on

Maybe it will cause something new to be displayed.  Also, hopefully your on a version that is somewhat new... 



Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: hansgans on March 21, 2005, 08:51:33 am
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 
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: pierse on March 21, 2005, 12:24:08 pm
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');
Quote
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.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: vuud on March 21, 2005, 04:58:20 pm
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');
Quote
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.

Yes, that is exactly the case.  If you are willing to let me into your code for a few minutes I can see if there is something obvious.  personal message me if you want to try that.

Did you try the other suggestions I left above?
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: vuud on March 21, 2005, 05:01:35 pm

You need to add it into the options array.

After the (3,3,4), you need to make it (3,3,4,array( "key" => "value"))

Where key and value are at least one of the options from the docs...

http://www.fistfullofcode.com/projects/copperminefetch/docs/readme.html#optionsarray

You also want to include in your web page the js file from the cpmfetch directory... this will give you full size like cpg does





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 
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: pierse on March 22, 2005, 04:27:58 am
yes I did do the other suggestions... I used full links, changed it to require, and added the debug... same error as reported above.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: vuud on March 22, 2005, 07:22:46 am
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)



















Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: vuud on March 23, 2005, 09:27:14 pm
yes I did do the other suggestions... I used full links, changed it to require, and added the debug... same error as reported above.

I don't know then... make sure you have a new version (not a really old one).  Otherwise I do not know what to tell you.

It should work..  The only thing I can think of is that you are not using a newer version, and a real old one where the new fangled constructor was not in use.

Otherwise, someday I will play with SMF and getting it working there

Which it should do!
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: Floods on March 24, 2005, 12:26:29 am
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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: vuud on March 24, 2005, 01:22:24 am
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



Hi,

Move to the last development release, or wait till next week when it will be marked as the new stable.  I'd recommend just doing it now, since little else will change.

That will fix all your problems!

:D

Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: sheylak on March 24, 2005, 05:40:01 pm
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=_blank
Quote
<?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! :)
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: vuud on March 24, 2005, 10:08:39 pm

It looks correct.  Don't bother with the stable 1.0 release... get the newest dev from

http://cpmfetch.fistfullofcode.com

If that does not fix it, then post a link where I can see it.  or message me the link if it is sensitive.

Hope that helps somewhat




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=_blank
Quote
<?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! :)
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: mrmike987 on March 24, 2005, 10:51:37 pm
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 ;D





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)




















Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: vuud on March 24, 2005, 11:54:14 pm

It goes before it at some point on the page.  Like so...


$objCpm->cpm_setDateFormat("format string goes here");
$objCpm->cpm_viewLastAddedMediaFromAlbum(2,5,6,array("subtitle" => "<center>Added<br>%w","imagelink" => "album"));


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 ;D





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)




















Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: nameless on March 25, 2005, 02:02:54 am
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'''1011110,'','','','',''?>
</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>


Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: vuud on March 25, 2005, 02:20:41 am

Hi, glad it worked for you!  Love to hear from people that its working well.  If your on the stable version, the new stable will be out this weekend unless someone tells me its not working right

Is the problem you are showing below a problem with cpmfetch or wordpress?  I don't know wordpress, but I'd be happy to help with cpmfetch problems

Thanks again!





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'''1011110,'','','','',''?>
</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>


Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: mrmike987 on March 27, 2005, 08:09:05 pm
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.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: vuud on March 28, 2005, 06:50:15 am
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



Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: vuud on March 28, 2005, 08:26:26 am
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.

Oh, you can do a list of most recently updated galleries though...

http://www.fistfullofcode.com/cftest/index4.php <- that is a test page, so it may or may not be there when you look at it.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: nameless on March 29, 2005, 12:10:05 am
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?
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: vuud on March 29, 2005, 02:23:45 am
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?


Well, going the coppermine fetch route will generate a table, which could screw up formatting.  If you have an example page I can take a peek and see what may be causing it.

As for the latter, about CFIMAGEGET returning the same image when called multiple times it is a browser cache issue.  Basically the browser thinks it just got it when you call it a second time so it just displayes the one it just got.

Not sure if these would work:

* If you only wanted a few you could make the non-direct files for getting images and give them different names random1, random2, random3

* 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.

As for a link with CFIMAGEGET - no.  It returns just image data, so it is useless as far as that goes. 

I'd like to get the wordpress integration working, as a bunch of people seem to have issues with different addins.

Also, new stable release coming out tonight I think (the last dev version is going to be it, if no-one can wait)












Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: nameless on March 29, 2005, 02:48:12 am
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.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: Chopper on March 29, 2005, 02:54:35 am
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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: vuud on March 29, 2005, 03:55:29 am
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.

Oh yeah, if you only draw from one gallery, you can wrap it in a link...  sorry, did not ask that much

Good thinking though...


Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: vuud on March 29, 2005, 04:04:06 am
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

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







Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: nameless on March 29, 2005, 07:47:33 am
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'''1011110,'','','','',''?>
</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>
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: vuud on March 29, 2005, 08:01:48 am

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  :P




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'''1011110,'','','','',''?>
</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>
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: nameless on March 29, 2005, 08:42:57 am
Quote
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 

 ;D LOL, check PM
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: Chopper on March 29, 2005, 11:39:47 am
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.  :-\\

(http://www.animationcorner.com/misc/screencap01.gif)
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: vuud on March 29, 2005, 06:50:44 pm

Thanks for the screenshot... something is a little whacked in there.  You should not be getting flash icons unless you specified it as an allowed types.  This is probably a bug in the newely rewritten cfimageget... 

I will look at it this morning before I package the new stable release (which will be 1.1.6 + this bug fixed)

(at least its not monday)



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.  :-\\

(http://www.animationcorner.com/misc/screencap01.gif)
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: vuud on March 29, 2005, 08:05:49 pm

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.  :-\\

Wait a sec, your not using cfimageget, your using the normal way aren't you.  Yeah, changing that file in this case is going to do two things... jack and shit. 

So anyway, your calling the coppermine.php file and object right?  Good, thats the proper way to do this. 

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.

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?

Anyway, you can do the filter on this object also... that would remove all the flash icons and such.

Inquiring minds want to know...

:D













Title: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New Stable
Post by: vuud on March 29, 2005, 08:49:34 pm
I just posted the version 1.2 stable release.  If you are on 1.1.6 you need not bother - I am not sure anything at all changed since then,.

Updating:

Everything should be backward compatible, so unless you have something hideously old it should just need to be dropped in.

CFIMAGEGET this has changed slightly since the last stable.  It will not work out of the box as I have it turned off by default.  See the instructions online or in the file to get this working.

The readme file http://cpmfetch.fistfullofcode.com/projects/copperminefetch/docs.php (click on readme) has a list of changes for each version.  Best to peek there for an idea of whats new since when.

Suffice to say that this version is 100x better than 1.0 which was a good start.

The docs in the readme have been given a giant once over - much better - a must read for everyone.  If anyone has any suggestions on them - please send them to me.

Two things worth noting:

1. I will be posting a signup for notifications when I release new versions - Sourceforge turned off notifications from here, so I figure I have to do something.

2. If anyone wants to tell me if they have this working embedded in any other system, that would be great.  phpBB, SMF, etc...

3. I am going to start posting some how-to's when I get a chance... I think a lot of the cooler features get overlooked.

I guess thats about it for now.


Bill "Vuud" Chmura


Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: Joachim Müller on March 30, 2005, 12:55:47 am
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.

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?
Chopper is using ImageMagick instead of GD probably...

Joachim
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: mrmike987 on March 30, 2005, 03:17:03 am
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...
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: vuud on March 30, 2005, 03:18:48 am
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.

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?
Chopper is using ImageMagick instead of GD probably...

Joachim

Strange, I am using GD 2 and I tried to upload a BMP and it went bad...

Code: [Select]
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
So BMP's are supported in CPG?





Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on March 30, 2005, 03:30:47 am

YES

You can do it through the use of CSS setting the text-alignment for a tag and using the options array with the various css settings. (cellstyle, etc)

It generates its own table so embedding it will have no luck whatsoever



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...
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: luke on March 31, 2005, 03:19:19 am
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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on March 31, 2005, 07:15:07 am
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

Phooey on me for the error :(

Kudos to you for reporting the problem with a fix :D

Thanks much, hope all else works for you
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Damonik on March 31, 2005, 08:01:54 am
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.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on March 31, 2005, 08:19:25 am
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.


I assume you removed the path (good thinking to remove the path for security reasons) but did it include the file that the line 63 and 81 occurred in?

Also, what server are you on?  It seems like it does not provide the document root parameter.

Strange


Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Damonik on March 31, 2005, 08:53:58 am
Have shot you a pm:)

Its on IIS 5.0.

Thanks!
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on March 31, 2005, 10:40:38 am
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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: hansgans on March 31, 2005, 11:28:21 am
how to add

that this is a link and the text Pictures

 $objCpm->cpm_listMediaCountForAlbum (89);


xx Picture with link to the album

 
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Damonik on March 31, 2005, 03:05:21 pm
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! :)

Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on March 31, 2005, 06:47:36 pm
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 will poke through and see what else can be used... also, its strange that it still works with the errors.  At the least, I can silence the errors.  I'll try to whip something out this afternoon.



Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: cdrake on April 01, 2005, 03:58:30 am
When I try to use the mod to include anything into my page is really messes up the layout? Do you know why this is happening? I think it might be because of the tables it creates but im not sure. Is there anyway to fix this?

http://drakeshangout.com/gallery/index.php


Thanks.

*EDIT* I fixed it. I had to remove

starttable("100%", $lang_ecard_php['title'], 3);

 from the header.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: cdrake on April 01, 2005, 04:45:26 am
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.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 01, 2005, 06:36:56 am
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.

Yeah, that sounds like something it would do.  Did not think gif's were supported in coppermine soooooo the program does not even look for them.

I can fix that though


Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: cdrake on April 01, 2005, 07:06:40 pm
Ok. Thats great because I need to know :p

Also. Is there a way to make the title of an image display under it?
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 01, 2005, 07:49:47 pm
Ok. Thats great because I need to know :p

Also. Is there a way to make the title of an image display under it?

yes, there is a whole slew of things you can do under the image.  Check the docs under the optionshash and stuff.  Or load up the page and search on subtitles.

They are hidden a bit in the docs, which I just realized now.

 :-\\
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: cdrake on April 01, 2005, 09:40:23 pm
Would you happen to know how to make the title of an image appear under "Last additions" etc?
 
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 01, 2005, 10:07:59 pm
Would you happen to know how to make the title of an image appear under "Last additions" etc?
 

Of course I know how to... I wrote the damn thing.  I spent a lot of time on the documentation also so that I could focus on adding new stuff.

These are the two sections of the documentation that is relevant. 

http://www.fistfullofcode.com/projects/copperminefetch/docs/readme.html#optionsarray
http://www.fistfullofcode.com/projects/copperminefetch/docs/readme.html#formatoptions

Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: cdrake on April 01, 2005, 10:41:47 pm
I was talking about

Code: [Select]
case 'lastup':
                display_thumbnails('lastup', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false);
                flush();
                break;

I figured out how to use your script but I was wanting to format it like coppermine does just have the title under the image.

I tried doing this but couldnt get it to work.

Code: [Select]
<td class="tableb"><?php
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewLastAddedMediaFromCategory ( 1,1,6,
<div class="text bpanel">
</div>
</td>
<td class="tableb">$newcontent); ?>


Sorry for wasting your time.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: cdrake on April 01, 2005, 10:44:46 pm
I was wanting it to output html like http://www.drakeshangout.com/gallery/ but i think its beyond the limits of the script?
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 01, 2005, 11:13:33 pm
I was wanting it to output html like http://www.drakeshangout.com/gallery/ but i think its beyond the limits of the script?

If you just want the image with the caption under it you can definately do that.  Its called %c in the format codes.

Code: [Select]
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewLastAddedMediaFromCategory ( 1,1,6,
<div class="text bpanel">
</div>
</td>
<td class="tableb">$newcontent); ?>

I am not sure what that is above... 

You want something like this:

Code: [Select]
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewLastAddedMediaFromCategory ( 1,1,6,array("subtitle"=>"%c"));

I really want to chastise you for not reading the docs, but now that I have looked at this part I am not even sure I could understand it.  Something I will have to improve.  I hate writing docs.

If anyone feels like submitting improvements to the docs, I will be grateful






Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: cdrake on April 02, 2005, 01:15:40 am
I have looked through the docs quite a few times but am aparently blind. I have everything figured out now... I think.

Two final questions.

Is this correct?
-------
$source = "cat=2,3:album=47";
-------
$objCpm->cpm_viewLastAddedMediaFromCategory (4,1,$source);
-------

I keep getting the error

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/drakesh/public_html/gallery/cpmfetch/coppermine.php on line 988

2. How can I make where %c will link to the page the picture is on and how can I enable gifs to be recognized.

Thanks.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 02, 2005, 01:53:19 am
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);
-------

It is correct for the source format, but the source only works with the cpm_viewLastAddedMediaFrom(4,1,$source)

Wierd on the error, I will have to see why you are getting that...

As for linking subtitles, no - currently there is no way to do that - but its something I will most likely do in the future...


Hope that helps
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: cdrake on April 02, 2005, 04:22:38 am
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?
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 02, 2005, 05:03:55 am
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 think I am getting confused between two conversations on gifs...

If you just want it to be able to display gif's as part of your images it can already do that.

Just add in gifs to the filter...

$objCpm->cpm_setFilter(array(".jpg",".gif"));

after you create the object.




Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: cdrake on April 03, 2005, 03:20:08 am
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.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 03, 2005, 06:36:07 am
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.


hah - sorry, yes it will still ignore gif's in that capacity.

I'm rebuilding a linux firewall to obsd over the next day, then I will get that into a dev version

So check back in a day or two for a posting about it

Thanks


Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: cdrake on April 05, 2005, 09:45:02 pm
ok. I cant wait  ;D ;) :D
Title: cfimageget.php - not working
Post by: Dsq on April 05, 2005, 09:54:38 pm
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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: ISBB on April 06, 2005, 01:14:46 am
 ???

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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 06, 2005, 06:52:59 am

Regrettably there was a syntax error in the cftest.php ... You can either add a ?> on line 37 or downoad 1.2.1 and use that.

That file has now been added into my build system so it will be syntax checked automatically in the future.

My bad



???

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
Title: Re: cfimageget.php - not working
Post by: vuud on April 06, 2005, 06:54:52 am

To use cfimageget you only need to edit the top of that file.  Unless you are on a strange web server.

Most importantly

$ALLOW_DIRECT_ACCESS = false;

Has to be set to true if you are going to call that script from html directly.

And the $urltocpm has to be set

Hope that helps!



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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Dsq on April 06, 2005, 08:36:19 am
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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 06, 2005, 10:04:19 pm
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

Sounds like you have it set right.

Somethings to check...

1) Is cfimageget located in the cpmfetch directory under your web page (ie: the path you have in the image tag)..  in other words, can your img tag find it from where it is?

2) Try calling it directly with a web browser (not in a page) ... that way syntax errors will show up on the screen (sometimes you need to View Source IIRC)

The second is very helpful when I run into problems.

Also, right clicking on the X image can also give you an idea of what is wrong... it could list a photo but simply be a bad path... see what the properties are.

Hopefully one of these will be a winner
 :D










Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Dsq on April 06, 2005, 10:26:06 pm
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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: ISBB on April 06, 2005, 11:48:33 pm
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..
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 06, 2005, 11:55:53 pm
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

I am betting the second slash is an artifact in the program... to insure that there is a slash... yes, its a bad way to do it, but should not affect your url.

I just checked and I think it is a problem in my program... I will look at it and post again later





Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 07, 2005, 01:51:00 am
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..

its not my program giving you the same image... its your browser deciding it already got one from that exact file and it can just display it again.

Someone reported that you could just stick some bogus parameters after it to trick the browser into doing it again...

cfimageget.php?longtallsally=shessofine
cfimageget.php?happyhappy=joyjoy

That should fix what ails you









Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 07, 2005, 01:56:44 am
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

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


Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: ISBB on April 07, 2005, 03:06:44 am
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??
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 07, 2005, 06:08:43 am
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??

If you are specifying the album in your request you can always wrap the img tag in a link tag...

Otherwise no, until I work out an SSI accessor for cpmfetch.  Which I have no idea when that will be

:(
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: luke on April 07, 2005, 12:30:17 pm
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

Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Dsq on April 07, 2005, 07:50:49 pm

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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Texan78 on April 08, 2005, 12:52:49 am
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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 08, 2005, 06:25:53 am
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


Yep, curse these beer infused fingers :D

Much appreciated!  Its fixed here... be posted with the next version

Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 08, 2005, 06:26:56 am

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

I am still not sure how that breaks things... I had it in before and only one person reported a problem with it... It was working for me, until now...

Ah well, I guess its better left unused...



Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 08, 2005, 06:31:39 am
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

Did you get any errors above that?  Getting that one typically means that the object was not created...

Did you see anything like this above it:  ERROR: Path to Coppermine incorrect

Vuud

Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Texan78 on April 08, 2005, 07:35:45 am
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?
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 08, 2005, 07:50:12 am
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?


Oh that is freaky.  What version of cpmfetch are you using, what version of coppermine and what kind of webserver?

Also, if you can pm the link to that cftest page so i can look at it - would be great

Vuud
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: jaslow on April 08, 2005, 09:47:55 am
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.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Texan78 on April 08, 2005, 11:03:51 am
Im using verison 1.2.2 of cpmfetch that was freshly downloaded from your site today, well actully yesterday by the time you see this...LoL Havent been to sleep yet so its still the same day...LoL Coppermine verison 1.3.2 and what info about my webserver do you need. I have never been asked that before so i dont know how to answer that, sorry...Ok, the Link is, http://www.texascampingforum.com/forum/cpmfetch/cftest.php

The first couple of lines of the cftest.php that was instructed to edit:

Code: [Select]
<?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>&nbsp;</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>";


Now the cftest is the only file i edited per instructions. Now could it be they way i loaded it onto my server. It is in a folder in the root dir. for my portal. Is that ok.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: kegobeer on April 08, 2005, 12:50:21 pm
You didn't edit that file correctly.

$http//www.texascampingforum.com/gallery = "/sphotos";

is not correct.

$ChangeThisToYourPartialUrlToCPG = "/gallery";

is correct.

@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.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Texan78 on April 08, 2005, 07:27:45 pm
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?
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 08, 2005, 08:15:15 pm
@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.

No matter how I change it... it will be misinterpreted...  You are right about the name though... took me a minute but I see what you mean. 

Thanks




Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 08, 2005, 08:19:07 pm
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




Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 08, 2005, 08:26:09 pm
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?

What you are getting makes no sense...

Can you post the top of your file again to make sure that it is changed right?  If it was wrong you should get other errors though...

Its strange though... the error means that the object was not initialized, but if an error occured initializing it, you should have gotten an error back about that.  Wierd
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Texan78 on April 08, 2005, 08:30:43 pm
Here ya go,


Code: [Select]
<?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>&nbsp;</p>";
$objCpm->cpm_close(); 
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 08, 2005, 08:46:43 pm

Damn, I hope this fixes it...

Find this line...

Code: [Select]
<?php
$objCpm = new cpm( );

and change it to this... I have no idea why this is changed, but this would definately be a problem.  Exactly the way it is shown below... do not modify it at all.

Code: [Select]
$objCpm = new cpm($ChangeThisToYourPartialUrlToCPG);



Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Texan78 on April 08, 2005, 08:48:24 pm
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.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 08, 2005, 10:13:39 pm
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.

Excellent, glad it is working.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Texan78 on April 08, 2005, 10:20:12 pm
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.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 08, 2005, 10:34:28 pm
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.

What is the link to the example... its getting messed up on the path to the images then
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Texan78 on April 08, 2005, 10:52:24 pm
<img src="gallery"/cfimageget.php?album=7" />


my portal is http://www.texascampingforum.com/forum/portal.php
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 08, 2005, 11:01:44 pm
<img src="gallery"/cfimageget.php?album=7" />


my portal is http://www.texascampingforum.com/forum/portal.php


Your forums are php pages... I would recommend not doing the cfimageget and instead use the normal coppermine.php file...

see the quickstart on
http://cpmfetch.fistfullofcode.com

for a quick illustration of the code you would need to put in.

If you are intent on following this route...

1) Your path is clearly wrong in those tags.  the img tag src should be pointing at the cfimageget.php file

2) You need to open cfimageget.php and change two things at the top (one is the same sort of change you had to make to the cftest.php and the other allows you to query cfimageget.php directly.







Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Texan78 on April 08, 2005, 11:37:58 pm
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();
?>

Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 08, 2005, 11:44:43 pm

Yeah, this is not really non-programmer super friendly.

You got the "/gallery" part right, but that include is probably not right for your installation.

Change the include "./CoppermineFetch/coppermine.php";

to the actual path to where the coppermine.php file is located.   So if the coppermine.php file is in the same directory as the forum, then it would be just:

include "./coppermine.php";

Or whereever... that should find it... the 2,2 will do a 2 x 2 grid of 4 images... if you want a different scheme just change the numbers...  its rows x columns.  So 4,1 would give you 4 photos ( 1 per row )











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();
?>

Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Texan78 on April 09, 2005, 12:55:28 am
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 ezPortal

Code: [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.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: cdrake on April 09, 2005, 01:37:06 am
Have you made it where you can include gif custom thumbnails yet?
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 09, 2005, 02:04:10 am
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 ezPortal

Code: [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.

I have no idea what smartors code is... although there is no reason why this should not work...
Try the way you were doing it before... with cfimageget




Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Texan78 on April 09, 2005, 02:28:15 am
How do i go about using that code and what do i have to change in order to use that one?
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: snork13 on April 09, 2005, 04:53:24 am
@vuud

I have the following code within my BoardIndex.template file in smf forum

Code: [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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 09, 2005, 06:45:18 am
How do i go about using that code and what do i have to change in order to use that one?

1) Go back to using cfimageget.php in img src tags like you were doing...

2) In a prior post to you I noted that you would have to edit the cfimageget.php file to do it... see that post for hints on the 2 lines you need to change

Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 09, 2005, 06:47:56 am
@vuud

I have the following code within my BoardIndex.template file in smf forum

Code: [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



Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 09, 2005, 06:48:47 am
Have you made it where you can include gif custom thumbnails yet?

No, but I really really want to

Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Texan78 on April 09, 2005, 07:24:08 am
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_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"));



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.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 09, 2005, 09:18:19 am

Change this to true
$ALLOW_DIRECT_ACCESS = true;



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.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: jaslow on April 09, 2005, 09:54:11 am
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






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();
?>

Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 09, 2005, 09:59:51 am
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();
?>


No, that code can go into any page...   And if it is the only thing in a file, it will not generate a valid html page

it does not create anything besides a table to hold the images.  I use it on my site by inserting it directly into existing pages that do other things.  make sure you change /gallery to wherever your CPG is...  Also, the include has to get to where you installed the cpmfetch stuff.





Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Texan78 on April 09, 2005, 10:17:16 am
Ok i changed it to true and still nothing

is this correct <img src="/gallery/cfimageget.php">


i have a real good feeling that its wrong.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: snork13 on April 09, 2005, 04:07:51 pm
@vuud

I have the following code within my BoardIndex.template file in smf forum

Code: [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





If I comment out the code, I DO NOT get the error. Strange for sure. Any ideas?

here is the lines of code from Subs.php

   
Code: [Select]
$ret = &mysql_query($db_string, $db_connection);
if ($ret === false)
$ret = db_error($db_string, $file, $line);

snork13
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: kegobeer on April 09, 2005, 05:38:00 pm
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.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: snork13 on April 09, 2005, 07:08:43 pm
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.

this is what i thought, :-[  oh well..I wish I had the time and the knowledge to make it work with the forum. I will have to take a closer look at the parameters.

thanks
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: kegobeer on April 09, 2005, 07:11:44 pm
Starting in 1.4, all Coppermine db functions have a unique prefix, which prevents function clashes.  Not a lot of help now, but something to look forward to.

BTW, now you know the headaces bridge writers run into.  ;)
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 09, 2005, 07:30:07 pm
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.

Hmmm, that does not sound right for this... I use all my own database calls, and literally use zero code from coppermine itself.  I read the config in, but that is where it ends.  All my database accesses are directly from my script to the database.  Unless I am missing something

Checkout the coppermine_dao.php for example of what I am talking about.

Strange.  I will install SMF here and give it a whirl.


Title: MySQL error! - where do I change user/pw?
Post by: kuyaedz on April 09, 2005, 07:40:55 pm
Quote
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, '', '')

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.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Texan78 on April 09, 2005, 08:39:06 pm
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.
Title: Re: MySQL error! - where do I change user/pw?
Post by: vuud on April 09, 2005, 09:06:48 pm
Quote
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, '', '')

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.


This is not a coppermine fetch problem... I don't do any inserts into the database...  Hmmmm, of coure the close tag for coppermine fetch could be closing your database connection early...  I dunno.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 09, 2005, 09:07:53 pm
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.

Its the path to whereever you put the cfimageget.php file.

So if its in your forums directory... it would be /forums/cfimageget.php




Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Texan78 on April 09, 2005, 09:19:51 pm
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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 09, 2005, 09:53:59 pm
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

No, I do not have a dontation link...  If you really want to donate, please dontate to the eff.org for all of our sakes.  Or at least look at the site so you can see what they are actually protecting you from.

http://www.eff.org

Glad to hear it works :D




Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Texan78 on April 10, 2005, 09:56:38 pm
Ok i was reading in the docs about showing albumdata and category data and what not. Which one of those will let be be able to show the pic title and/or the user who posted it?
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Damonik on April 12, 2005, 05:37:53 am
Has anyone had much luck getting cpmfetch working inside Wordpress?

i.e calling the php functions from within a wordpress post so you can create a post linking your gallery + thumbnails.

Cheers
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 14, 2005, 06:00:24 am
Have you made it where you can include gif custom thumbnails yet?

Version 1.3.3 is up as a development version on my web site that will now do just this...

http://cpmfetch.fistfullofcode.com

I tested it lightly so please report any problems.  Note:  It will take jpg files as a precidence over gif's if they are both present.

So if you have:

soylentgreen.mp3
thumb_soylentgreen.jpg
thumb_soylentgreen.gif

It will use the jpg file.  If there is no jpg file, it will use the gif

(Also, now that I think about it, will only recognize lower case extentions)

Hope this helps






Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: luke on April 14, 2005, 11:39:17 am
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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 14, 2005, 08:48:00 pm
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

Well, its always great to hear some got it working anyway.

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 publically 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.

So you call for any of them would look like so...

<?php
include "./CoppermineFetch/coppermine.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_unlockPrivate(true);
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>

Hmmm, now that I think about it - that does not really help you.

Well, this one does show updated albums... it does not take a source parameter since it should just cover all albums that are publically viewable.  I can't remember exactly...  give it a try and see if things work out.

cpm_showAlbumsUpdatedOverLastDays($numberOfDays,$options="")
Displays a list of albums with thumbnails and count over past days. Supports the setReturnType option.

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

Let me know if I am way off on any of this...






Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: luke on April 15, 2005, 03:37:50 am
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! :D

Quote
As 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.

Quote
Sorry 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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 15, 2005, 04:22:03 am

Sorry about the syntax on that command... I will have to check my docs to make sure its right (I think they are wrong).

I will check the code to see if that is doing the user galleries also... They get handled in a wierd way in the database, so my SQL could be ignoring them accidentally.  I'll add in that "last x updated" function - I know exactly what you mean about sometimes having 5 and sometimes 0.

My headache is better... I've been doing taxes all night, so suddenly understanding all this stuff is so much easier seeming for some reason!
:D




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! :D

Quote
As 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.

Quote
Sorry 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



Title: Using this in SMF seems okay
Post by: vuud on April 15, 2005, 08:07:52 am
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...



Title: Re: Using this in SMF seems okay
Post by: snork13 on April 15, 2005, 02:24:11 pm
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
Title: Re: Using this in SMF seems okay
Post by: vuud on April 15, 2005, 06:46:36 pm

That was my experience... if you have it in there, some pages work but some produce strange occurances.  Keep an eye on it though and let me know how well it works out for you.  I've got my forum up at

http://www.fistfullofcode.com/forums

I'm still hacking the template, so bear with me

I will also be using it for cpmfetch announcements only... Support and stuff will still be here and major announcements too, but if you want to get email notifications about dev and stable releases and tutorial updates and stuff subscribe there and do a notify thing on the cpmfetch news section. 

I will probably post tutorials here also, as formatting for one SMF can be copied over pretty easily :)

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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Joachim Müller on April 15, 2005, 09:48:49 pm
vuud,

imo it's time to start a separate sub-board dedicated to cpgFetch with you as moderator. OK?

Joachim
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 15, 2005, 10:48:16 pm

Ok by me... Just let me know what I am supposed to do

Do I get a key to the executive washroom? :D

vuud,

imo it's time to start a separate sub-board dedicated to cpgFetch with you as moderator. OK?

Joachim

Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: snork13 on April 15, 2005, 11:20:21 pm
@GauGau & vuud

Great idea on the sub-board, sign me up as a tester ;)

@vuud

comment out

Code: [Select]
//$objCpm->cpm_close();

worked with smf, no errors. I know many smf/coppermine users who will be super happy, GREAT WORK!

thanks
snork
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 16, 2005, 01:03:23 am

worked with smf, no errors. I know many smf/coppermine users who will be super happy, GREAT WORK!

thanks
snork

I have a feeling if they are in different databases, it could be a problem... but I am kinda sorta looking into that
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Joachim Müller on April 16, 2005, 09:01:43 am
vuud,

imo it's time to start a separate sub-board dedicated to cpgFetch with you as moderator. OK?

Joachim
done

Ok by me... Just let me know what I am supposed to do

Do I get a key to the executive washroom? :D
Hehe, 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).
It's up to you to decide if if you want to go through this thread and split it up into several ones, or to lock it and force users to start fresh ones when looking for support.

Joachim
Title: Not using the close function in embedded things like wordpress, smf, etc
Post by: vuud on April 21, 2005, 07:23:01 am

A lot of people have had success using cpmfetch inside templates for other systems (myself included) by not calling the cpm->close() when they are done.  There is no real harm by not doing this as PHP supposedly cleans up DB connections itself. 

I am just a clean-up-after-myself sort of person (at least when it comes to code).

So I know it works in SMF and in WordPress

Any others?  Let me know if this fixes your problem.

If anyone has a clue why when I call a database close that it closes other database connections, please let me know :D
Title: New RSS feed thread started
Post by: vuud on April 27, 2005, 07:00:45 am

I've added a new thread in the cpmfetch child board for the RSS feature to be finsihed in cpmfetch.  If RSS interests you, then please see that thread.

Its up one level from here.

Vuud

Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on April 28, 2005, 08:16:36 am

Notifications of new releases. 

I added a sign up to my site for email notifications of new updates to cpmfetch.

See the site at:

http://www.fistfullofcode.com/projects/copperminefetch/index.php

A little ways down the page there is a signup entry.

I won't give away email addresses or bombard you with crap.  Just emails every once in awhile announcing new versions and features and stuff.


Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: donsmada on May 01, 2005, 04:31:51 am
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.

Keep up the great work,

Don Adams


Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on May 01, 2005, 06:01:37 am
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  ;).

Bah!  We will not tolerate such insolence!  :D Wow, 24 pages eh... damn I remember when I was thrilled to hit 4 pages.  Geeze.  Anyway, you probably have a point there, but I am not sure what to do.  I at least made a new thread for the RSS part, and will do a new one for the SSI.  I could move cfimageget stuff I guess...

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.

I really have no good suggestions for this... you could edit the code in the coppermine_dao.php function named createlink( ).  Add in your own option and try to worm in the code you want into there.  Thats the function that builds the link... you could add in your own type so you would not disturb other parts using the cpmfetch code.  Could work... maybe.  I am not 100% sure about it. 

Hope that helps somewhat


Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: freesouljah on May 01, 2005, 08:58:17 am
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:

(http://www.fistfullofcode.com/images/promos/inquirewithin.jpg)

very cool  8)

peace
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: donsmada on May 01, 2005, 04:35:22 pm
Quote
 ...you could edit the code in the coppermine_dao.php function named createlink( ).  
Quote

That did the trick  ;D

Since I am using "$objCpm->cpm_viewRandomMedia" to pull in my movie thumbnails I only had to edit one line of code in createlink( ).

Here is the orginal createlink( ) code:

Code: [Select]
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

I modified this line
Code: [Select]
$link .=  'displayimage.php?pos=-' .$pos;.

I removed the "." right after $link. This was done to prevent any information from being attached to the begining of "'displayimage.php?pos=-' "

Now I can make the link anything I want. So I changed "'displayimage.php?pos=-' " to "modules.php?name=NukeWrap&page=modules/movies/displayimage.php?pos=-".

The new line of code looks like this:
Code: [Select]
$link =  'modules.php?name=NukeWrap&page=modules/movies/displayimage.php?pos=-' .$pos;
Now, my "Random Movies" scrolls 4 random movie thumbnails in a block format and has a link that uses NukeWrap to pull the movie that matches the thumbnail into my site.

I can post the complete code if anyone else would like to use or see it.

Thanks again for a great coppermine tool, where do I send donations  ???

Don Adams
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: nameless on May 02, 2005, 12:26:02 am
Is there a way to show the newest photos with cfimageget no matter what albums they are in?
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on May 02, 2005, 02:07:22 am

Thanks on both counts!  Good to see someone who understands the banner :D

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

Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on May 02, 2005, 02:11:10 am

Good work... you could also work it in as an alternative in the conditionals...

Add in something like this...

} elseif ($imagelink == 'nukewrap') {
$link = "modules.php?name=NukeWrap&page=modules/movies/displayimage.php?pos=-".= 'albums/' . $filepath . $filename;
}

This way you are not interferring with anything else using cpmfetch...

Excellent getting it working!  Very happy for you!

Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on May 02, 2005, 02:15:03 am
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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: nameless on May 02, 2005, 08:34:06 am
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. :)
Title: New Dev release up 1.3.3 - Now with RSS
Post by: vuud on May 02, 2005, 08:57:37 am
CpmFetch Announcements from FistFullOfCode.com
[The exact Center of the Internet]

--------------------------------------------------------------
Sign up for email notifications at http://cpmfetch.fistfullofcode.com

This will get you:
* Emails for new releases and development releases
* Notifications of new tutorials and online help
* Security notification (if we ever have one)
* Email addresses held closely - no spam, not shared
----------------------------------------------------------------

* * * Development release 1.3.3 is ONLINE now * * *
( get it at http://www.fistfullofcode.com/projects/copperminefetch/downloads.php )

I have just posted a new development release online for people to play
with.  Some neat new stuff is in there, along with the first test RSS feed
generator.

All the changes since the last dev release are:

* cfrssget.php and rss_lastadded.php added for RSS Feeds
* Documentation page for RSS Feeder started
* Cleaned up SQL code in the DAO, added some new parameters
* function cpm_viewTopRatedMediaFrom ($source, $rows, $columns, $options) 
* function cpm_viewMostVotedMediaFrom ($source,  $rows, $columns, $options)
* add %v for tags to show total votes
* add %V for tags to show current rating
* function cpm_listMediaCountFrom($source) to get media count for a given area of the database
* BugFix: $source was not recognizing uppercase album and cat keywords

 ??? But what does that mean?

* cfrssget.php and rss_lastadded.php added for RSS Feeds

This is my first public run at an RSS feed generator.   See the docs online or in your
distribution for how to get it to work.

* Cleaned up SQL code in the DAO, added some new parameters

This was for me... getting a bit cluttered in there.  Some internal improvements.

* function cpm_viewTopRatedMediaFrom ($source, $rows, $columns, $options)

Shows the photos with the highest score as held internally by the cpg database
 
* function cpm_viewMostVotedMediaFrom ($source,  $rows, $columns, $options)

Shows the photos that were voted on the most.

* add %v for tags to show total votes

This is for the format strings...  Displays total votes for a displayed image

* add %V for tags to show current rating

This is for the format strings... Shows how many stars this has for a rating

* function cpm_listMediaCountFrom($source) to get media count for a given area of the database

Allows you to get how many media items are in a given source range.

* BugFix: $source was not recognizing uppercase album and cat keywords

Yeah, $source would not recognize Album as album.  All better now.
-------------------------------------------------------------------------------------------------------








Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on May 02, 2005, 09:05:25 am
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. :)

Vuud, not vudd.  Vudd is some other guy on a different project :p

I am not sure what you mean here... just add some crap onto the end of your image tag.  So if you have

<img src="http://www.yoursite.com/cfimageget.php?cmd=random">

Just add some stuff onto the end... use whatever you want for entries, just make sure they are unique on that page

<img src="http://www.yoursite.com/cfimageget.php?cmd=random&happy=funball">
<img src="http://www.yoursite.com/cfimageget.php?cmd=random&cpg=awesome">
<img src="http://www.yoursite.com/cfimageget.php?cmd=random&joannie=lovescacchi">

Anything to make the browser think that its a different call.

I updated the docs a bit... maybe if I did not answer your question here... you can check there
http://www.fistfullofcode.com/projects/copperminefetch/docs/cfimageget.html


Hope this helps
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: nameless on May 02, 2005, 05:21:30 pm
Sorry vuud for the spelling mistake ;D I got that part but what do I use to get the newest images?
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on May 02, 2005, 07:40:36 pm
Sorry vuud for the spelling mistake ;D I got that part but what do I use to get the newest images?

Sorry, you want to either change the settings in cfiimageget's default (in the file) or use cmd=last on the call to it

:D
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: nameless on May 02, 2005, 08:39:42 pm
Sorry to sound like a dummy but can you give me an example of what to add and where to put it?
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on May 02, 2005, 09:26:38 pm
Sorry to sound like a dummy but can you give me an example of what to add and where to put it?

img src="http://www.yoursite.com/cfimageget.php?cmd=last"

I realize now that last is a bit confusing... the original thought was like "show last added". 

Does that help at all?


Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: nameless on May 02, 2005, 10:55:38 pm
Quote
I realize now that last is a bit confusing... the original thought was like "show last added".  


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 show

Code: [Select]
<a href="http://domain.com/pics"><img src="http://domain.com/cpmfetch/cfimageget.php?cmd=last" border="0"></a>
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on May 02, 2005, 11:06:14 pm
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>

Random, you can always have as many as you want - cmd=random on all those above... the "last" parameter will only show one.  If you are doing this in a php file on the same server, you can just use copperminefetch instead of this.  Otherwise if you are in HTML on the same server, you will need to wait until I do the SSI mod.



I tried entering the following code below but the newest photo did not show

Code: [Select]
<a href="http://domain.com/pics"><img src="http://domain.com/cpmfetch/cfimageget.php?cmd=last" border="0"></a>

What version are you running?  what did it show?  Anything?  What does the html src for that part show also?

Hmmm

Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: nameless on May 02, 2005, 11:17:44 pm
I'm not sure if this is the version I found it on line 28 of coppermine.php

Quote
* @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.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on May 02, 2005, 11:34:30 pm

I'd try getting the newest dev version...  Right now, my revision in there is 1.13 (12 commits newer)

Ah yes, the formatting...

Not sure why you would not get the newest... upgrade and see if that fixes it.




I'm not sure if this is the version I found it on line 28 of coppermine.php

Quote
* @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.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: nameless on May 03, 2005, 12:54:03 am
vuud, I just wanted to clarify is that 1.1.3 or 1.3.3?

Edit NM, I downloaded 1.3.3 and the formatting looks ok with my nav bar. :)
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: TerryIII on May 03, 2005, 01:06:18 am
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 this
Code: [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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on May 03, 2005, 06:00:28 am
You should upgrade... your running something prior to the last stable... I'd recommend the latest dev version 1.3.3 - especially for tweaking to get it running on...

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.

If you are feeling adventerous... you can try to get it working and let us know how you did it...  There was at least one other person running IIS...  I really must find someone that has one...  Basically what is happening is that the program cannot find the config.inc.php file...    There is also going to be an issue later with DOCUMENT_ROOT not being provided by the server to be read.  If you look through the posts here, someone had hardcoded thier location into the script and got it working.

I emailed a friend of mine, and I am hoping he will be willing to try it under IIS and tell me where it is failing.

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 this
Code: [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

Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: freesouljah on May 03, 2005, 11:48:25 am
it was a pleasant surprise, to say the least  ;D



Thanks on both counts!  Good to see someone who understands the banner :D

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

Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Sigh on May 03, 2005, 05:31:15 pm
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?
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: freesouljah on May 03, 2005, 05:57:49 pm
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)
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on May 03, 2005, 10:05:21 pm
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)



FreeSoulJah is 100% right on how this is supposed to be done.  I was however told yesterday that M$ in thier infinate wisdom is starting to block JPG files from being referenced directly in web browsers.  I am not sure how much of this is true, but just because it comes out nicer - I am working on an external program that will display it...  give a few days for that to hit the dev versions...

If you do this, include the cpmfetch.js in your page... it has a nice javascript thing in there to show it nicely.  I think it works :D


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"
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: TerryIII on May 03, 2005, 10:32:28 pm
Quote
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.

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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on May 04, 2005, 05:02:46 am

Well, hope may be on the horizon for those of you that are into IIS...  A friend of mine that uses that stuff at his day job has volunteered to install it and let me know where it is failing specifically.  So I would check back often, or susbscribe to my cpmfetch announcements at my web site

http://cpmfetch.fistfullofcode.com

Whatever fixes there are will be in the next development release - which will be as soon as we have something

Be well in the meantime




Quote
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.

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
Title: Word Press problem
Post by: mjg on May 04, 2005, 12:22:41 pm
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.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Sigh on May 04, 2005, 02:44:59 pm
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? =(
Title: Re: Word Press problem
Post by: vuud on May 04, 2005, 04:02:13 pm

Is it because it is inserting a table?

Can you (PM if you need to) the exact call you are using, and a link to a broken example page (or conversily a screenshot if you don't want to leave it live - but having the source html could be handy).

Vuud


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.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on May 04, 2005, 04:19:58 pm
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? =(

You could be on a php version prior to 4.2...

What version of PHP and what version of cpmfetch?  I thought I had all the calls for that wrapped in an PHP version check to avoid this...

UPDATE:   I just modified my code base here to not use that function at all... I had code for using 4.2 and above, then code for less than 4.2... I decided to just go with the 4.1 compliant way to simplify the code base.  A little hedge trimming if you will.

When you see 1.3.4 come out...  that one has this.  Still not sure why you would get it - but that function is gone in the next development release (give me 2-3 days).  Subscribe to the mailer at http://cpmfetch.fistfullofcode.com to be notified of the release.

Vuud
Title: Windows IIS users rejoice... well somewhat
Post by: vuud on May 04, 2005, 09:10:12 pm

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? =(

A good friend of mine loaded up a server with IIS, Coppermine and CPMFetch to work this out.  As it stands now, you can get around the problems of IIS by doing this:

From TJC:
Quote
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,

After that, he claims it all works fine (and sent a PDF to prove it).  So in the meantime I will try to work out some other solution for this so you don't need to muck with your
system variables.  If your on shared windows hosting and can't do this - your still outta luck till I fix it.  Or complain to your tech support you want to switch to unix hosting, or have them add it. 


Subscribe to the announcements mailer at http://cpmfetch.fistfullofcode.com to be notified of releases, which would note this when its fixed.

Vuud


Title: Re: Word Press Problem
Post by: mjg on May 05, 2005, 06:45:17 am
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.
Title: Re: Word Press Problem
Post by: vuud on May 05, 2005, 04:40:34 pm

On the bright side, the cpmfetch stuff looks like its working perfectly...

Remove the close statement... there is super wierdness going on in there and it does not fly with other database connections.  Something I have to work out.

I know you said that makes it worse, but send me a screenshot of it worse, I think that has to be the starting point.

Later



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.
Title: Re: Word Press Problem
Post by: mjg on May 06, 2005, 04:56:51 am
Here's what happens if I remove the close command ...

(http://gorey.com.au/images/screen.jpg)
Title: Re: Word Press Problem
Post by: vuud on May 06, 2005, 05:26:46 am
Here's what happens if I remove the close command ...

Damn.  I was thinking it would be something simple...

Is your wordpress and cpg tables in different databases?


Title: Re: Word press problem
Post by: mjg on May 06, 2005, 06:08:10 am
Yes, they're in different databases.
Title: Re: Word press problem
Post by: vuud on May 06, 2005, 06:15:58 am
Yes, they're in different databases.

Well, that is a strange thing...  I guess I will have to install wordpress and see what I can do with it.  Seems related to my other database issue (the close)

Probably wont get to it at least until saturday night

Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: trued on May 07, 2005, 06:49:31 pm
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.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on May 08, 2005, 12:53:22 am
Hey Trued,

I tried the code you provided below and it works fine here (in firefox - I don't have any windows, so get someone to try IE for ya).  The one comment I have is that at 1px on my screen I could barely tell it was changing...  Try using 5px and see if you can notice it...  the only thing that changes is the border color.  If it is still botchy under IE, let me know.

As for the photo size... what do you mean?  You have three options of size... thumb, intermediate and full size.  If you want to have the browser resize on the fly I don't have a provision for that.  Browsers typically do a horrid job of resizing, but probably have improved over the years.  Maybe I should check that out again.

Let me know what you were thinking with that and maybe I can make it an option... seems to make sense...

Bill

EDIT: I just added in options to set the width or height tags on the images if you were thinking that.  They will be in the dev release later today (version 1.3.4 I think).  If your on the mailing list you will get a notification of it.



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.
Title: CPMFETCH 1.3.4 Is out...
Post by: vuud on May 08, 2005, 01:52:30 am

Note: This fixes problems for IIS users, word press and other embedding into portal users and that guy who wanted image width control, etc...

 :D


--------------------------------------------------------------
Sign up for email notifications at http://cpmfetch.fistfullofcode.com
This will get you:
* Emails for new releases and development releases
* Notifications of new tutorials and online help
* Security notification (if we ever have one)
* Email addresses held closely - no spam, not shared
----------------------------------------------------------------

* * * Development release 1.3.4 is ONLINE now * * *
( get it at http://cpmfetch.fistfullofcode.com )

I have posted a new development release online.  Updating to this is purely up to you... 
If there is something you like here, go ahead.  If not stick with what you have.  If you think
you have a bug now, upgrade to this before reporting it

Here is what is new:
WINDOW TARGET CODE
OPTIONS CASE SUPPORT FOR < PHP 4.2
HELP FOR MICROSOFT IIS USERS
NEW FUNCTION:  cpm_viewMediaByPid($pid, $options)
NEW Subtitle options
DATABASE CLOSE PROBLEM
NEW STYLE AND OPTIONS ENTRIES
A WORD ABOUT DEV RELEASES


* Note * Special thanks to TJC for setting up, testing and troubleshooting this on IIS.  Your karma
will be rewarding...  thanks from me and the few that run IIS.


WINDOW TARGET CODE
======================================
* I redid the windowtarget option code.  Now the options are:

  _blank
  _blank-js
  _blank-cfshow

_blank used to use some javascript to display the image, which was included by having
the cpmfetch.js script load somewhere on your page.  That is now handled by _blank-js.  _blank now,
just opens up a full new browser window and sticks the media in it.

_blank-js :removes toolbars from the new window and resizes it)  requires cpmfetch.js - I've also had some
issues with loading and resizing.  So all around, the cfshow will be the recommened way to do it if
you dont like pure _blank.  Suggestions on fixing the js are also welcomed

_blank-cfshow: calls the external php file cfshow to display the media.  For now this avoids some rumors
of problems with IE just loading JPG files directly.  In the future you will be able to do cool things with
this, such as display photo information with it, descriptions, etc...  Who knows.

These only apply to the large display options.


OPTIONS CASE SUPPORT FOR < PHP 4.2
=====================================
While looking at a complaint for a the array_change_case function I noticed that
I never coded in an alternative for older PHP versions (ie: 4.1).  Made that fix
and removed the change_array_key_case function all together.  This simplified code
some and I don't think my iteration is going to be noticible slower on a 5 entry array.


HELP FOR MICROSOFT IIS USERS
=====================================
The program will now check for the setting "doc_root" from PHP.INI when
it cannot find DOCUMENT_ROOT, which IIS does not provide.  No idea how much
this will help people... it works for at least one person.   The alternative is to create an
environmental variable named DOCUMENT_ROOT if this does not work.  There are other
ways to get it working on IIS, but they are well, just unnatural - so we wont speak of them.
Ever.


NEW FUNCTION:  cpm_viewMediaByPid($pid, $options)
=====================================
Allows you to specify a given picture by the PID it is assigned.  Displayed in the normal
way.  I was planning on this for the cfshow.php script, but it could come in useful
for normal everyday use.  One easy way to determine the pid of a photo is to look at the rating
starts in your gallery.  Look at the link on one of the star sets for ranking and you will see:

http://www.fistfullofcode.com/photos/ratepic.php?pic=23&rate=1

"pic" is the PID (Picture ID).  There could be other ways, this is just the first one I found.


NEW Subtitle options
=====================================
%i = displays the PID value of the photo being shown.


DATABASE CLOSE PROBLEM
=====================================
Charbal #PHP on freenode gave me an idea of why the $cpm->cpm_close() was
wreaking havoc with other programs.  Added in a fix so it *may* be safe to add
back in the close functionality when embedding into a phpbb, smf, wordpress template etc etc.


NEW STYLE AND OPTIONS ENTRIES
====================================
imagewidth => ""
imageheight => ""
These set the height and width tags on the images to be whatever you submit.  I would recommend
using one or the other as the aspect ration will be kept.  Specifiying both can result in strange looking
images... which may serve a purpose...  Depending on the size you are scaling to you may want to start off
with the intermediate sized image if you are going to be closer to that size.  Taking a thumbnail and scaling it up to
400 px will result in a blurry detail lacking image.  Whatever you pass in these entries will be placed on
the image HTML tag.


A WORD ABOUT DEV RELEASES
====================================
Typically development releases are done in software when new features are added... New features sometimes
introduce bugs (software errors) that the testing we do here misses.  If this happens, it is usually something
strange.  The dev releases here are generally very stable.  Changes sometimes even make the program
more stable, which adding new features.

Overall, In most circumstances, if your random thumbnail is not working for a few minutes when you upgrade
you are going to be okay.  If a dev release has something you like, give it a try.  I always have all the older versions up
for download so you can go back if it breaks.

If you do have a problem, PLEASE let me know.  That way I can fix it.  If I don't know about it, it could be
a long time before it gets fixed.


-------------------------------------------------------------------------------------------------------

Hopefully this email will come through... its the first one, so someone give me a heads up if its all amiss.

Thanks!

Bill@fistfullofcode.com
Title: Re: Word Press problem
Post by: mjg on May 08, 2005, 02:07:53 am
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?
Title: Re: Word Press problem
Post by: vuud on May 08, 2005, 02:20:48 am

Well...

It looks as though this one is not my problem :D

If you look at that code in wordpress does it have anything in the ( ) on that call?  If not, then it assumes the last connect (which would have been copperminefetch's) probably. 

If there is nothing ( ), you can try to figure out what thier link was created as and stick it in there.  Possibly ask on the word press forum...  of course if it seems unessential then it could just be commented out... 

Did you add the close() back in?  You should be able to now...

:D






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?
Title: Re: Word Press Problem
Post by: mjg on May 08, 2005, 02:39:22 am
Commenting out the line in the Word Press file worked, and doesn't appear to have caused any grief elsewhere. Thanks  :)
Title: Re: Word Press Problem
Post by: vuud on May 08, 2005, 02:46:27 am
Commenting out the line in the Word Press file worked, and doesn't appear to have caused any grief elsewhere. Thanks  :)

Did you add the cpm_close back in?

I am really interested to see if that error you were getting is gone... PLS try it... please please please


Title: Re: Word Press Problem
Post by: mjg on May 08, 2005, 02:49:42 am
Yes, the code includes the cpm_close!
Title: Re: Word Press Problem
Post by: vuud on May 08, 2005, 05:49:12 am
Yes, the code includes the cpm_close!


Yay!  Thanks for letting me know... I'm happy to see that issue is finally resolved.

Happy days

Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: trued on May 09, 2005, 01:31:40 am
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!
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on May 09, 2005, 01:49:08 am
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!

Clearly the solution is to not use IE... lol

Hmmm, what is the issue with IE then...  It has to be the css code for the hover then... something IE does not support like that.  I'm not the best with CSS, but I can ask around some.

With dev version 1.3.4 there is not the option setting for imagewidth... you can specify that and the browser will resize the images it downloads.  Otherwise it uses the size CPG stores the thumbnails as.





Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: trued on May 09, 2005, 03:10:10 am
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.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on May 09, 2005, 04:51:05 am
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.

Cool... if you figure it out, post back here so we can all benefit

:D
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Alcor on May 11, 2005, 11:00:04 am
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.php

Quote
<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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on May 11, 2005, 05:47:07 pm

Hello,

I do not understand your question.  You seem to have it all working except for the link to user profile...  This is not something it does... although not a bad idea.

Let me know if I misunderstood the question

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.php

Quote
<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


Your welcome :D

Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Alcor on May 12, 2005, 11:06:35 am
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.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: luke on May 12, 2005, 12:28:47 pm
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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on May 12, 2005, 08:02:35 pm
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.

Yikes

Nope, I don't think you can do that as it is now...   Its a pretty cool idea though - something I will add in in the future. 

Subscribe to the notification list and watch that for updates.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on May 12, 2005, 08:10:00 pm
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

Yeah, I added getting by PID to support some new functions to be added into the full screen display (titles, descriptions, etc...) for the next release (probably). 

I am not sure what you are looking for here?  to be honest I am not crazy about the idea of tying into another hack, if they change something, and it breaks this then it is bad.  Right now I am 100% self contained...  The only thing that can screw me up (famous last words) is a drastic change to the structure of the database.

Does CPG 1.4 have a view by PID function?  If that has it then I would commit to providing that functionality, if not I'd have to think about it some more.

So, let me know what you are thinking, and if anyone else out there understands and wants this - let me know.

Thanks much & look forward to hearing from you





Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: trued on May 14, 2005, 08:34:13 pm
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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on May 15, 2005, 06:36:14 am

That is FRIGGIN COOL   ;D

I love that.  Sweet work.  I would love it if cpmfetch could help with that.

At the worst, you can use the coppermine_dao object directly to handle the SQL calls and such.  You can even go through the coppermine.php and have it return result sets.  While this returns raw resultsets, you can pass the information back to get the full URL to image and such.   

Since you have such a cool example, tell me what you need it to give you (as I understand very little CSS when it comes to layouts) and I can tell you how, or add in a function to do it.   I will look more at your example, and see if anything leaps to mind.

Very cool indeed!


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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: trued on May 15, 2005, 05:20:10 pm
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.

Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on May 15, 2005, 06:11:54 pm

Well, I can see how he did it there...  I will look into the IE hover thing... I need to get to someone with windows...

I think I can make some functions that would support something like that and maybe an example of doing it.  Hmmmm - at least it gives me something to do :D

This is sort of distracting as my next project was going to be making the SSI access into cpmfetch for people stuck on HTML pages.  Ah well... I will have to add this onto the list.  There was someone aways back asking for a css layout output so maybe this would be a good time to handle that.

Life goes on...


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.


Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Elisabeth on May 16, 2005, 12:14:24 am
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!!
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on May 16, 2005, 01:52:43 am
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!!

Ahhhh you must be talking about the 1, 2, 3 sections in the docs... yeah, I have not done those yet... above there is a link into the readme, which is the extensive and convuluted documentation.   I should make it a little more obvious though.

You can do all sorts of wierd, wacky and wonderous things with it.

Check the readme off the documentation page, or in the file you downloaded

Let me know if you don't see it in there... check the functions section :D




Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Elisabeth on May 16, 2005, 02:06:54 am
Ahhh, I didn't see that!  Thank you!
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on May 16, 2005, 05:16:20 am
Ahhh, I didn't see that!  Thank you!

No problem... my docs are lacking in the useability department.  I did one overhaul, but really need to do another one sometime soon. 

Subscribe the notification list on the site to be made aware of new releases...

Good luck and post any problems

:D
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Elisabeth on May 16, 2005, 06:00:12 am
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.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on May 16, 2005, 06:34:48 am
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.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: freesouljah on May 16, 2005, 08:55:55 am

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"


cool...its nice not to be locked into just one way, it leaves a lot more room to grow & learn from the universe  ;D
Title: Improvement suggestions
Post by: Joachim Müller on May 17, 2005, 05:14:56 pm
I have just started playing around with cpmFetch (v.1.3.4), so please forgive me if this has already been addressed in previous postings (this thread has become very large, I'd vote for a split, or at least for a lock and starting of several new threads for support and development discussion).

Here are some suggested improvements/fixes:
Title: Re: Improvement suggestions
Post by: vuud on May 17, 2005, 10:10:08 pm
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?

Hey GauGau,

I am definatly working on a split for the forum, and maybe a lock is a good idea too.   I'll tackle that over the next few days...

Thanks much for the feedback and suggestions. I like most of them...

I'll get these into the next dev release... thanks for the help!

:D



Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: dmahendra on May 18, 2005, 12:45:44 pm
HI

Could someone lead me to a forum message that has someting to do with CpmFetch:
Code: [Select]
$_SERVER['DOCUMENT_ROOT']
I am installing it on my organization intranet site and the cftest.php keeps giving me an error message
Code: [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:

Code: [Select]
$this->filepathtocpm = $_SERVER['DOCUMENT_ROOT'] so it's always going to reply back with

Code: [Select]
(D:/WWW/Jakarta/sphotos//include/config.inc.php)
so I made some alternation on it and change it to
Code: [Select]
$this->filepathtocpm = 'http://' . $_SERVER['HTTP_ROOT']

I am not a programmer and I would be happy if someone could tell my findings are incorrect.

thanks
Monty
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on May 18, 2005, 03:20:57 pm

I am installing it on my organization intranet site and the cftest.php keeps giving me an error message
Code: [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 another theory, its in the cftest.php file.  You
See step 3 of the quickstart instructions http://cpmfetch.fistfullofcode.com/projects/copperminefetch/quickstart.php

Unless of course, you are really in a directory called "sphotos" - in which case I am wrong.

Also, run the newest development version from the web site since you are on windows.  Some things have been fixed for people forced to run windows servers.

Good luck

PS. Remove your alterations - you should not need them.

Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: cassie396 on May 19, 2005, 05:48:48 am
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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on May 19, 2005, 06:07:56 am

Well, depending - there are a few ways you can do it.

First:  Can you access the CPG database from the remote web site?

If not, then you most likely want to use the cfimageget.php code to remotely get an image.

If so, we can perform some configuration gymnastics to make it work... We will have to work through it together...




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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: cassie396 on May 19, 2005, 10:44:26 am
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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on May 19, 2005, 04:57:55 pm

Are the two sites on the same hosting company?

As for img tag - that is the CFIMAGEGET... see my web site at http://cpmfetch.fistfullofcode.com - and look at the cfimageget section...  Its got some limitations, but not many

The thread may have been moved to the cfimageget thread in parallel to this one

Post there if you have problems with CFIMAGEGET

:)


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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Bash on May 22, 2005, 10:43:20 pm
hi, im using v1.2.2 of cpmfetch and i got this error yesterday:

Quote
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

(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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on May 23, 2005, 06:44:44 am
Hmmmm,

first, try the latest dev... I fixed something in there before...

also, how close are the paths that it is displaying?  Are the images there?  If not, how close are they?

Did you start doing anything different when the problems started happening?  Uploading differently, started using png, anything?  cpmfetch does not alter AT ALL cpg data or files, so that has to be coincidence (the timing)...





hi, im using v1.2.2 of cpmfetch and i got this error yesterday:

Quote
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

(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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Bash on May 23, 2005, 11:49:45 am
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:
Quote
            if (file_exists($this->fullpathtocpm . '/albums/' . $filepath . $fileprefix . $filename)) {

i changed that to this ( i just removed the 'file_exists' bracket):
Quote
            if ($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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on May 23, 2005, 07:05:00 pm

Well, my excitement that you fixed the problem is only muffled by the fact I have no idea what is going on there...

I spent several minutes looking at your change there and still have no idea what the heck is going on with it...

I am guessing that uri/url uploads end up as a different user or permissions on the file, which could be why the file_exists is not detecting it.  Oh boy.  I tried to replicate that problem here without success. 

 ??? Can you check the owner/group/permissions on the URL uploaded file versus one that worked before? 


I'd love to know.

Removing that line will have some sideeffects... if for example, there is no thumbnail for a photo and you ask for one, it will possibly give you a bad link... (missing image and stuff).

Thanks in advance for any more info on this, so that I may help others and you!

Its a strange problem...


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:
Quote
            if (file_exists($this->fullpathtocpm . '/albums/' . $filepath . $fileprefix . $filename)) {

i changed that to this ( i just removed the 'file_exists' bracket):
Quote
            if ($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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Bash on May 23, 2005, 09:21:48 pm
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  :-\\
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on May 23, 2005, 10:19:12 pm

Well, thanks for checking... Its a strange problem, and the only thing I can think of is that it can't see it (the PHP process) if its a different permissions.

I don't know what to try... if anyone has any ideas, or can replicate the problem... let me know


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  :-\\
Title: maths error on your website ;o)
Post by: derdaniel on May 25, 2005, 10:30:26 am
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 ;-)
Title: Re: maths error on your website ;o)
Post by: vuud on May 25, 2005, 07:46:33 pm
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 ;-)

lol, apparently my english is not very good either!  :D

There is tons that the program will do, that I am just not motivated enough to promote.  Thanks for pointing that out... I will search the site and correct it - someday :)


Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: betan on May 29, 2005, 07:16:19 pm
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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on May 29, 2005, 08:24:02 pm

Not sure where to start here...

1)  cfimageget IS NOT cftest.php... they use two completely different ways:  This is the writeup on that
http://www.fistfullofcode.com/projects/copperminefetch/docs/readme.html#cpmfetchvscfimageget

If you are making a page on the same site that has your gallery, do not use cfimageget - use the normal object and methods.

2) There are object commands to lock and unlock - they can be used in both cfimageget and cpmfetch methods
http://www.fistfullofcode.com/projects/copperminefetch/docs/functions.html#cpm_unlockPrivate


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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: betan on May 29, 2005, 09:04:46 pm
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 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



Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on May 29, 2005, 09:49:36 pm

You have to add that command to cfimageget.php...  Best part is right after where it creates the object...  Or at least before it makes a call.

Not on the command line...

If you are using the normal fetch on the bottom, you could just use that part on the top.



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




Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: betan on May 29, 2005, 09:54:15 pm
thank you,

i will keep on testing...

betan
Title: Dev version 1.3.5 is out
Post by: vuud on June 01, 2005, 12:22:15 am

--------------------------------------------------------------
Sign up for email notifications at http://cpmfetch.fistfullofcode.com
This will get you:
* Emails for new releases and development releases
* Notifications of new tutorials and online help
* Security notification (if we ever have one)
* Email addresses held closely - no spam, not shared
----------------------------------------------------------------

* * * Development release 1.3.5 is ONLINE now * * *
( get it at http://cpmfetch.fistfullofcode.com )

I have posted a new development release online.  Updating to this is purely up to you... 
If there is something you like here, go ahead.  If not stick with what you have.  If you think
you have a bug now, upgrade to this before reporting it

Minor changes, and some fixes.   There is a bunch of nifty stuff coming soon, but I have not
had as much time as I would like to get it done.   Some pretty cool stuff.


Here is what is new:

* Fixed link in documentation to PHP site (thx GauGau)
* Changed order of IMG tag and added space before end of tag (thx GauGau)
* Coppermine_dao now retrieves photos width and height from the database
* New ALT and SUBTITLE placeholders (height and width of full size image)
* IMG tag alterations
* Photo height and width retrieved


CFRSSGET CHANGES
===================================
Did some more development on this... it will now accept a cmd= parameter
on the url that defines its behavior.  You call it for the following methods, or if you are
coding to the spec, call those functions

CFRSSGET: AddRandomMedia
This can be called with the URL parameter cmd=random

CFRSSGET: AddTopRatedMedia
This can be called with the URL parameter cmd=toprated

CFRSSGET: AddMostViewedMedia
This can be called with the URL parameter cmd=mostviewed

CFRSSGET: AddLastAddedMedia
While not a new function, this can be called with the URL parameter cmd=mostviewed
It is also the default.  It was also switched to use a different internal function.


Fixed link in documentation to PHP site (thx GauGau)
===================================
Just a link to a mirror instead of real PHP.NET site. 


Changed order of IMG tag and added space before end of tag (thx GauGau)
===================================
Inserted extra space between last attribute and end of image tag.  Also moved
the src attribute up to the


Coppermine_dao now retrieves photos width and height from the database
===================================
For most calls, pHeight and pWidth are returned.


New ALT and SUBTITLE placeholders
===================================
%x = shows the photos width of image as stored on server
%y = shows the photos height of image as stored on server


A WORD ABOUT DEV RELEASES
====================================
Typically development releases are done in software when new features are added... New features sometimes
introduce bugs (software errors) that the testing we do here misses.  If this happens, it is usually something
strange.  The dev releases here are generally very stable.  Changes sometimes even make the program
more stable, which adding new features.

Overall, In most circumstances, if your random thumbnail is not working for a few minutes when you upgrade
you are going to be okay.  If a dev release has something you like, give it a try.  I always have all the older versions up
for download so you can go back if it breaks.

If you do have a problem, PLEASE let me know.  That way I can fix it.  If I don't know about it, it could be
a long time before it gets fixed.


-------------------------------------------------------------------------------------------------------

Hopefully this email will come through... its the first one, so someone give me a heads up if its all amiss.

Thanks!

Bill@fistfullofcode.com
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: snork13 on June 01, 2005, 12:33:46 am
@vuud

You Rock! Great News. Thanks for all the hard work! I'll give it a try tonight.


snork13
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on June 01, 2005, 12:47:31 am

Yeah, I know...

BTW, if you still have that close() removed from your forum template, you should be able to add it back in.  That problem was fixed a few dev versions ago.




@vuud

You Rock! Great News. Thanks for all the hard work! I'll give it a try tonight.


snork13
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: bjorn666 on June 02, 2005, 11:58:30 am
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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on June 02, 2005, 11:09:41 pm
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

Probably, what do you mean by plain html?

Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Joachim Müller on June 03, 2005, 07:27:33 am
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).
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on June 03, 2005, 08:01:39 am
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).

Ah, let me try something... I have an idea that is just crazy enough that it may just work...

Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: bjorn666 on June 03, 2005, 11:59:34 am
Thanks, am happy for all help ;)   And yes its a html that is not php-powered.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: pszone on June 03, 2005, 12:48:17 pm
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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on June 03, 2005, 06:48:58 pm
Thanks, am happy for all help ;)   And yes its a html that is not php-powered.

WOW, SSI for CpmFetch was EASY!


 ;D  I just started a new thread and posted how you can accomplish what you want.

http://forum.coppermine-gallery.net/index.php?topic=18547.0

Someday there will be a better solution, but for now - this is pretty darned good - and is probably more versitile than the ssi add on I will be writing.

If you have problem please post them in the other thread

Vuud

Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on June 03, 2005, 06:50:49 pm
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

You just want a text list of albums and dates?  There is nothing in there to do exactly that, but you can do it pretty easily using the cpmfetch program.  Let me know if that is exactly what you want and I will spend the time coding an example.

Vuud







Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: pszone on June 03, 2005, 07:28:38 pm
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.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on June 03, 2005, 08:07:29 pm
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.

Looking at the code now, there is really no easy way to accomplish this without a lot of PHP code, which I don't have time to write up for you right now  (paid work and lunch calls to me).  I will think it over a little later and if I come up with something I will post it...  Its not impossible, I am just trying to think of a way to do it without changing my program and pushing a new release.

I have one that does last updated since a date, and displays thumbnails next to it...

See third example down...
http://www.fistfullofcode.com/cftest/index4.php


Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: pszone on June 03, 2005, 08:22:04 pm
Ok, 10x for fast reply vuud.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Elisabeth on June 05, 2005, 04:03:31 am
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!
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on June 05, 2005, 06:18:56 am
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!

Yeah, they are fashionable are they not...

Are you sure the CSS is correct?  Can you post it here, along with any style options you are passing to cpmfetch?

Glad to see its generally working

Title: Mojito - Please post to the thread on embedding ...
Post by: vuud on June 05, 2005, 07:26:18 pm

I tried moving the post, but somehow just removed it.  I have the contents and will post it to there...

Sorry
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Elisabeth on June 06, 2005, 03:59:08 am
I guess I didn't have it right anyway!  It wasn't correct in the CSS. :P
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Elisabeth on June 07, 2005, 06:23:32 am
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. ::)
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on June 07, 2005, 06:41:46 am
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. ::)

Its in the documentation:

http://www.fistfullofcode.com/projects/copperminefetch/docs/readme.html#optionsarray

Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: stez on June 08, 2005, 03:04:36 am
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:
Quote
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

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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on June 08, 2005, 04:49:18 am

Hey Stez,

Did you change the variable at the top to  "/gallery"

If so, please PM me a link to your site so I can see the cftest.php (and hopefully the phpinfo output)

Thanks

Vuud

PS. Yah FreeBSD... I'm an OBSD person myself, but not one of the angry ones :)



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:
Quote
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

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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: ledotn on June 10, 2005, 06:17:56 am
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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on June 10, 2005, 06:22:37 am
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 Stephanie...  first off - sorry I bounced your subscription to the forum request... I am not doing any coppermine stuff there.  if you want on for other reasons, re-apply...  I did intend to at one point, but they are fixing the forums here and I have the mailing list - so...

Regrettably, the problem stetz has is simialr to every problem... once you get past this, everything just works fine!

Is there supposed to be 2 "www" directories in your path? 



Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: ledotn on June 10, 2005, 06:30:51 am
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.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on June 10, 2005, 06:33:15 am
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.

The home/liquidem is read from the document_root, which is part of the filesystem path which "should" point at where your web stuff is currently residing.

Anyway, can you PM me the location of your site, and if you can put up a PHPINFO() output for me to look at it helps also

Insert <?php phpinfo(); ?> into the top of the cftest.php will do it


Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: stez on June 10, 2005, 01:09:06 pm
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 ;-)

Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on June 11, 2005, 06:29:21 am

Well, the problem here was with the fact that $_SERVER['DOCUMENT_ROOT'] is not as universal as I would think... and after I had accepted that, I just found out its sometimes wrong...

Sigh

Anyway, stez had a different one C_DOCUMENT_ROOT that I have not idea what it was... a quick

 $_SERVER['DOCUMENT_ROOT']  =  $_SERVER['C_DOCUMENT_ROOT'];

Got the right path into the right place...

Thats all


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 ;-)


Title: 1.3.6 test is up for downloading... "Breaker release"
Post by: vuud on June 15, 2005, 01:52:54 am
CpmFetch Announcements from FistFullOfCode.com - Issue #4
[The exact Center of the Internet BTW]

--------------------------------------------------------------
Sign up for email notifications at http://cpmfetch.fistfullofcode.com
This will get you:
* Emails for new releases and development releases
* Notifications of new tutorials and online help
* Security notification (if we ever have one)
* Email addresses held closely - no spam, not shared
----------------------------------------------------------------

* * * Development release 1.3.6 is ONLINE now * * *
( get it at http://cpmfetch.fistfullofcode.com )


***********************************************
IMPORTANT:  The coppermine.php file has been removed... see
below for making changes to your system so this (and all future)
versions continue to work.
***********************************************

I have posted a new development release online.  Updating to this is purely up to you... 
If there is something you like here, go ahead.  If not stick with what you have.  If you think
you have a bug now, upgrade to this before reporting it (or else)

:::::::::News:::::::::::
Well, I have had less and less time to work on this, but thankfully I got a
breather today and finished up a bunch of functions and changes.  There
is of course, more on my list.

Coppermine forums online:
As some of you may have noticed, someone in a lapse of judgement :p gave
CpmFetch its own child board and gave me moderator status.  While I have not
really had a chance to abuse my power, I play to when I get a chance.

The board is now at http://forum.coppermine-gallery.net/index.php?board=57.0

I'd like to ask people to first try posting in the relevant thread there before E-mailing me...  If I
can't help right away perhaps some other people can help.  There are some smart people
in there...  really.

This will most likely be the last changes before marking it as a stable, so please try it out
and tell me what bugs you find.  Some significant refactoring has taken place, so I am
sure I broke something. :)

:::::::::::Here is what is new:::::::::::::::
* Using CPMFETCH (NOT cfimageget) from your html pages !!!!!
* Recode coppermine.php to cpmfetch.php [VERY IMPORTANT]
* Recode coppermine_dao.php to cpmfetch_dao.php
* Random from Top rated
* Random from Most viewed
* Cfimageget_classic.php removed
* Improved cftest.php
* Conversion to arrays back from coppermine_dao (instead of result sets)


USING CPMFETCH (NOT CFIMAGEGET) FROM YOUR HTML PAGES !!!!!
=========================================
Whodathunkit?  Anyway, I posted a new thread on the support forums giving a
run down on how to do this easily.  Its so damned simple that I may not ever
put out an SSI module!  We will have to see:

http://forum.coppermine-gallery.net/index.php?topic=18547.0

Its incredibly fun, and just to boot, its 100% ORGANIC


RENAME COPPERMINE.PHP TO CPMFETCH.PHP
RENAME COPPERMINE_DAO.PHP TO CPMFETCH_DAO.PHP
============================================
I renamed the coppermine.php and coppermine_dao.php files to something
a little less sounding than coppermine.  This is a painful change for everyone since it
will involve you altering any page you are using cpmfetch on.  It was not a
decision made lightly - but I feel it had to be done.  This should reduce some
confusion and make it easier to work with the coppermine photo gallery in close
proximity. 

What you have to change:
* Any page that used coppermine.php has to be changed from:
   
   include "./coppermine.php";
   to
   include "./cpmfetch.php";

Again, sorry - but its for the best.


RANDOM FROM TOP RATED
RANDOM FROM MOST VIEWED
=================================
cpm_viewRandomMostViewedMediaFrom ($source,  $rows, $columns, $options)
cpm_viewRandomTopRatedMediaFrom ($source,  $rows, $columns, $options)

So a simple request like "I'd like to show a random number of the highest rated image" is a lot
harder than you would think.  These two are very similar so I will only cover the
description of what happens internally to figure this out.  I am OPEN to suggestions on
improving these...

When you request 5 rows x 5 columns (10 images) the functions do a few things:
1. Gets the total number of images available to that source
2. Mutiples the number by a percent to qualify (currently 25% for rated and 10% for viewed)
3. Gets that many back from the database sorted by rating or views (depending)
4. Randomly grabs the count you want from there.



CONVERSION TO ARRAYS BACK FROM COPPERMINE_DAO
===========================================
(INSTEAD OF RESULT SETS)
This will not affect almost everyone, but internally I was handing around mysql resultsets. 
Moving forward this will be done by assocaitive arrays.  This makes my job a lot
easier with some things I want to do.  The drawback?  You can't get a resultset back
for the foreseeable future from the dao.  If this is a big problem for you, let me know
and if your reason is good enough - I will work something out.  Requesting a resultset to be
returned will now return an associative array.


CFIMAGEGET_CLASSIC.PHP REMOVED
============================================
This is the old version, no redeeming qualities at all.  Saw one person trying
to use it, so I am just plain out removing it from the package. 


IMPROVED CFTEST.PHP
============================================
CFTEST was useful once upon a time.  After some changes to object creation
and destruction it was less so.  So I spent some time redoing it all so it will help you
and me get you working faster.  I'll be changing it as you, the user community,
find new and innovative ways to break my lovingly crafted program.


::::::::::::::A WORD ABOUT DEV RELEASES:::::::::::::

Typically development releases are done in software when new features are added... New features sometimes
introduce bugs (software errors) that the testing we do here misses.  If this happens, it is usually something
strange.  The dev releases here are generally very stable.  Changes sometimes even make the program
more stable, which adding new features.

Overall, In most circumstances, if your random thumbnail is not working for a few minutes when you upgrade
you are going to be okay.  If a dev release has something you like, give it a try.  I always have all the older versions up
for download so you can go back if it breaks.

If you do have a problem, PLEASE let me know.  That way I can fix it.  If I don't know about it, it could be
a long time before it gets fixed.

-------------------------------------------------------------------------------------------------------

Thanks!

Bill@fistfullofcode.com aka Vuud








Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on June 15, 2005, 08:15:26 am
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

I've done this... I am using the latest dev version 1.3.6 (anything newer will work, but older will not)... to do this, insert this code into your page where you want the results displayed.



Code: [Select]

<?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(10001000"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 "&nbsp;&nbsp;&nbsp;";
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();
?>



IN my system, it generates something like:

06/10/05   Misc - Just don't fit anywhere
06/05/05   Panthorn Park trails day 2005
06/05/05   Our furry friends
12/07/04   Aug 2004 - My birthday at Session Woods
12/07/04   May 2003 - Beckett Trip

Where the titles are links.  Its not terribly efficent as it does a query for every image in the category, but c'est la vie

Let me know how well this works out for you...






Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: pszone on June 15, 2005, 05:22:47 pm
Realy thanx Vuud, it works perfect  ;D http://pszone.headoff.com - Sections "Screenshots" and "Videos"  ;) Thanx again!
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on June 15, 2005, 05:28:17 pm
Realy thanx Vuud, it works perfect  ;D http://pszone.headoff.com - Sections "Screenshots" and "Videos"  ;) Thanx again!

Not a problem... That is really a well done site... very cool looking
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: mustang_lex on June 16, 2005, 03:35:21 am
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!!!
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on June 16, 2005, 03:57:53 am
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!!!

If you download and use the latest dev version (1.3.6) you can set the width or height setting for your images, which will in turn force the browser to resize them on the fly.

They go in the optionarray for the call, and I believe they are called imageheight and imagewidth... I would not use both of them at the same time :)





Title: To those bold enough to care - emerging examples
Post by: vuud on June 16, 2005, 09:14:43 am

I've been updating some test pages to be visible by everyone... I am working on the format now, and have lots of examples - but not sure of the format.

http://www.fistfullofcode.com/projects/copperminefetch/tests/

Feel free to browse any of them... pay attention to the first two examples on test 1, that what I am thinking for a layout (color and font not applied).  Is that enough information? 

I don't want to make this too hard for me to update...

Comments?
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: stez on June 17, 2005, 05:54:44 pm
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... :-)
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on June 17, 2005, 07:53:24 pm
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... :-)


Thanks - there is still much to be done.  But I am doing it on a time available basis so no idea when they will all be updated

Let me know how it works out for you
Title: Dev version 1.3.7 is up for download
Post by: vuud on June 20, 2005, 10:41:46 pm

This is really a few fixes to 1.3.6... if you do not have 1.3.6, don't worry about it.


* * * Development release 1.3.7 is ONLINE now * * *
( get it at http://cpmfetch.fistfullofcode.com )

I have posted a new development release online.  Updating to this is purely up to you... 
If there is something you like here, go ahead.  If not stick with what you have.  If you think
you have a bug now, upgrade to this before reporting it (or else)

HERE IS WHAT IS NEW:
---------------------------------------------------
Bugfix  to cpmfetch (Minor)
Bugfix to cfimageget  (Major)
Bugfix to cfrssget (Major)

cfimageget and cfrssget were completely broken in the 1.3.6 test release.  This addresses those problems.

EXAMPLES ONLINE
---------------------------------------------------
I finally started adding in my examples I use for development, some are not formatted nicely,
but it is a lovely tour-de-force of the capabilities of CPMFetch.  They are off the doc's page on my
web site, and I am updating them a few at a time.  See the link for "Examples and tests"

http://cpmfetch.fistfullofcode.com/projects/copperminefetch/docs.php

SOLICITING FOR COOLNESS
---------------------------------------------------
If this has been useful for you, or if you have done something really cool with it, please e-mail me
with a link and if its okay to show it off / link to it from my site.  I hope that some cool ones will come through
that I can then post as examples (complete credit given of course) for others.

Send to:  Bill@FistFullOfCode.com
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: tutone on June 21, 2005, 04:57:36 am
vuud,

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?

thanks
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on June 21, 2005, 05:32:52 am

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?

You can insert the strong tags into the subtitle tag... See the examples on this page:

http://www.fistfullofcode.com/projects/copperminefetch/tests/test3.php

As for the centering you really need to use css for that at this time...  I am working on adding in some new options to help, but for now, you need to set the cellstyle (or something like that, and provide CSS entries).

Hope that helps

Vuud

Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: tutone on June 21, 2005, 06:55:52 pm
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.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on June 21, 2005, 08:20:02 pm

Actually, yes and no on displaying how many added since... I have it, but its kinda buried and not directly accessable.  However, I added three new tests to the top of this page...  the first two show the next dev version exposing that (version 1.3.8) and the third shows how you can do it with pretty much any version of cpmfetch going back.  its an extra statement or two, but its not hard

http://cpmfetch.fistfullofcode.com/projects/copperminefetch/tests/test2.php

About the error, I am going to need more information... Like if the next time it happens, do view source, copy and send the table it made to me and let me know which one is the bad image.  Bascically if you are getting a bad image, then my code thinks the image exists.  This means that I can't send a blank one.  So lets find out where the real problem is (yes, I could file check to make sure its there, but all that I/O will cause slowdown and increase in server usage - probably negligable, but I don't roll that way).  So I am here to help

Glad you like the tests... I am on the verge of a new stable - since the list of new stuff is huge.  I guess 8 dev releases will do that to you :D

Vuud






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.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: tutone on June 22, 2005, 07:15:07 am
vuud,

I got the missing image error again... here is the code that was generated...

<td><a href="/gallery/displayimage.php?pos=-548"  ><img class="test1" alt="Uploaded: 11-Apr-2005, Filename: Tyler #2 (University Place, WA) 121904.jpg, Size: 68961, Album: WA Christmas Trip, Uploaded By: msn, Title: " title="Uploaded: 11-Apr-2005, Filename: Tyler #2 (University Place, WA) 121904.jpg, Size: 68961, Album: WA Christmas Trip, Uploaded By: msn, Title: " src="/gallery/albums/x/thumb_Tyler #2 (University Place, WA) 121904.jpg"/></a><br /><center></center></td>

thanks in advance for your help
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on June 22, 2005, 08:01:20 am

src="/gallery/albums/x/thumb_Tyler #2 (University Place, WA) 121904.jpg"


Do you think you could have worked in a few other strange characters?  Curse windows and its permissive ways.

Anyway, there is a problem somewhere... when CPG renders it, it shows as:

thumb_Tyler%20%232%20%28University%20Place%2C%20WA%29%20121904.jpg

When I do the same, in cpmfetch I get:

thumb_Tyler%20#2%20%28University%20Place,%20WA%29%20121904.jpg

So somewhere I am not doing my job on encoding # and ,

I will look into it... assume this will be fixed in the next dev release (1.3.8)  I will post when I got it.

Thanks for the bug report though






Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: tutone on June 22, 2005, 08:09:36 am
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.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on June 22, 2005, 08:12:51 am
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.

Spaces are okay, I guess the browser is handling them okay, but its those others.

Ah well, I will probably figure it out tomorrow and do 1.3.8 then

I'll note it on the mailing list...

Edit:  I figured it out, works like a charm, broke my cfshow.php code though - so now we have to fix that before releasing 1.3.8...  Still tomorrow maybe


Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on June 22, 2005, 08:35:37 pm
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.

 >:(  What a can of worms you have opened. 

Anyway, I just posted version 1.3.8 that will allow you to have your freaky bizarre filenames, but you will not be able to use cfshow.php to display large versions on files containing the # and commas.  Otherwise everything is okay.

Hope that helps
Title: Random pic and caption
Post by: subnet_rx on June 22, 2005, 09:31:03 pm
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();

?>

Title: Re: Random pic and caption
Post by: vuud on June 23, 2005, 07:23:22 am

Go hither, and seek wisdom and examples in section 3

http://www.fistfullofcode.com/php-lib/showexternal.php?url=http://www.fistfullofcode.com/projects/copperminefetch/tests/index.php

The %c is correct, you are just using it wrong... look through the examples.

Oh, and you don't need the whole thing after the viewrandommedia...

That call does somethign else...  %c in the formatStats call means category count...


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();

?>

Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: fishfreek on June 24, 2005, 04:14:12 am
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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on June 24, 2005, 05:27:43 am
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

You need to be running at least 1.3.4 for the tags...

Is that it?




Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: fishfreek on June 24, 2005, 04:07:12 pm
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. 
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on June 24, 2005, 05:10:24 pm
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. 

I am horrible at in between stable updates...

yeah, the cftest probably was not updated... everything else you did is correct.

Excellent!





Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Chopper on June 25, 2005, 05:19:10 am
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.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on June 25, 2005, 06:36:32 am
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.


Hey Chopper... that failure is indicative of a huge number of problems...  The cftest program basically sucked at narrowing it down.

Do me a favor and try the latest dev releases from the website   http://cpmfetch.fistfullofcode.com

Pretty much make sure you remove the old one, since some files have been renamed

The cftest with that one will give much better information and with any luck I can tell off the bat what the issue is...

Thanks!

Vuud

BTW: The test page you linked to has a parse error, so I could not get anything off that anyway









Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: stez on June 25, 2005, 10:55:25 pm
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?
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on June 25, 2005, 11:19:20 pm
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?


Hmmm, you mean something like this:
http://www.fistfullofcode.com/projects/copperminefetch/tests/test4.php

Last example on the page...  Maybe what you are looking for

Vuud
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Elisabeth on June 26, 2005, 07:36:54 am
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!!
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on June 26, 2005, 07:56:52 am
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!!

Hmmm, ironically I never thought of that...

Here are a bunch of examples covering count added in the past x days...
http://www.fistfullofcode.com/projects/copperminefetch/tests/test2.php

But you are just looking for like:

"last updated on 6/25/2005"

or something eh?  I'll add that on to the next dev release if I think of it...  In the meantime it would not be hard to do by extending cpmfetch, get the resultset (array) for the last added media and grab and format the date from it.  of course if your not a programmer that probably made no sense to you.  Heck, I am even wondering what I just wrote...  I'm even worse when I read the docs... I wonder how anyone can understand them sometimes.

Let me know if that is what you were thinking...





Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on June 26, 2005, 09:10:06 pm
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!!

Well, I added in some new things pretty much sparked by your idea.  In the end, they will get you where you want to go - but also allow for a lot more.

Pretty much I enabled a user to submit "noimage" and "subtitlelink"   

What this does is allow you to tell the program to not display any images and / or make the subtitlte a link


To answer your question, you would simply make a call to

$optionarray = array("subtitle" => "%o added an image %D days ago %o", "noimage"=>"", "subtitlelink" => "");
$objCpm->cpm_viewLastAddedMedia(1,1,$optionarray);

That would print out something like:

AdminZero added an image 15 days ago.

There is also a ton of other stuff in the optionarray to make this work pretty cool - dateformats, etc...

My test page for this is at:
http://www.fistfullofcode.com/projects/copperminefetch/tests/test3.php

Its the bottom two examples.

1.3.9 will be posted sometime soon...  I am debating on a global configuration file for all aspects of cpmfetch, but am unsure if I want to do it.  Based on what I decide, will determing when 1.3.9 comes out.

Have a nice day

Vuud







Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Zenigata on June 28, 2005, 12:18:01 pm
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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on June 28, 2005, 05:28:03 pm
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


I think the biggest problem is you are completely missing the object creation call (see below).  Otherwise things seems good.  I would also try the latest dev version from the web site - the dev series has some fixes that make it play nicer with forums and such

All the coppermine.php will be cpmfetch.php after the upgrade, adjust accordingly.


Code: [Select]
include "./scripts/cpmfetch/coppermine.php";
$objCpm = new cpm('/galleria');
$objCpm->cpm_viewRandomMedia (1,1);
$objCpm->cpm_close(); ?>

Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: toastk on June 29, 2005, 03:55:58 am
If this is not the correct forum for bug reports, I apologize in advance. Please let me know where to send them.

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%"');

This was in the latest dev build of cpmfetch as of a couple days ago.

Thanks.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on June 29, 2005, 04:04:03 am
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%"');

You are correct!  Thanks for point that out... I've fixed it in the code here, will be out in the next dev version.

BTW, I will take bug reports any way people want to send them...  :D

Thanks much
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: stez on June 30, 2005, 12:17:08 am
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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on June 30, 2005, 01:09:56 am
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

Well, we are nearing a new stable, so the development releases are bug fixes and last minute functionality.  I should do more stable releases (you should see the massive list of features added since 1.2).

I am on vacation/holiday this week, so I won't really be tinkering with this until I get back on the weekend.  Hope the spaces problem is not too bad for you.   When I get back in a few days I will test this out and bang out another development release.

Hopefully they will slow down as I think we have exhausted the list of things we can do...

:D




Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: stez on June 30, 2005, 02:01:39 am
I think you deserve it, I'm impressed at the rate!  It's not too much of a problem, as I try and keep silly filenames to a minimum anyway, so it's only returning a blank/error every now and again.  And I don't have to use the new server for another 2 months yet before I'm forced to move!

Enjoy your holiday man.

Kyle
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: tutone on July 01, 2005, 07:21:02 pm
vuud,

I updated to 1.38... but i still get some missing pics (probably the same problem as the person that posted the same problem after our previous exchange).. 

here is the ouput:

<table >
<tr>
<td><a href="/portal/gallery/displayimage.php?pos=-1346"  ><img class="test1" alt="Uploaded: 07-May-2005, Filename: Emma Dressed Up as a Flower Girl for Candice & Walt's Wedding #1 (UP, WA) 050705.jpg, Size: 12423, Album: Mobile Family Pictures, Uploaded By: msn, Title: " title="Uploaded: 07-May-2005, Filename: Emma Dressed Up as a Flower Girl for Candice & Walt's Wedding #1 (UP, WA) 050705.jpg, Size: 12423, Album: Mobile Family Pictures, Uploaded By: msn, Title: " src="/portal/gallery/albums/wpw-20050507/thumb_Emma Dressed Up as a Flower Girl for Candice & Walt's Wedding #1 (UP, WA) 050705.jpg"/></a><br /><center></center></td>
</tr>

</table>

thanks
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on July 02, 2005, 06:06:45 am
src="/portal/gallery/albums/wpw-20050507/thumb_Emma Dressed Up as a Flower Girl for Candice & Walt's Wedding #1 (UP, WA) 050705.jpg"

Geeze...  Its probably the & as that has a very special meaning in URL's... its part of the whole GET format for data being sent.  Your just asking for trouble now.

I will see what I can do - probably tomorrow...

How are you adding these into your gallery?  FTP upload or through the web browser interface?

EDIT:  I named a file the same as yours and it seems to work here... I uploade via a web browser though. 
When you upgraded did you change the includes to use cpmfetch.php instead of coppermine.php?
Otherwise nothing would be different even with the upgrade


Thanks!

Vuud

P.S.: STEZ - I got your problem on the list also
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on July 03, 2005, 02:39:05 am

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

Good news, I was able to replicate your problem...  Thanks for Tutones filename anyway.   I know what the issue is, just have to fix it.  Later tonight perhaps. 




Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on July 03, 2005, 07:01:53 am

STEZ, Tutone... 1.3.9 has been posted and I think it should fix at least Stez's problem/

Tutone - see my other post about cpmfetch.php versus coppermine.php ... 

Goodnight
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: tutone on July 04, 2005, 07:25:56 am
vuud,

seems to be working awesome.  Great work!!!
Title: Error message
Post by: marian on July 04, 2005, 05:39:42 pm
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.
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: Nibbler on July 04, 2005, 05:46:57 pm
Why did you put sphotos ? surely that should be just photos ?
Title: Re: Error message
Post by: vuud on July 04, 2005, 05:53:52 pm
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.






Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: mrmike987 on July 04, 2005, 08:32:30 pm
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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: vuud on July 04, 2005, 08:55:46 pm
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

First, thanks for this post - it dragged me away from some other code that I am just not enjoying writing.   :D

Second, Yes, this is still No.  Many reasons why this is, come flooding back to me now.  Why do you want this anyway?  I mean isn't getting down the minute a little over zealous?

If you know PHP, you can get the data back and then do the date math and stuff yourself to display the subtitle the way you want it.
I think for the gallery level you can do something to display how many days ago ... no wait, I am wrong about that.

Anyway, no one else has asked for this sort of thing, but I can see the wisdon in a "days ago" marker... So if I don't forget I will add that in soon.

As for the rest... well, it opens a big can of worms as far as coding goes - so that won't be happening unless the public outcry is so great that I feel compelled to do that.

In the mean time, I suggest sitting down with a six pack and watching bubba ho-tep  http://www.bubbaho-tep.com/aboutbht.html

That should help you

  :D

Maybe I will add something later to this post extending cpmfetch to do it...




Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: marian on July 04, 2005, 09:43:26 pm
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.
Title: Re: Error message
Post by: marian on July 04, 2005, 09:47:41 pm
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.
Looking forward to getting it going, it sounds great! :)
Title: Re: Error message
Post by: vuud on July 04, 2005, 10:06:16 pm
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.

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.
Looking forward to getting it going, it sounds great! :)
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: mrmike987 on July 04, 2005, 11:17:21 pm
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

Ok......

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");
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
Post by: vuud on July 05, 2005, 01:36:23 am

All my examples here use a recent version (get the lastest dev version)

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.

$objCpm->cpm_viewLastAddedMediaFromAlbum(1,1,4,array("subtitle" => "The gallery was last updated:<br>%w","imagelink" => "album", cellattributes" => array("align"=>"center")));

Will align the contents of the TD tag


Is there a way to show last added date(%w) without showing an image?


$objCpm->cpm_viewLastAddedMediaFromAlbum(1,1,4,array("subtitle" => "%w","imagelink" => "album", cellattributes" => array("align"=>"center"), noimage=>"", subtitlelink=>""));

This will only show the date the last image was added, no image will be shown, the date will be a link to the album.  If you do not want the link, remove the subtitlelinkl tag

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");

Well, the above thing we just did will do that... But in any case, this was wrong.  Terribly terribly wrong.  :)
Nobody sucks at coding... everyone just has different skill levels. Practice and have faith.

Above syntactically should have been array("subtitle" => "","imagelink" => "album")

Vuud




Title: Re: Error message
Post by: marian on July 05, 2005, 09:43:47 am

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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: unknown_girl on July 05, 2005, 04:51:39 pm
Hello! I'm not really into codding and that things, and I would like help with cpmfetch, because I want to put the 2 last images uploaded... but I don't understand nothing about this.... pls someone can help me... we can talk on msn : nidiadias@hotmail.com
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: unknown_girl on July 05, 2005, 05:05:30 pm
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?
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on July 05, 2005, 07:00:19 pm
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?

Cfimageget can only get one photo at a time.

Are you putting this into a PHP page on the same site as the gallery?  cfimageget is for avatars, other web sites, etc...






Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: unknown_girl on July 05, 2005, 07:22:05 pm
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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on July 05, 2005, 08:55:10 pm
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

Is your top page a .php file?
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: unknown_girl on July 05, 2005, 10:27:18 pm
its htm... but I have no problem in creating my site in php :)
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on July 05, 2005, 10:46:01 pm
its htm... but I have no problem in creating my site in php :)

If want to do interesting things with cpmfetch, make your top page a php page

Then insert this

<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/fotos");
$objCpm->cpm_viewLastAddedMedia(1,4);
$objCpm->cpm_close();
?>

The above assumes you are using the latest dev version 1.3.9
The above assumes you put the program into a directory named cpmfetch under the root of the web site (change line 1 if this is not the case)

Once you get that working, poke through the example pages at this link for creative things to do

http://www.fistfullofcode.com/php-lib/showexternal.php?url=http://www.fistfullofcode.com/projects/copperminefetch/tests/index.php
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: unknown_girl on July 05, 2005, 11:10:27 pm
thanks
stez sorted it ...
Thanks again Stez...
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on July 06, 2005, 05:13:03 am
thanks
stez sorted it ...
Thanks again Stez...

Ah damnit.  I guess now stez is gonna expect his feature to be added...  ;)


Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: stez on July 06, 2005, 03:58:16 pm
Haha.   ;D  No, was online last night, noticed she was online too, so I thought why not?  As for the "feature" - it's not something I need atm, but I can see uses for it elsewhere/in future.  ;)

Sorry I haven't replied regarding your fix on the filename in 1.3 - been up and down the country for job interviews so haven't had a chance to play with it. 
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: kroberson on July 06, 2005, 11:39:37 pm
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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on July 06, 2005, 11:51:26 pm
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


First, go to the latest dev version if you are not... the 1.4 stable release is imminent and will be exactly the same unless we find some bugs (which is just not possible)

Subtitle above is not possible... would you settle for for below the image?

$styleguide = array("subtitle" => "Today's special dog is %w");
$objCpm->cpm_viewRandomMediaFrom(1,1,"",$styleguide);

You also end up with the file extension on it though... I can probably fix that after the stable release (allow the basename)

Does that help?

Somewhere along the line I improved (with help) the randomization of things...  Forget if that was before the last stable or not.

Does that help?

Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: kroberson on July 07, 2005, 01:08:54 am
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?
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on July 07, 2005, 01:51:35 am
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?

Ah try super-secret-not-for-just-anyone-if-you-tell-anyone-you-will-pay    %t = picture title

I guess I just never added it into the docs... I suck at docs.  I just dont have any desire - although I am re-writing them into what will hopefully be something useful.  Sorry about the ommission

http://cpmfetch.fistfullofcode.com <- see the downloads section for 1.3.9
(Its got 100's of new things over 1.2.x)

Vuud




Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: kroberson on July 07, 2005, 05:18:21 pm
Great! I'll give that a shot!

Thanks
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: kroberson on July 07, 2005, 06:06:30 pm
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!
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on July 07, 2005, 10:15:36 pm
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!

Yeah, I thought I mentioned it, but that must have been to someone else...  I put it in the release notes for the change, and the upcoming and added in a warning in the cftest...  good catch anyway.

The code as shown there looks good.  I just checked mine and my randomization seems okay.  I will check in there and see what is going on. 

Did you remove the coppermine.php file also?  The test shows its still there, but the test could be broken.  It does not matter since you are calling the right one, but you can remove it.

Otherwise you are on linux / apache / php which is what I develop on, so I am not sure why you would have problems and not me.  I will see...





Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: kroberson on July 07, 2005, 10:25:58 pm
yup... totally wiped out the old set of files and just uploaded these.

thanks!
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: HeavenlyCurious on July 07, 2005, 10:41:33 pm
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 ?
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on July 07, 2005, 11:16:28 pm
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 ?


So the partialurl is set to "/galleryindex"

Also try version 1.3.9 from the web site... the test program is actually useful now, and that one will be stable in about 2 days anyway.  Its fine for use..

Mind you coppermine.php is now cpmfetch.php, so remove the old version :)





Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: fogpeople on July 08, 2005, 01:40:27 am
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
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on July 08, 2005, 02:22:13 am
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


Yes, if the page you are pulling it with is a PHP page and you are using the lastest dev version you can.  I have to run out now, but when I get back I will post an example here for you.  Its slightly more involved than the existing ways, but not by much.

Install 1.3.9 and we will take it from there...  (1.3.9 is pretty much the next stable release, so don't worry) ... also coppermine.php is now cpmfetch.php - so remove the old one.

Talk to you soon


Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: stez on July 08, 2005, 02:45:54 am
hi vuud...

1.39 has fixed the filename problems as you predicted... I must buy your crystal ball...  ;)

Just have to start porting over the website to the new server soon in between yet more interviews...

Cheers,
Kyle
Title: Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
Post by: vuud on July 08, 2005, 06:05:07 am
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. 

Here is how you can use 1.3.9 or better to accomplish this:  The comments are inserted for educational purposes

Code: [Select]
<?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 (11""); 

// This gets the image to display...
$imagename $objCpm->cpm->getImageToUse($data[0]['pFilepath'], $data[0]['pFilename'] ,"");

print 
"<img src='$imagename'>";

?>


You have to take the next step and figure out how to get $imagename into your background tag :)



Title: Re: Error message
Post by: vuud on July 08, 2005, 06:14:27 am

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

I think I just completely missed this post... sorry about that.

There should not be a "/photos"  on the line above the if statement.

What did you put in for line 5 in the cftest file?  I suspect you put /public_html/photos...

if that is the case, change it to just "/photos"


Title: This thread has been continued elsewhere...
Post by: vuud on July 08, 2005, 06:45:28 am
Due to the size of this thread, and the fact that much of the information is from older releases and not really applicable anymore, I have started a new thread at:

http://forum.coppermine-gallery.net/index.php?topic=19564.0

Sorry for the inconvience, but it had to be done.

And with 1.4.0 STABLE coming out I figured what better time could there possibly be!!!!!!