cpmfetch in PHPBB3 cpmfetch in PHPBB3
 

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

Main Menu

cpmfetch in PHPBB3

Started by Stewwake, June 23, 2007, 02:10:46 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Stewwake

Hi there, hope you can help, Ive looked everywhere & so far no soloution.

I am trying to use cpm fetch to display some latest photos from coppermine on the side of a phpbb3 forum page.

I have used the following code (which works on all other pages on my site):


  <?php
include_once "./wakeboarding-photos/cpmfetch/cpmfetch.php";
$objCpm = new cpm("./wakeboarding-photos/cpmfetch/cpmfetch_config.php");
$options = array("imagewidth" => "80", "imagestyle" => "fetchimg",);
  $objCpm->cpm_viewLastAddedMedia(1, 8, $options);

  $objCpm->cpm_close();
?>

Within the PHPBB3 admin you can set the board to allow php parsing - I have set this to yes.

There are some instructions re using php in PHPBB3 from PHPBB3 as follows:


"PHP
A contentious decision has seen the ability to include PHP within the template introduced. This is achieved by enclosing the PHP within relevant tags:

<!-- PHP -->
   echo "hello!";
<!-- ENDPHP -->
You may also include PHP from an external file using:

<!-- INCLUDEPHP somefile.php -->
it will be included and executed inline."

Thus I have used the <!-- PHP --> & <!-- ENDPHP --> tags directly above & below the cpmfetch code.

I have also played around with the relative paths but no pictures appear. No error occurs, I just dont see any pics.

Any help would be very much gratefully appreciated!!

Thanks

Stew

vuud

Quote from: Stewwake on June 23, 2007, 02:10:46 AM
Hi there, hope you can help, Ive looked everywhere & so far no soloution.

I am trying to use cpm fetch to display some latest photos from coppermine on the side of a phpbb3 forum page.

I have used the following code (which works on all other pages on my site):


  <?php
include_once "./wakeboarding-photos/cpmfetch/cpmfetch.php";
$objCpm = new cpm("./wakeboarding-photos/cpmfetch/cpmfetch_config.php");
$options = array("imagewidth" => "80", "imagestyle" => "fetchimg",);
  $objCpm->cpm_viewLastAddedMedia(1, 8, $options);

  $objCpm->cpm_close();
?>

Within the PHPBB3 admin you can set the board to allow php parsing - I have set this to yes.

There are some instructions re using php in PHPBB3 from PHPBB3 as follows:


"PHP
A contentious decision has seen the ability to include PHP within the template introduced. This is achieved by enclosing the PHP within relevant tags:

<!-- PHP -->
   echo "hello!";
<!-- ENDPHP -->
You may also include PHP from an external file using:

<!-- INCLUDEPHP somefile.php -->
it will be included and executed inline."

Thus I have used the <!-- PHP --> & <!-- ENDPHP --> tags directly above & below the cpmfetch code.

I have also played around with the relative paths but no pictures appear. No error occurs, I just dont see any pics.

Any help would be very much gratefully appreciated!!

Thanks

Stew


Pls provide a link to the URL... that will tell me so many things that your post did not.

Otherwise I had no idea there even was a phpbb3





Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

Stewwake

Apologies,

Here is the forum url where I have put the code in:

http://www.wakeboardinguk.co.uk/wakeboard-forum/

I have put the code in the div starting: <div class="left-panel" id="gcode_left_index">


And the coppermine gallery is here:

http://www.wakeboardinguk.co.uk/wakeboarding-photos/index.php

thanks

vuud

Quote from: Stewwake on June 23, 2007, 12:26:44 PM
Apologies,

Here is the forum url where I have put the code in:

http://www.wakeboardinguk.co.uk/wakeboard-forum/

I have put the code in the div starting: <div class="left-panel" id="gcode_left_index">


And the coppermine gallery is here:

http://www.wakeboardinguk.co.uk/wakeboarding-photos/index.php

thanks


The first thing to try is changiny your new statement to point at the actual cpmfetch_config.php file

$objCpm = new cpm("../wakeboarding-photos/cpmfetch/cpmfetch_config.php");

Note the two dots instead of one.

Lets see how that goes
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

Stewwake

Hi there,

Ok, code now reads (have include div headers this time):

<div class="left-panel" id="gcode_left_index">

   <!-- PHP -->
<?php

  include_once "../wakeboarding-photos/cpmfetch/cpmfetch.php";
$objCpm = new cpm("../wakeboarding-photos/cpmfetch/cpmfetch_config.php");
  $options = array("imagestyle" => "fetchimg",);
$objCpm->cpm_viewRandomMostViewedMediaFrom("alb=4",4, 3, $options);
 
 
?>
 
<!-- ENDPHP -->   
        </div>


No photos appearing this time?

vuud

Quote from: Stewwake on June 24, 2007, 11:58:08 AM
Hi there,

Ok, code now reads (have include div headers this time):

<div class="left-panel" id="gcode_left_index">

   <!-- PHP -->
<?php

  include_once "../wakeboarding-photos/cpmfetch/cpmfetch.php";
$objCpm = new cpm("../wakeboarding-photos/cpmfetch/cpmfetch_config.php");
  $options = array("imagestyle" => "fetchimg",);
$objCpm->cpm_viewRandomMostViewedMediaFrom("alb=4",4, 3, $options);
 
 
?>
 
<!-- ENDPHP -->   
        </div>


No photos appearing this time?


I suspect that this is a PHPBB3 problem, or at least a limiting of out understanding of it.

In reviewing the original post (Since Cpmfetch is almost always somewhat vocal), you cite the PHPBB3 example, but then you added in a <?php tag and an ?> php end tag.

They don't seem to include that in their post.  Try it without them.





Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

Stewwake

Excellent!! It works

Thanks alot -

I did try it without the <?php tags but must have had the paths wrong at the same time. Is good to go through it with someone who knows what they are talking about!

Cheers