What should I do to show recently added pics? What should I do to show recently added pics?
 

News:

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

Main Menu

What should I do to show recently added pics?

Started by natalina, November 17, 2008, 08:48:22 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

natalina

Hi. I suppose my quest is stupid but I can't get how to act. I have cpmfetch, showing pics from user's category. It works fine but I can' understand what should I do when users create new albums. Should I reinstall CPM in order to show new pics? Or will CPM get it by itself? Thanks a lot for explanation

Joachim Müller

Quote from: natalina on November 17, 2008, 08:48:22 PM
Should I reinstall CPM in order to show new pics?
No, of course not
Quote from: natalina on November 17, 2008, 08:48:22 PMOr will CPM get it by itself?
Post the code you use. A link to your page might help as well. In fact those two bits of information are vital, or rather: mandatory.

natalina

Thank u so much :)
here is the code:
<?php
echo '<div align="center" style="border: 0; font-family: Verdana, Arial, Helvetica, sans-serif;"><h5>some Russian words<br/>some else Russian words</h5>';
  include_once "./cpmfetch/cpmfetch.php";
  $objCpm = new cpm("./cpmfetch/cpmfetch_config.php");
  $objCpm->cpm_setfilter($filter = ".jpg");
  $options = array('windowtarget' => '_blank',"imagewidth"=>"100", "subtitle" => "{{aTitle}}","imagestyle" => "ihomepage",);
  $objCpm->cpm_viewRandomMediaFrom ("cat=1", 4, 1, $options,$filter);
  $objCpm->cpm_close();
  echo "</div>";
  ?>
Link to my gallery (I'm using cpm in custom footer - right column bottom)
http://www.forma.spb.ru/architect_gallery/index.php


phill104

Before you go any further you need to upgrade fro 1.4.10 to the latest release.

It is a mistake to think you can solve any major problems just with potatoes.

natalina

Thank u !As a matter of fact I did - manually, step by step. I use to do it the next day after the version is published & I suppose my quest has nothing in common with this issue.

Joachim Müller

Quote from: natalina on November 17, 2008, 10:45:11 PM
As a matter of fact I did - manually, step by step.
No, you have not. How could you manually have updated thousands of lines of changed code? The only supported upgrade method is the one we describe in our docs. Do you want me to hack your gallery as a proof of concept? ;)

Quote from: natalina on November 17, 2008, 10:21:17 PM
Link to my gallery (I'm using cpm in custom footer - right column bottom)
http://www.forma.spb.ru/architect_gallery/index.php
cpmFetch is not meant to be used on coppermine-driven pages. It is meant to be used on pages that are not coppermine-driven.

The line that needs editing is   $objCpm->cpm_viewRandomMediaFrom ("cat=1", 4, 1, $options,$filter);You sort-of hard-coded the album into that line of code, so you would have to edit that line whenever there is new content. Pull data from the most recent album if you want to display that is new. Use cpm_viewLastAddedMediaFrom

natalina


Joachim Müller


natalina

Yes. thank u. I' m just now preparing some blocks to display outside of my gallery, because it helps very much to my visitors. Great gallery script & great mod  :-*