I hope this is the right forum. Is there a way to do this? I've been searching for a while and can't seem to find a solution.
I'm trying to create a random picture module using CPMFetch to display on the intermediate picture page. The code works outside of coppermine, but as soon as I try putting it into the theme.php file, it fails. I have to admit, I am a PHP noob so I may be trying to integrate the code incorrectly. I'm just copy and pasting it into the theme file.
I'm using CPMFetch 2.0 and coppermine 1.4.13
Nevermind, I figured it out. I modified the instructions for inserting the code into phpbb template.
Here is the code for future reference.
Copy the function theme_html_picture() from the sample theme file to your theme.php
Once you have the function copied over, find
$params = array('{CELL_HEIGHT}' => '100',
Add Before
include_once "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("./cpmfetch/cpmfetch_config.php");
$objCpm->cpm_setReturnType('html');
Then find
'{CAPTION}' => bb_decode($CURRENT_PIC_DATA['caption']),
Add After:
'{FETCHRANDOM}' => $objCpm->cpm_viewRandomMedia(2, 3),
Then find
);
This should be directly below the code you just added, if not it is the end of the array
After Add
$objCpm->cpm_close();
To add it to the intermediate picture copy the template for intermediate image display from the sample template to your theme.php
Then use {FETCHRANDOM} to position the cpmfetch module on the page