Advanced search  

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]

Pages: [1]   Go Down

Author Topic: What should I do to show recently added pics?  (Read 7094 times)

0 Members and 1 Guest are viewing this topic.

natalina

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Female
  • Posts: 96
    • Interior & Architecture
What should I do to show recently added pics?
« on: November 17, 2008, 08:48:22 pm »

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

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: What should I do to show recently added pics?
« Reply #1 on: November 17, 2008, 10:13:44 pm »

Should I reinstall CPM in order to show new pics?
No, of course not
Or 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.
Logged

natalina

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Female
  • Posts: 96
    • Interior & Architecture
Re: What should I do to show recently added pics?
« Reply #2 on: November 17, 2008, 10:21:17 pm »

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

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: What should I do to show recently added pics?
« Reply #3 on: November 17, 2008, 10:34:17 pm »

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

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

natalina

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Female
  • Posts: 96
    • Interior & Architecture
Re: What should I do to show recently added pics?
« Reply #4 on: November 17, 2008, 10:45:11 pm »

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

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: What should I do to show recently added pics?
« Reply #5 on: November 19, 2008, 11:23:39 am »

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

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
Code: [Select]
  $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
Logged

natalina

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Female
  • Posts: 96
    • Interior & Architecture
Re: What should I do to show recently added pics?
« Reply #6 on: November 19, 2008, 11:40:41 am »

Thank u for your kind explanation:)

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: What should I do to show recently added pics?
« Reply #7 on: November 20, 2008, 08:42:30 am »

Issue solved?
Logged

natalina

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Female
  • Posts: 96
    • Interior & Architecture
Re: What should I do to show recently added pics?
« Reply #8 on: November 20, 2008, 11:14:44 am »

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  :-*
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 19 queries.