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: PHP Code to view latest images  (Read 5758 times)

0 Members and 1 Guest are viewing this topic.

Daniel_Hatcher

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 7
PHP Code to view latest images
« on: October 29, 2005, 02:04:58 pm »

I'm looking for a script to do a latest additions feature on my website, i tried myself the images how but when you click them it does not go to that image.
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: PHP Code to view latest images
« Reply #1 on: October 29, 2005, 02:17:37 pm »

If you are looking for a mod to show pictures from coppermine on to your home page or website then this will help.

http://forum.coppermine-gallery.net/index.php?topic=19077.0
Logged
Chief Geek at Ranium Systems

Daniel_Hatcher

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 7
Re: PHP Code to view latest images
« Reply #2 on: October 29, 2005, 07:04:36 pm »

I tried that the thing is i have it shown in a Variable like '$template_header="";'  and that does not do that.
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: PHP Code to view latest images
« Reply #3 on: October 29, 2005, 09:27:49 pm »

You must be using one of the functions to display images. For example is you are using cpm_viewRandomMediaFromCategory() function of cpmfetch then edit cpmfetch.php file and edit function cpm_viewRandomMediaFromCategory.

Replace

Code: [Select]
print $this->createTable($resultset,$rows,$columns);

with

Code: [Select]
return $this->createTable($resultset,$rows,$columns);

and collect the returned value in whatever variable u want.
Logged
Chief Geek at Ranium Systems
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 15 queries.