ERROR: Cannot redeclare class cpm in (Using "INCLUDE" twice on the same page) ERROR: Cannot redeclare class cpm in (Using "INCLUDE" twice on the same page)
 

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

ERROR: Cannot redeclare class cpm in (Using "INCLUDE" twice on the same page)

Started by yazeft, July 20, 2007, 07:46:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

yazeft

Hi, i've got coppermine and SMF bridge.

i'm trying to use the CPG include in the smf template twice, once for random pics and once for latest pics on the same page..

i've tried everything that i can find from the search and still nothing works..

please let me know if there is another way to get this working..

my code:

<?php

// ..code here...

</td>
<td valign="middle" align="center" height="75">';

include ("Sources/gallerylatest.php");

echo '
</td>

// ...more code here...

  
</td>
  
<td class="windowbg2" width="100%">';

include ("Sources/galleryrandom.php");

echo '
</td>

// ..more code here...

?>


This is the code for my boardindex.template.php - as you can see i've used cpg include twice and only the first one works.. at the top of the page.. the one at the bottom of the page doesnt work.. i get the error:

"Cannot redeclare class cpm..."

i've tried everything possible, to no avail..

please help, thanks.

vuud

Quote from: yazeft on July 20, 2007, 07:46:59 PM
Hi, i've got coppermine and SMF bridge.

i'm trying to use the CPG include in the smf template twice, once for random pics and once for latest pics on the same page..

i've tried everything that i can find from the search and still nothing works..

please let me know if there is another way to get this working..

my code:

<?php

// ..code here...

</td>
<td valign="middle" align="center" height="75">';

include ("Sources/gallerylatest.php");

echo '
</td>

// ...more code here...

  
</td>
  
<td class="windowbg2" width="100%">';

include ("Sources/galleryrandom.php");

echo '
</td>

// ..more code here...

?>


This is the code for my boardindex.template.php - as you can see i've used cpg include twice and only the first one works.. at the top of the page.. the one at the bottom of the page doesnt work.. i get the error:

"Cannot redeclare class cpm..."

i've tried everything possible, to no avail..

please help, thanks.

Two things...

1) Only do the include once

2) Only do the new statement once

3) Don't close at the end of the first one

Well, three...


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