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: ERROR: Cannot redeclare class cpm in (Using "INCLUDE" twice on the same page)  (Read 4513 times)

0 Members and 1 Guest are viewing this topic.

yazeft

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34

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:

Code: [Select]
<?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.
« Last Edit: July 23, 2007, 09:04:05 am by GauGau »
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code

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:

Code: [Select]
<?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...


Logged
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

yazeft

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34

thanks heapsss!!!!! ;)
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 21 queries.