Advanced search  

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

Pages: [1]   Go Down

Author Topic: PHP Code to view latest images  (Read 5908 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.017 seconds with 19 queries.