Retroceder   Foros del Web > Diseño de Sitios web > Aplicaciones pre-fabricadas > PhpBB

Respuesta
 
Herramientas Desplegado
Antiguo 26-abr-2007, 03:56   #1 (permalink)
HHnn está en el buen camino
 
Fecha de Ingreso: octubre-2004
Mensajes: 103
Problemas con mod Linklist en phpBB

Hola,

Instale el mod Linklist en en phpBB que se encuentra en el siguiente link:
http://www.phpbbhacks.com/download/5498

Pero lo que hace es agregar una pagina extra donde se encuentran los links, pero yo quiero que los links se encuentren en una tabla a la izquierda de la tabla donde aparecen los contenidos del foro (como un menu vertical), entonces lo que hice fue copiar el contenido del .tpl que vino en el mod y pegarlo en los otros .tpl en el lugar donde quiero que aparezcan los links, pero no se ven, hay que modificar otro archivo??? algun .php, o .cfg del subsilver???

Espero respuesta.

Saludos y gracias
__________________
La seguridad es la infinita inseguridad de lo seguro.
HHnn está desconectado   Responder Citando
Antiguo 28-abr-2007, 08:17   #2 (permalink)
Zuker no se puede cailificar en este momento
 
Avatar de Zuker
 
Fecha de Ingreso: marzo-2007
Ubicación: Argentina
Mensajes: 35
Enviar un mensaje por MSN a Zuker
Re: Problemas con mod Linklist en phpBB

Siempre que modifiques un .tpl que tenga variables, si las queres llevar a otro tpl, vas a tener que hacer que las variables sean llamadas desde el php.

Salvo que este en el page_header.php y entonces esas sirven para todas las plantillas.
Zuker está desconectado   Responder Citando
Antiguo 03-may-2007, 04:41   #3 (permalink)
HHnn está en el buen camino
 
Fecha de Ingreso: octubre-2004
Mensajes: 103
Re: Problemas con mod Linklist en phpBB

Hola Zuker, gracias por responder,

No se como pasar las variables del php de este mod al php del foro. En este mod vienen algunos arhivos, entre ellos viene un php (links.php) que seria el que tiene las variables del tpl, ese php trae el siguiente codigo:
Cita:
<?php
//Benötigte Dateien und Variablen von phpBB
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$userdata = session_pagestart($user_ip, LINKS);
init_userprefs($userdata);
if (!isset($HTTP_GET_VARS['id']) && !isset($HTTP_GET_VARS['vote'])) {
$page_title = 'Links';
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
'body' => 'links_body.tpl'
)
);
$folder_weblink = $images['folder_weblink'];
$vote_link = $images['folder_weblink'];
$vote_weblink_up = $images['vote_weblink_up'];
$vote_weblink_down = $images['vote_weblink_down'];
$template->assign_block_vars('links', array(
'LINKS' => $lang['Links'],
'FOLDER_WEBLINK_IMG' => $folder_weblink,
'VOTE_WEBLINK_UP_IMG' => $vote_weblink_up,
'VOTE_WEBLINK_DOWN_IMG' => $vote_weblink_down,
'NAME_DESC' => $lang['Name_Desc'],
'VISITS' => $lang['Visits'],
'POINTS' => $lang['Points'],
));
$sql='SELECT * FROM ' . LINKS_TABLE . '';
if(!$result = $db->sql_query($sql)) {
message_die(GENERAL_ERROR, 'Could not obtain links', '', __LINE__, __FILE__, $sql);
}
while($row = $db->sql_fetchrow($result))
{
$template->assign_block_vars('links.linkrow', array(
'LINKNAME' => $row['name'],
'LINKDESCRIPTION' => $row['description'],
'LINKVISITS' => $row['visits'],
'LINKPOINTS' => $row['points'],
'SHOWLINK' => ''.$_SERVER['PHP_SELF'].'?id='.$row['id'].'',
'UPLINK' => ''.$_SERVER['PHP_SELF'].'?id='.$row['id'].'&amp;vote=up',
'DOWNLINK' => ''.$_SERVER['PHP_SELF'].'?id='.$row['id'].'&amp;vote=down',
));
}
$template->pparse('body');
//Footer - nur dann weglassen, wenn du auch den Header weglässt
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
}
elseif (isset($HTTP_GET_VARS['id']) && !isset($HTTP_GET_VARS['vote'])) {
$id = $HTTP_GET_VARS['id'];
$sql= 'SELECT visits,url FROM ' . LINKS_TABLE . ' WHERE id = '.$id.'';
if(!$result = $db->sql_query($sql)) {
message_die(GENERAL_ERROR, 'Could not obtain information for this link', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
$url = $row['url'];
$old_visits = $row['visits'];
$new_visits = $old_visits + 1;
$sql = 'UPDATE '. LINKS_TABLE .'
SET visits = '.$new_visits.'
WHERE id = '.$id.'';

if ( !$db->sql_query($sql, BEGIN_TRANSACTION) )
{
message_die(GENERAL_ERROR, 'Could not obtain link information', '', __LINE__, __FILE__, $sql);
}
else {
header('Location:'.$url.'');
}


}
elseif (isset($HTTP_GET_VARS['vote'])) {
$id = $HTTP_GET_VARS['id'];
$vote = $HTTP_GET_VARS['vote'];
$sql= 'SELECT points FROM ' . LINKS_TABLE . ' WHERE id = '.$id.'';
if(!$result = $db->sql_query($sql)) {
message_die(GENERAL_ERROR, 'Could not obtain information for this link', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
$points = $row['points'];
if ($vote == 'up') {
$new_points = $points + 1;
}
elseif ($vote == 'down') {
$new_points = $points - 1;
}
$sql = 'UPDATE '. LINKS_TABLE .'
SET points = '.$new_points.'
WHERE id = '.$id.'';

if ( !$db->sql_query($sql, BEGIN_TRANSACTION) )
{
message_die(GENERAL_ERROR, 'Could not obtain link information', '', __LINE__, __FILE__, $sql);
}
else {
header('Location:'.$_SERVER['PHP_SELF'].'');
}


}
?>
He intentado pegar ese codigo en el php correspondiente al foro (index.php), y luego el codigo del tpl de este mod tambien lo pegue en el tpl correspondiente al foro (index_body.tpl), pero no funciono.
Como puedo hacer para meter este codigo en el php del foro???

Espero respuesta.

Saludos y Gracias
__________________
La seguridad es la infinita inseguridad de lo seguro.
HHnn está desconectado   Responder Citando
Antiguo 03-may-2007, 22:27   #4 (permalink)
HHnn está en el buen camino
 
Fecha de Ingreso: octubre-2004
Mensajes: 103
Re: Problemas con mod Linklist en phpBB

Como puedo hacer???
Alguna ayuda
__________________
La seguridad es la infinita inseguridad de lo seguro.
HHnn está desconectado   Responder Citando
Respuesta
No hay votos aún.


Herramientas
Desplegado

Normas de Publicación
No puedes crear nuevos temas
No puedes responder temas
No puedes subir archivos adjuntos
No puedes editar tus mensajes

BB code is Activado
Caritas están Activado
[IMG] está Activado
Código HTML está Desactivado


La Zona horaria es GMT -6. Ahora son las 14:34.


Message Board Statistics

LinkBacks Enabled by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93