coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: yazeft on July 20, 2007, 07:46:59 PM

Title: ERROR: Cannot redeclare class cpm in (Using "INCLUDE" twice on the same page)
Post by: 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.
Title: Re: ERROR: Cannot redeclare class cpm in (Using "INCLUDE" twice on the same page
Post by: vuud on July 20, 2007, 08:20:19 PM
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...


Title: Re: ERROR: Cannot redeclare class cpm in (Using "INCLUDE" twice on the same page
Post by: yazeft on July 21, 2007, 05:36:59 AM
thanks heapsss!!!!! ;)