CpmFetch - (OLD/LOCKED) stats/thumbnails/randoms/etc from outside CPG - Page 31 CpmFetch - (OLD/LOCKED) stats/thumbnails/randoms/etc from outside CPG - Page 31
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

CpmFetch - (OLD/LOCKED) stats/thumbnails/randoms/etc from outside CPG

Started by vuud, December 17, 2004, 10:19:07 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

tutone

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.

vuud

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

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


Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

vuud

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

>:(  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
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

subnet_rx

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:


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

?>


vuud


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


Quote from: 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:


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

?>


Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

fishfreek

I am having a problem with the imageheight tag.  I have the following code:

$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

vuud

Quote from: fishfreek on June 24, 2005, 04:14:12 AM
I am having a problem with the imageheight tag.  I have the following code:

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




Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

fishfreek

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. 

vuud

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

I am horrible at in between stable updates...

yeah, the cftest probably was not updated... everything else you did is correct.

Excellent!





Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

Chopper

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:


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

vuud

Quote from: 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:


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









Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

stez

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?

vuud

Quote from: 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?


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
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

Elisabeth

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

vuud

Quote from: 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!!

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





Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

vuud

Quote from: 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!!

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







Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

Zenigata

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:

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

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

vuud

Quote from: 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:

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

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



include "./scripts/cpmfetch/coppermine.php";
$objCpm = new cpm('/galleria');
$objCpm->cpm_viewRandomMedia (1,1);
$objCpm->cpm_close(); ?>


Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

toastk

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.

vuud

Quote from: toastk on June 29, 2005, 03:55:58 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
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco