CPMfetch for 1.5.6 - Page 7 CPMfetch for 1.5.6 - Page 7
 

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

Started by lurkalot, June 08, 2010, 11:35:18 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

gmc

Quote from: MG on December 30, 2018, 02:30:17 PM
...
One thing I don't now how to solved:

Everything works fine but the thumbnail in module shows from left side (check image from attachments) 
I would like to show images to center not from lef side.
BTW is there a chance to show some info below thumbnails something like title this image and autor?
CPMFetch provides ability to pass many 'options' parameters to format the displayed pictures as you would like - and adding information... Take a look at the documentation provided with the plugin (in the cpmfetch/docs/basic directory.)  If you don't have it loaded - you can view it here: http://greggallery.gmcdesign.com/cpmfetch/docs/basic/
There is a reference to a $format parameter - but I believe that is all integrated in $options now.

An example of how to use:
<?php
    
include "./gallery/cpmfetch/cpmfetch.php";
    
$objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
    
$options = array( "tablestyle" => "csstable""subtitle" => "File name is: {{pFilename}}); 
    
$objCpm->cpm_viewLastAddedMedia(1,1, $options);
    
$objCpm->cpm_close();
?>


The above will add css tag to the table statement (<table class="csstable">) and add filename below each picture.
Many other options possible...
(Of course your CSS tags would then be defined in your sites stylesheet to provide the centering or whatever is desired...)
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

MG

Thanks for help. A lot of time has elapsed since you answered me, but in the end I managed to add the right code for the css function. Thank you again.
Forum Vbulletin 4.1.11  / Portal vBadvanced CMPS v4.2.0, bridged with CPG 1.5.46, cpmfetch 2.0.0

lurkalot

Looks like my host bumped up to php 7.1.32 and my SMF error log is full of these errors,

https://ca---------.com/forum/index.php?
8: A non well formed numeric value encountered
File: /home/camxxxxx/public_html/gallery/cpmfetch/cpmfetch_dao.php
Line: 1692
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

ron4mac

You can try changing that line to:
return microtime(true)*1000000;

lurkalot

Quote from: ron4mac on October 11, 2019, 10:07:59 PM
You can try changing that line to:
return microtime(true)*1000000;

Thanks.  That looks like it done the trick.  I'll monitor it for a while.  ;)
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

programsgulf

can someone please re-upload the code changes in install.php I'm just seeing scroll bars .

ron4mac

Quote from: programsgulf on June 10, 2020, 06:07:18 AM
can someone please re-upload the code changes in install.php I'm just seeing scroll bars .
Make sure you are using version 2.0.1 of CPMfetch.

panhead

I am using this code:

include_once "../cpg/cpmfetch/cpmfetch.php";
$objCpm = new cpm("../cpg/cpmfetch/cpmfetch_config.php");
$options = array( 'imageheight' => '120' );
$objCpm->cpm_viewRandomMediaFrom("cat=4,6, 12",1, 8, $options);
$objCpm->cpm_close();


But the images shown are higher than 120. What am I doing wrong?

AnnieHoney

Sorry for ressucitating such an old thread.

On version 2.0.1 and php 8 I get a
QuoteDeprecated: Creation of dynamic property cpm::$cfg is deprecated in /home2/tomcruis/public_html/gallery/cpmfetch/cpmfetch_dao.php on line 96

I tried installing that dev version, but it seems to support mysql only and I'm on mysqli, so all I get is a blank page.
Is there a fix for this?

Also, what's the code for Latest Added Albums, not media?

phill104

Unfortunately, the developer of this plugin has long since left these forums Shame as he was a lovely chap. So any fix would need to come from the community.
It is a mistake to think you can solve any major problems just with potatoes.

406man

#130
Quote from: AnnieHoney on May 16, 2024, 09:15:48 PMSorry for ressucitating such an old thread.

On version 2.0.1 and php 8 I get a
I tried installing that dev version, but it seems to support mysql only and I'm on mysqli, so all I get is a blank page.
Is there a fix for this?
I've updated the cpmfetch code to V2.2 and tested it with PHP 8.2.19 so what you want to do ought to work with the new version. See here (Link updated for the new domain and forum):
https://coppermine-gallery.com/forum/index.php/topic,80812.0.html

Quote from: AnnieHoney on May 16, 2024, 09:15:48 PMAlso, what's the code for Latest Added Albums, not media?
There are a number of options although I'm not sure if they will fit your needs. Could you clarify what you want to do and I'll recommend one of the options. Alternatively you could just try out the examples using the new testfetch test program

Another point - this forum thread is for Coppermine 1.5.x but the cpmfetch new version 2.2 will only run with Coppermine 1.6.x. I've tested it with 1.6.25 and higher and would not recommend using anything older than 1.6.25.