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: Extracting Last Additions Thumbnails  (Read 4418 times)

0 Members and 1 Guest are viewing this topic.

David McKim

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Extracting Last Additions Thumbnails
« on: August 03, 2006, 12:51:28 pm »

I believe this is possible, I have searched through just about all of the files, and I have tried may variations of code. However I have not been successful in my attempts. I am trying to extract the newest three thumbnails (uploads) from my /gallery/ to my site's homepage /index.php.

Can anyone help me out here? I am in dire need and I have spent countless hours trying to figure this out. I basically just want to make it possible on my homepage to show our user's latest 3 (descending vertically) submissions (also know as "Last Additions") on the homepage without having to go to the gallery itself to see them.

I tried to alter some code I already had but it failed... However it may help someone in helping me...

I think some of these may be what is needed on my index.php file in order to show the gallery thumbnails? Maybe not, maybe it's crap or maybe it's only partial data... I am sorry but I am still learning php, so a lot of this stuff in the Coppermine files I don't understand yet and I find it quite difficult to locate things that are defined.

Code: [Select]
<?php

// don't want any errors to be displayed...
error_reporting(0);

// This is a relative path to the web root.
$site_root_path './';

// This path points to the directory where Coppermine is installed.
$phpbb_root_path './gallery/';

define ('IN_PHPBB'true);
define('IN_SITE'true);

define('PAGE_TITLE''Garbagewars.com');

include_once( 
$phpbb_root_path 'extension.inc' );
include_once( 
$phpbb_root_path 'common.' $phpEx );
include_once( 
$phpbb_root_path 'includes/bbcode.' $phpEx );
include_once( 
$phpbb_root_path 'news_includes/common.' $phpEx );
include_once( 
$phpbb_root_path 'news_includes/posts.' $phpEx );

//
// Start session data
$userdata session_pagestart($user_ipPAGE_INDEX);
init_userprefs($userdata);
//
// End
//

$news phpbb_fetch_posts();

phpbb_disconnect();

?>

« Last Edit: November 13, 2006, 08:33:57 am by GauGau »
Logged

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9094
  • aka Frantz
    • Ma galerie
Re: Extracting Last Additions Thumbnails
« Reply #1 on: August 03, 2006, 01:01:15 pm »

Logged
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Extracting Last Additions Thumbnails
« Reply #2 on: August 03, 2006, 01:12:19 pm »

The code you pasted into your initial message is just wishful thinking. Recycling code that is suppossed to work for phpBB just by changing the paths to point to your Coppermine-driven gallery won't work. Attaching a Porsche sticker to the bumper of your pickup truck won't be adding more horse power to it - it's just whisful thinking. The same thing applies to your code that you appear to have borrowed from some please phpBB related without actually understanding it.
Do as Frantz suggested: there are several mods that deal with displaying dynamic content from coppermine on non-coppermine pages. In fact there's a whole sub-board dedicated to it.
You should post your budget if you were actually trying to hire a freelancer to do this for you. If you're looking for free support, you shouldn't have posted on the paid support board. If you posted here in error, don't start another thread, but say so and post a link (or confirm that your site actually is   
http://www.garbagewars.com/gallery/). A moderator will then move this thread accordingly.
Logged

David McKim

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: Extracting Last Additions Thumbnails
« Reply #3 on: August 04, 2006, 05:15:23 am »

Oh I am terribly sorry, I read the forum descriptions but this matter just didn't sound like it was to be placed in hacks/mods. Sorry for the mistake I just wasn't sure where to put my post. Thank you very much for pointing me in the right direction.  :)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Extracting Last Additions Thumbnails
« Reply #4 on: August 04, 2006, 09:05:06 am »

You're not suppossed to start a new thread on the mods board (in fact you can't). Re-read what I said: your code is just bogus, it won't do anything in Coppermine. You're suppossed to look at the existing threads in the mods board. They do exactly what you're after: display coppermine content on non-coppermine pages.
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 20 queries.