Ver Mensaje Individual
  #6 (permalink)  
Antiguo 12/12/2004, 20:22
Dokan
 
Fecha de Ingreso: octubre-2004
Mensajes: 46
Antigüedad: 19 años, 6 meses
Puntos: 0
hola
yo tb segui el tutorial del foro de zonaphp para hacer la web modular y un foro, el problema que describes me ha llevado la ultima semana un poco de cabeza y al final estoy intentando resolverlo asi:
cabecera.html
Código HTML:
 <body bgcolor="#9999cc" text="#FFFFFF" link="#FFFFFF">
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="2">
<tr>
    <td bgcolor="#4b557d" align="center">
     <div align="right">
        [ <a href="?mod=home">Inicio</a> ]
        [ <a href="?mod=foro&citar=0">Nuevo Tema / Responder Tema</a> ]
     </div>
    </td>
</tr>
</table>
</body> 
post.html
Código HTML:
<table width="90%" border="0" align="center" cellpadding="2" cellspacing="2"> 
  <tr bgcolor="<?=$color?>"> 
    <td width="25%" valign="top">
      <b><a name="<?=$id?>"><?=$autor?></a></b><br> 
      <font size="-2">Enviado el : <?=$enviado?></font> 
    </td> 
    <td> 
        <table width="100%" border="0" cellspacing="0" cellpadding="0"> 
            <tr> 
                <td><strong><font size="-1"><?=$titulo?></font></strong></td> 
                <td width="10%" align="right">
                    [<a href="?mod=foro&id=<?=$id?>&citar=1">CITAR</a>]
                </td> 
            </tr> 
        </table> 
        <hr align="center" width="100%" size="2" noshade><?=$mensaje?>
    </td> 
  </tr> 
  <tr> 
    <td colspan="2" height="5"></td> 
  </tr> 
</table> 
foro.php
Código PHP:
if (isset ($_GET['citar'])) include ('./foro/respuesta.php');
else if (isset (
$_GET['id'])) $id $_GET['id']; 
respuesta.php
Código PHP:
if (isset ($_GET['id'])) $id $_GET['id'];
//if (isset $$id = $_GET["id"]; 
if (isset ($_GET['citar'])) $citar $_GET["citar"]; 
if (isset (array(
"id" => $id)) $row = array("id" => $id); 
if(
$citar==1
para hacer el foro tb he seguido el tutorial de zonaphp.
como puedes ver si $_GET['citar'] esta seteado se incluye el archivo respuesta.php donde se diferencia si es nuevo tema $citar==0
por ahora no he conseguido que funcione, me da el siguiente error al cargar la web:
Parse error: parse error, unexpected T_ARRAY, expecting T_VARIABLE or '$' in \foro\respuesta.php on line 5
como podeis ver mas arriba en esa linea tengo:
Código PHP:
if (isset (array("id" => $id)) $row = array("id" => $id); 
no entiendo esta linea que hace, he leido un poco sobre arrays en el manual de php.net y sigo igual.
en el codigo del foro de zonaphp esto esta asi y funciona. si alguien me puede explicar que hace esta linea de codigo, o donde esta el error, o las dos cosas, para ver si funciona.

esta forma de llamar a respuesta.php creo que para un foro mas complicado va a ser muy engorrosa y al final lo mejor va a ser hacer lo que ha explicado Pincho, pero en este foro que es sencillito deberia funcionar y ya que estoy... tengo que encontrar que falla.
__________________
:adios: Saludos
Dokan