Foros del Web » Programando para Internet » PHP »

Fatal error como lo soluciono

Estas en el tema de Fatal error como lo soluciono en el foro de PHP en Foros del Web. Hola maestros que tal Bueno vean ando creando Themes y despues me dan este Fatal error :( Fatal error: Cannot redeclare themepreview() in /theme.php on ...
  #1 (permalink)  
Antiguo 05/01/2002, 00:48
 
Fecha de Ingreso: junio-2001
Ubicación: Rosario
Mensajes: 1.434
Antigüedad: 22 años, 9 meses
Puntos: 2
Fatal error como lo soluciono

Hola maestros que tal

Bueno vean ando creando Themes y despues me dan este Fatal error :(

Fatal error: Cannot redeclare themepreview() in /theme.php on line 9

ya se que esta en el archivo theme.php pero diganme cual es la solución Porfa

Muchas Grax

Salu2 :)

<center>
<embed width="360" height="60" src="http://escool2.netfirms.com/girl.swf">
  #2 (permalink)  
Antiguo 05/01/2002, 00:53
Nok
 
Fecha de Ingreso: abril-2001
Mensajes: 302
Antigüedad: 23 años
Puntos: 0
Re: Fatal error como lo soluciono

Hola,
Mira, no conozco el Nuke pero por el error que te tiera debes esta redefiniendo la funcion &quot;themepreview()&quot; cosa que no es posible (redefinir quiere decir que la declaras mas de una vez). Fija en el codigo si no estas inportando (include) alguna libreria 2 veces, o te ovidaste de borrar algo.

Bueno espero que Te sirva.
Saludos!
Nok
  #3 (permalink)  
Antiguo 05/01/2002, 01:14
 
Fecha de Ingreso: junio-2001
Ubicación: Rosario
Mensajes: 1.434
Antigüedad: 22 años, 9 meses
Puntos: 2
Re: Fatal error como lo soluciono

&lt;?
/* Theme Creator for ALV
* Andres M&lt;[email protected]&gt;
* Grupo ALV http://www.es-cool.com.ar
*/
?&gt;
&lt;?php
$bgcolor1 = &quot;#FFFFFF&quot;; $bgcolor2 = &quot;#CCCCCC&quot;; $bgcolor3 = &quot;#e6e6e6&quot;; $textcolor1 = &quot;#000000&quot;; $textcolor2 = &quot;#000000&quot;; $pollcolor = &quot;brown&quot;;$thename = &quot;jeje&quot;;
function themepreview($title, $hometext, $bodytext=&quot;&quot;, $notes=&quot;&quot;) {
echo &quot;&lt;p&gt;&lt;b&gt;$title&lt;/b&gt;&lt;br&gt;$hometext&lt;br&gt;&lt;br&gt;$bodyt ext $notes&quot;;
}

function themeindex ($aid, $informant, $time, $title, $counter, $topic, $thetext, $notes, $morelink, $topicname, $topicimage, $topictext) {
include(&quot;config.php&quot;);
if(strcmp($aid,$informant)) {
if($informant != &quot;&quot;)
$boxstuff = &quot;&lt;a href=\&quot;user.php?op=userinfo&amp;uname=$inform ant\&quot;&gt;$informant&lt;/a&gt; &quot;;
else
$boxstuff = &quot;$anonymous &quot;;
$boxstuff.= &quot;&quot;.translate(&quot;writes&quot;).&quo t; &lt;i&gt;\&quot;$thetext\&quot;&lt;/i&gt; $notes&quot;;
} else $boxstuff = $thetext;
?&gt;
&lt;table border=0 cellpadding=0 cellspacing=0 align=center bgcolor=000000 width=100%&gt;
&lt;tr&gt;&lt;td&gt; &lt;table border=0 cellpadding=3 cellspacing=1 width=100%&gt;
&lt;tr&gt;&lt;td bgcolor=#CCCCCC background=&gt;
&lt;font face=Arial,Helvetica size=2 color=#000000&gt;
&lt;b&gt;&lt;?php echo $title; ?&gt;&lt;/b&gt;&lt;br&gt;
&lt;font face=Arial,Helvetica size=1&gt;
&lt;?php
echo translate(&quot;Posted by &quot;).&quot; &lt;b&gt;&quot;;
echo formatAidHeader($aid).&quot;&lt;/b&gt; &quot;.translate(&quot;on&quot;).&quot; $time $timezone &quot;.translate(&quot;readed:&quot;).$counter.tra nslate(&quot;times&quot;);
?&gt;)&lt;br&gt;
&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;
&lt;td bgcolor=#FFFFFF background=&gt;&lt;a href=&quot;search.php?query=&amp;topic=&lt;?php echo $topic; ?&gt;&amp;author=&quot;&gt;
&lt;img src=&lt;?php echo&quot;$tipath$topicimage&quot;; ?&gt; border=0 Alt=&lt;?php echo&quot;\&quot;$topictext\&quot;&quot;; ?&gt; align=right hspace=10 vspace=10&gt;
&lt;/a&gt;&lt;font face=Arial,Helvetica size=3 color=#000000&gt;
&lt;?php echo $boxstuff; ?&gt;&lt;br&gt;&lt;br&gt; &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;
&lt;td align=Left bgcolor=#CCCCCC background=&gt;
&lt;font face=Arial,Helvetica size=2 color=#000000&gt;
&lt;?php echo $morelink; ?&gt;
&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;&lt;br&gt;
&lt;? } ?&gt;

&lt;?

Sige

<center>
<embed width="360" height="60" src="http://escool2.netfirms.com/girl.swf">
  #4 (permalink)  
Antiguo 05/01/2002, 01:15
 
Fecha de Ingreso: junio-2001
Ubicación: Rosario
Mensajes: 1.434
Antigüedad: 22 años, 9 meses
Puntos: 2
Re: Fatal error como lo soluciono

function themearticle ($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) {
include(&quot;config.php&quot;);
if (&quot;$aid&quot; != &quot;$informant&quot;) {
if($informant != &quot;&quot;) $informant = &quot;&lt;a href=\&quot;user.php?op=userinfo&amp;uname=$inform ant\&quot;&gt;$informant&lt;/a&gt; &quot;;
} else {
$boxstuff = &quot;$anonymous &quot;.translate(&quot;writes&quot;).&quot; &lt;i&gt;\&quot;$thetext\&quot;&lt;/i&gt; $notes&quot;;
}
echo&quot;
&lt;table border=0 cellpadding=0 cellspacing=0 align=center bgcolor=000000 width=100%&gt;
&lt;tr&gt;&lt;td&gt; &lt;table border=0 cellpadding=3 cellspacing=1 width=100%&gt;
&lt;tr&gt;&lt;td bgcolor=#CCCCCC background=&gt;
&lt;font face=Arial,Helvetica size=2 color=#000000&gt;
&quot;;
if(&quot;$aid&quot; != &quot;$informant&quot;) {
echo &quot;&lt;b&gt;$title&lt;/b&gt;&lt;br&gt;
&lt;font face=Arial,Helvetica size=2&gt;
&quot;.translate(&quot;Contributed by &quot;).&quot; $informant &quot;.translate(&quot;on&quot;).&quot; $datetime&lt;/font&gt;&quot;;
} else {
echo &quot;&lt;b&gt;$title&lt;/b&gt;&lt;br&gt;
&lt;font face=Arial,Helvetica size=1&gt;
&quot;.translate(&quot;Posted on &quot;).&quot; $datetime&quot;;
}
global $admin, $sid;
if ($admin) {
echo &quot;&amp;nbsp;&amp;nbsp; [ &lt;a href=admin.php?op=EditStory&amp;sid=$sid&gt;&quot; .translate(&quot;Edit&quot;).&quot;&lt;/a&gt; | &lt;a href=admin.php?op=RemoveStory&amp;sid=$sid&gt;&quo t;.translate(&quot;Delete&quot;).&quot;&lt;/a&gt; ]&quot;;
}
echo &quot;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td bgcolor=#FFFFFF background=&gt;
&lt;font face=Arial,Helvetica size=3 color=#000000&gt;
&lt;a href=search.php?query=&amp;topic=$topic&amp;author =&gt;&lt;img src=$tipath$topicimage border=0 Alt=\&quot;$topictext\&quot; align=right hspace=10 vspace=10&gt;&lt;/a&gt;
$thetext &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;&lt;br&gt; &quot;;
}
?&gt;


mmm yo no encuentro nada mal, que puede ser Porfa Ayudenme no se que hacer

<center>
<embed width="360" height="60" src="http://escool2.netfirms.com/girl.swf">
  #5 (permalink)  
Antiguo 05/01/2002, 09:59
 
Fecha de Ingreso: junio-2001
Ubicación: Rosario
Mensajes: 1.434
Antigüedad: 22 años, 9 meses
Puntos: 2
Re: Fatal error como lo soluciono

Vamos maestros que esta no me la se alguien tiene que saver mmmmm

<center>
<embed width="360" height="60" src="http://escool2.netfirms.com/girl.swf">
  #6 (permalink)  
Antiguo 05/01/2002, 15:01
Avatar de Chikis
Usuario no validado
 
Fecha de Ingreso: agosto-2001
Ubicación: Cuernavaca, Morelos, Mexico
Mensajes: 170
Antigüedad: 22 años, 7 meses
Puntos: 0
Re: Fatal error como lo soluciono

ahi no hay ninguna que se llame asi, el error ha de estar en theme.php

<center><img border="0" src="http://www.efrance.fr/webonear/firma.png">
  #7 (permalink)  
Antiguo 06/01/2002, 14:56
Avatar de Webstudio
Colaborador
 
Fecha de Ingreso: noviembre-2001
Ubicación: 127.0.0.1
Mensajes: 3.499
Antigüedad: 22 años, 5 meses
Puntos: 69
Re: Fatal error como lo soluciono

9andres, como ya te han respondido, el error no esta en tu codigo, esta en el mal concepto de que quieres redefinir una funcion que YA existe, cosa que no se puede hacer. En todo caso, para que no te de el error, puedes utilizar la funcion function_is_declared() para saber si una funcion ya ha sido declarada, pero nada mas.

<hr><font size=2 face="verdana">- Pablo Daniel Rigazzi (Webstudio)
<font size=1 color="#333333">COORDINADOR PROYECTO REGIONALIZACION ARGENTINA
Visita <a href="http://www.web-studio.com.ar" target="_blank">Web Studio</a> - Tutoriales Photoshop</fo
  #8 (permalink)  
Antiguo 06/01/2002, 19:57
 
Fecha de Ingreso: junio-2001
Ubicación: Rosario
Mensajes: 1.434
Antigüedad: 22 años, 9 meses
Puntos: 2
Re: Fatal error como lo soluciono

Ops me olvide de havisarles que este error ya lo sulucione pero este otro no se que pasa <a href='ir.asp?http://www.forosdelweb.com/mensaje.asp?id=54924' target='_blank'>http://www.forosdelweb.com/mensaje.asp?i...</a> :(

Salu2 :)

<center>
<embed width="360" height="60" src="http://escool2.netfirms.com/girl.swf">
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 00:07.