Advanced search  

News:

cpg1.5.46 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter recently discovered vulnerabilities. It is important that all users who run version cpg1.5.44 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: CpmFetch php code not working in sidebar widget  (Read 3039 times)

0 Members and 1 Guest are viewing this topic.

Nymheria

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
CpmFetch php code not working in sidebar widget
« on: May 28, 2016, 07:09:08 pm »

Hello,

I'm new to fansites and this forum so I hope I'm not doing anything wrong by writing here but I'm desperate about an issue happening on my fansite. I wanted to have the "latest images added to the gallery" in a sidebar's widget on my site, so I did everything I had to do with cpmfetch and it all went all as the CpmFetch Installer was showing me the thumbnails of the latest uploads in my gallery.

However, when I'm copying/pasting the code I'm given in the widget, here is what is appearing instead of the thumbnails :

cpm_viewLastAddedMedia(1,4); $objCpm->cpm_close(); ?>

Did I do something wrong ?

By the way, I have WordPress 4.5.2 and Coppermine 1.5.42 (stable) and my gallery is at roselesliesource.com/gallery/

Thank you !
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15415
Re: CpmFetch php code not working in sidebar widget
« Reply #1 on: May 30, 2016, 10:14:08 am »

That's an issue you probably have to ask in the Wordpress support board. Just to make sure, what code have you copied to the widget?
Logged

Nymheria

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: CpmFetch php code not working in sidebar widget
« Reply #2 on: May 31, 2016, 08:09:39 am »

Alright thank you, should I post there : https://wordpress.org/support/forum/plugins-and-hacks ?

I have copied the second code :

<?php
  include "./gallery/cpmfetch/cpmfetch.php";
  $objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
  $objCpm->cpm_viewLastAddedMedia(1,4);
  $objCpm->cpm_close();
?>
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15415
Re: CpmFetch php code not working in sidebar widget
« Reply #3 on: May 31, 2016, 09:30:25 am »

I'm no CPMFetch expert, but the code looks correct. I don't know how Wordpress handles custom PHP code in their widget functionality, but something goes obviously wrong, as everything after the first ">" is displayed as plain text. It seems Wordpress interprets that digit as closing PHP tag.

Please try to add that code to a new PHP file somewhere on your webspace, to make sure it works as expected.
Logged

Nymheria

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: CpmFetch php code not working in sidebar widget
« Reply #5 on: May 31, 2016, 04:30:30 pm »

Thank you so much, I used one of the plugin and it works now !  ;D
Logged
Pages: [1]   Go Up
 

Page created in 0.015 seconds with 20 queries.