Página 1 de 1

Ayuda Con Unos Tpl

Publicado: 06 Jul 2008, 22:22
por Krauser
Instalando el simple subforums, primero he hecho las modificaciones php, resulta que me ha dado syntax error.:

Parse error: syntax error, unexpected T_STRING, expecting ']' in /home/hsanchez/public_html/foros/admin/admin_forums.php on line 1139

Linea 1139:

Código: Seleccionar todo

if ($forum_rows[$j][' && $forum_rows[$j]['forum_parent'] == 0'] == $cat_id)
Solucionado

Ahora otro xD

Parse error: syntax error, unexpected T_FOR in /home/hsanchez/public_html/foros/admin/admin_forums.php on line 1157

Código: Seleccionar todo

for( $k = 0; $k < $total_forums; $k++ )
Soulcionado

Ayuda en esta parte ahora con los tpl...

Ya tengo todo bien hecho, he creado mi primer subforo, siendo:

Test Categoria
-"Test forum" -> "probando subforos" ese subforo sale dentro del foro test forum, esta bien
-"probando subforos" ahora el caso esta aqui, me sale aqui tambien y el problema esta en el tpl del index_body, que nose como hay que modificarlo:

Código: Seleccionar todo

#
#-----[ FIND ]------------------------------------------
#
<span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span></td>
	<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.TOPICS}</span></td>
	<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.POSTS}</span></td>


#
#-----[ REPLACE WITH ]------------------------------------------
#
<!-- IF catrow.forumrow.MODERATORS --><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}<br /></span><!-- ENDIF -->
	  <!-- BEGIN sub --><!-- DEFINE $HAS_SUB = 1 --><!-- IF catrow.forumrow.sub.NUM > 0 -->, <!-- ELSE --><span class="genmed">{L_SUBFORUMS}: <!-- ENDIF -->{catrow.forumrow.sub.LAST_POST_SUB} <a href="{catrow.forumrow.sub.U_VIEWFORUM}" <!-- IF catrow.forumrow.sub.UNREAD -->class="topic-new"<!-- ENDIF --> title="{catrow.forumrow.sub.FORUM_DESC_HTML}">{catrow.forumrow.sub.FORUM_NAME}</a><!-- END sub -->
	  <!-- IF $HAS_SUB --></span><!-- UNDEFINE $HAS_SUB --><!-- ENDIF -->
	</td>
	<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.TOTAL_TOPICS}</span></td>
	<td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{catrow.forumrow.TOTAL_POSTS}</span></td>
Se supone que eso seria con el subSilver, pero alguien que tenga manejo con esto sabria como es con esta skin?

Código: Seleccionar todo

  <tr> 
	<td class="row1" width="32" align="center" valign="middle"><img src="{catrow.forumrow.FORUM_FOLDER_IMG}" width="18" height="24" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></td>
	<td class="row2" width="100%" align="left"><span class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_NAME}</a><br />
	  </span> <span class="genmed">{catrow.forumrow.FORUM_DESC}<br />
	  </span><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span></td>
	<td class="row1" align="center" valign="middle"><span class="gensmall">{catrow.forumrow.TOPICS}</span></td>
	<td class="row2" align="center" valign="middle"><span class="gensmall">{catrow.forumrow.POSTS}</span></td>
	<td class="row1" align="center" valign="middle" nowrap="nowrap"> <span class="gensmall">{catrow.forumrow.LAST_POST}</span></td>
 </tr>
Ese es el codigo que hay que modificar

Re: Ayuda Con Unos Tpl

Publicado: 07 Jul 2008, 01:05
por mitch
Primero que todo, haz un respaldo del archivo que vas a modificar, por si me equivocase... pero creo que es esto

Buscar:

Código: Seleccionar todo

<span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span></td>
    <td class="row1" align="center" valign="middle"><span class="gensmall">{catrow.forumrow.TOPICS}</span></td>
    <td class="row2" align="center" valign="middle"><span class="gensmall">{catrow.forumrow.POSTS}</span></td>
Reemplazar por:

Código: Seleccionar todo

<!-- IF catrow.forumrow.MODERATORS --><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}<br /></span><!-- ENDIF -->
      <!-- BEGIN sub --><!-- DEFINE $HAS_SUB = 1 --><!-- IF catrow.forumrow.sub.NUM > 0 -->, <!-- ELSE --><span class="genmed">{L_SUBFORUMS}: <!-- ENDIF -->{catrow.forumrow.sub.LAST_POST_SUB} <a href="{catrow.forumrow.sub.U_VIEWFORUM}" <!-- IF catrow.forumrow.sub.UNREAD -->class="topic-new"<!-- ENDIF --> title="{catrow.forumrow.sub.FORUM_DESC_HTML}">{catrow.forumrow.sub.FORUM_NAME}</a><!-- END sub -->
      <!-- IF $HAS_SUB --></span><!-- UNDEFINE $HAS_SUB --><!-- ENDIF -->
    </td>
    <td class="row1" align="center" valign="middle"><span class="gensmall">{catrow.forumrow.TOTAL_TOPICS}</span></td>
    <td class="row2" align="center" valign="middle"><span class="gensmall">{catrow.forumrow.TOTAL_POSTS}</span></td>

Re: Ayuda Con Unos Tpl

Publicado: 07 Jul 2008, 01:14
por Krauser
Se me ha deformado la tabla asi, pero muchas gracias, he seguido cambiando y al final ha salido asi:

Código: Seleccionar todo

  <tr> 
	<td class="row1" width="32" align="center" valign="middle"><img src="{catrow.forumrow.FORUM_FOLDER_IMG}" width="18" height="24" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></td>
	<td class="row2" width="100%" align="left"><span class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_NAME}</a><br />
	  </span> <span class="genmed">{catrow.forumrow.FORUM_DESC}<br />
	  <!-- IF catrow.forumrow.MODERATORS --><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}<br /></span><!-- ENDIF -->
      	  <!-- BEGIN sub --><!-- DEFINE $HAS_SUB = 1 --><!-- IF catrow.forumrow.sub.NUM > 0 -->, <!-- ELSE --><span class="genmed">{L_SUBFORUMS}: <!-- ENDIF -->{catrow.forumrow.sub.LAST_POST_SUB} <a href="{catrow.forumrow.sub.U_VIEWFORUM}" <!-- IF catrow.forumrow.sub.UNREAD -->class="topic-new"<!-- ENDIF --> title="{catrow.forumrow.sub.FORUM_DESC_HTML}">{catrow.forumrow.sub.FORUM_NAME}</a><!-- END sub -->
	  <!-- IF $HAS_SUB --></span><!-- UNDEFINE $HAS_SUB --><!-- ENDIF -->
     <td class="row1" align="center" valign="middle"><span class="gensmall">{catrow.forumrow.TOTAL_TOPICS}</span></td>
	<td class="row2" align="center" valign="middle"><span class="gensmall">{catrow.forumrow.TOTAL_POSTS}</span></td>
	<td class="row1" align="center" valign="middle" nowrap="nowrap"> <span class="gensmall">{catrow.forumrow.LAST_POST}</span></td>
 </tr>
Ya tengo mis preciados subforos *-* xD, ahora toca hacer backup full del foro.