Displaying the date coppermine was last updated on the frontpage Displaying the date coppermine was last updated on the frontpage
 

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

Displaying the date coppermine was last updated on the frontpage

Started by colinmann, September 10, 2006, 07:59:51 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

colinmann

Sorry,

This is driving me wild. The plugin looks great, but I've got a question: how can I display, on the front page of my site, when the gallery was last updated? There must be an easy way, but I can't see it anywhere. All I want is it in the format "09 September 2006" or however.

Thanks in advance,
Cheers, Colin

vuud

Quote from: colinmann on September 10, 2006, 07:59:51 PM
Sorry,

This is driving me wild. The plugin looks great, but I've got a question: how can I display, on the front page of my site, when the gallery was last updated? There must be an easy way, but I can't see it anywhere. All I want is it in the format "09 September 2006" or however.

Thanks in advance,
Cheers, Colin

For now, you would have to retrieve the last added photo and draw the date field from it and format it however you wanted to.

Something like:

$objCpm->cpm_setReturnType("resultset");
$data = $objCpm->cpm_viewLastAddedMedia(1,1);
$row = $data[0];
$time = date(,'d-M-Y',$row['pCtime']);

print $time;

Well something like that anyway...  YMMV, I did not try it, but it should work






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

colinmann

Hi, sorry - but why does this page: http://www.colinmann.com/photos/plugins/cpmfetch/cftest.php give this error:

Fatal error: Cannot instantiate non-existent class: cpm in /home/cjmann/public_html/photos/plugins/cpmfetch/cftest.php on line 6

Thanks

vuud

Quote from: colinmann on September 10, 2006, 09:58:54 PM
Hi, sorry - but why does this page: http://www.colinmann.com/photos/plugins/cpmfetch/cftest.php give this error:

Fatal error: Cannot instantiate non-existent class: cpm in /home/cjmann/public_html/photos/plugins/cpmfetch/cftest.php on line 6

Thanks

Normally something like that is due to a bad path in the include statement for cpmfetch... but since the cpmfetch.php is probably in the same directory, that does not make much sense.  Did you upload everything into that directory?



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

colinmann

Quote from: vuud on September 10, 2006, 10:58:33 PM
Normally something like that is due to a bad path in the include statement for cpmfetch... but since the cpmfetch.php is probably in the same directory, that does not make much sense.  Did you upload everything into that directory?

yes I did, everything is uploaded into www.colinmann.com/photos/plugins/cpmfetch/

Any ideas? Thanks in advance :)

colinmann

By the way - the contents of the file is as follows:

<html>
<body>

<?php
   include "http://www.colinmann.com/photos/plugins/cpmfetch/cpmfetch.php";
   $objCpm = new cpm("/photos");
   $objCpm->cpm_setReturnType("resultset");
   $data = $objCpm->cpm_viewLastAddedMedia(1,1);
   $row = $data[0];
   $time = date('d-M-Y',$row['pCtime']);
   $objCpm->cpm_close();
   print $time;



?>
      
</body>
</html>


vuud

Quote from: colinmann on September 10, 2006, 11:20:45 PM
By the way - the contents of the file is as follows:

<html>
<body>
<?php
   include "http://www.colinmann.com/photos/plugins/cpmfetch/cpmfetch.php";
   $objCpm = new cpm("/photos");
   $objCpm->cpm_setReturnType("resultset");
   $data = $objCpm->cpm_viewLastAddedMedia(1,1);
   $row = $data[0];
   $time = date('d-M-Y',$row['pCtime']);
   $objCpm->cpm_close();
   print $time;



?>
      
</body>
</html>



try not using the url for the include file...

If you are in the same directory use this
include "./cpmfetch.php";

Some web servers may not allow the loading by url thing...

I am confused... you said this is cftest.php, but I don't have this sort of stuff in my test file.
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

colinmann

Quote from: vuud on September 11, 2006, 03:27:31 AM
Some web servers may not allow the loading by url thing...

You're right there, thanks

Quote from: vuud on September 11, 2006, 03:27:31 AM
I am confused... you said this is cftest.php, but I don't have this sort of stuff in my test file.

Yeah, sorry, I was being lazy & didn't change the filename ;) All works now though, feel free to check out www.colinmann.com :-)

Thanks again for your help!! Really, thanks :-)

vuud

Quote from: colinmann on September 11, 2006, 09:09:09 AM
Yeah, sorry, I was being lazy & didn't change the filename ;) All works now though, feel free to check out www.colinmann.com :-)

So is it that little updated thing on the front page from cpmfetch?
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