Página 2 de 2

NV recent topics en portal como...

Publicado: 16 Ene 2011, 21:25
por leviatan21
cvqs escribió:ok, añadiendo las lineas en functions.php y en portal.php me sale:

Código: Seleccionar todo

Fatal error: Cannot redeclare get_user_rank() (previously declared in /web/htdocs/www.foroqs.es/home/foro/portal/includes/functions.php:233) in /web/htdocs/www.foroqs.es/home/foro/includes/functions_display.php on line 1396
si tuviera el portal board ,no tendría estos problemas?
Comprime (como .zip o .rar)tus archivos raíz/portal.php y raíz/portal/includes/functions.php y adjuntalos en un próximo mensaje, hay algo que no haces bien

NV recent topics en portal como...

Publicado: 16 Ene 2011, 21:30
por cvqs
ok,te los doy limpios ?
quiero decir sin haber metido las modificaciones?
porque las quito porque sino me salta error.

por cierto veo que sino puedo pasar de: update_phpbb3portal_122_to_board3portal_106 ,y me meto el board sino¿

archivos:

NV recent topics en portal como...

Publicado: 16 Ene 2011, 21:47
por leviatan21
cvqs escribió:ok,te los doy limpios ?
quiero decir sin haber metido las modificaciones?
Tal cual los tienes ahora, con todos los cambios que te fui indicando

Re: NV recent topics en portal como...

Publicado: 16 Ene 2011, 21:53
por leviatan21
No veo el cambio en el archivo raíz/portal/includes/functions.php por eso te sigue saltando el error

Código: Seleccionar todo

 Fatal error: Cannot redeclare get_user_rank() (previously declared in /web/htdocs/www.foroqs.es/home/foro/portal/includes/functions.php:233) in /web/htdocs/www.foroqs.es/home/foro/includes/functions_display.php on line 1396

NV recent topics en portal como...

Publicado: 16 Ene 2011, 21:55
por cvqs
leviatan21 escribió:
cvqs escribió:ok,te los doy limpios ?
quiero decir sin haber metido las modificaciones?
Tal cual los tienes ahora, con todos los cambios que te fui indicando
Aqui tienes pues ya modificados:


leviatan21 escribió:No veo el cambio en el archivo raíz/portal/includes/functions.php por eso te sigue saltando el error

Código: Seleccionar todo

 Fatal error: Cannot redeclare get_user_rank() (previously declared in /web/htdocs/www.foroqs.es/home/foro/portal/includes/functions.php:233) in /web/htdocs/www.foroqs.es/home/foro/includes/functions_display.php on line 1396
No porque lo modifico y como veo que falla lo quito para que se pueda abrir el foro.

NV recent topics en portal como...

Publicado: 16 Ene 2011, 22:10
por leviatan21
Sobre los archivos que me enviaste realiza este cambio en el raíz/portal.php
Buscar :

Código: Seleccionar todo

include($portal_root_path . '/includes/functions.'.$phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
Reemplazar por :

Código: Seleccionar todo

include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
include($portal_root_path . '/includes/functions.'.$phpEx);
Ahora si lo que debería fallar es la función get_user_avatar() y no la get_user_rank()

Re: NV recent topics en portal como...

Publicado: 16 Ene 2011, 22:19
por cvqs
ahora si falla la user avatar :

Código: Seleccionar todo

Fatal error: Cannot redeclare get_user_avatar() (previously declared in /web/htdocs/www.foroqs.es/home/foro/includes/functions_display.php:1410) in /web/htdocs/www.foroqs.es/home/foro/portal/includes/functions.php on line 219

Re: NV recent topics en portal como...

Publicado: 16 Ene 2011, 22:31
por leviatan21
cvqs escribió:ahora si falla la user avatar :

Código: Seleccionar todo

Fatal error: Cannot redeclare get_user_avatar() (previously declared in /web/htdocs/www.foroqs.es/home/foro/includes/functions_display.php:1410) in /web/htdocs/www.foroqs.es/home/foro/portal/includes/functions.php on line 219
En ese caso, procedemos a hacer lo mismo que hicimos con el rango :

Abrir :
raíz/portal/includes/functions.php

Buscar :

Código: Seleccionar todo

/**
* Get user avatar  / barroved from RC4
*
* @param string $avatar Users assigned avatar name
* @param int $avatar_type Type of avatar
* @param string $avatar_width Width of users avatar
* @param string $avatar_height Height of users avatar
* @param string $alt Optional language string for alt tag within image, can be a language key or text
*
* @return string Avatar image
*/
function get_user_avatar($avatar, $avatar_type, $avatar_width, $avatar_height, $alt = 'USER_AVATAR')
{
    global $user, $config, $phpbb_root_path, $phpEx;

    if (empty($avatar) || !$avatar_type)
    {
        return '';
    }

    $avatar_img = '';

    switch ($avatar_type)
    {
        case AVATAR_UPLOAD:
            $avatar_img = $phpbb_root_path . "download/file.$phpEx?avatar=";
        break;

        case AVATAR_GALLERY:
            $avatar_img = $phpbb_root_path . $config['avatar_gallery_path'] . '/';
        break;
    }

    $avatar_img .= $avatar;
    return '<img src="' . $avatar_img . '" width="' . $avatar_width . '" height="' . $avatar_height . '" alt="' . ((!empty($user->lang[$alt])) ? $user->lang[$alt] : $alt) . '" />';
} 
Reemplazar, por :

Código: Seleccionar todo

if (!function_exists('get_user_avatar'))
{
/**
* Get user avatar  / barroved from RC4
*
* @param string $avatar Users assigned avatar name
* @param int $avatar_type Type of avatar
* @param string $avatar_width Width of users avatar
* @param string $avatar_height Height of users avatar
* @param string $alt Optional language string for alt tag within image, can be a language key or text
*
* @return string Avatar image
*/
function get_user_avatar($avatar, $avatar_type, $avatar_width, $avatar_height, $alt = 'USER_AVATAR')
{
    global $user, $config, $phpbb_root_path, $phpEx;

    if (empty($avatar) || !$avatar_type)
    {
        return '';
    }

    $avatar_img = '';

    switch ($avatar_type)
    {
        case AVATAR_UPLOAD:
            $avatar_img = $phpbb_root_path . "download/file.$phpEx?avatar=";
        break;

        case AVATAR_GALLERY:
            $avatar_img = $phpbb_root_path . $config['avatar_gallery_path'] . '/';
        break;
    }

    $avatar_img .= $avatar;
    return '<img src="' . $avatar_img . '" width="' . $avatar_width . '" height="' . $avatar_height . '" alt="' . ((!empty($user->lang[$alt])) ? $user->lang[$alt] : $alt) . '" />';
}
} 

NV recent topics en portal como...

Publicado: 16 Ene 2011, 22:52
por cvqs
Bueno por fin :mrgreen:

añadiendo:

Código: Seleccionar todo

include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
include($portal_root_path . '/includes/functions.'.$phpEx);

y:

Código: Seleccionar todo

if (!function_exists('get_user_avatar'))
{
/**
* Get user avatar  / barroved from RC4
*
* @param string $avatar Users assigned avatar name
* @param int $avatar_type Type of avatar
* @param string $avatar_width Width of users avatar
* @param string $avatar_height Height of users avatar
* @param string $alt Optional language string for alt tag within image, can be a language key or text
*
* @return string Avatar image
*/
function get_user_avatar($avatar, $avatar_type, $avatar_width, $avatar_height, $alt = 'USER_AVATAR')
{
	global $user, $config, $phpbb_root_path, $phpEx;

	if (empty($avatar) || !$avatar_type)
	{
		return '';
	}

	$avatar_img = '';

	switch ($avatar_type)
	{
		case AVATAR_UPLOAD:
			$avatar_img = $phpbb_root_path . "download/file.$phpEx?avatar=";
		break;

		case AVATAR_GALLERY:
			$avatar_img = $phpbb_root_path . $config['avatar_gallery_path'] . '/';
		break;
	}

	$avatar_img .= $avatar;
	return '<img src="' . $avatar_img . '" width="' . $avatar_width . '" height="' . $avatar_height . '" alt="' . ((!empty($user->lang[$alt])) ? $user->lang[$alt] : $alt) . '" />';
}
} 

Ya sale! ,gracias leviatan21 por tu ayuda!!!!
ahora voy a ver lo puedo modificar o poner en otro sitio en el portal ya que sale mini y digamos que no queda muy bien.

Re: NV recent topics en portal como...

Publicado: 16 Ene 2011, 23:04
por leviatan21
cvqs escribió:ahora voy a ver lo puedo modificar o poner en otro sitio en el portal ya que sale mini y digamos que no queda muy bien.
Ya te aclaro que por mas que lo pongas ancho, con tu estilo mas el del portal se seguirá viendo mal :cry:

Re: NV recent topics en portal como...

Publicado: 16 Ene 2011, 23:09
por cvqs
leviatan21 escribió:
cvqs escribió:ahora voy a ver lo puedo modificar o poner en otro sitio en el portal ya que sale mini y digamos que no queda muy bien.
Ya te aclaro que por mas que lo pongas ancho, con tu estilo mas el del portal se seguirá viendo mal :cry:

Si es verdad ,que primero la plantilla no se puede anchar ,lo he puesto un poco mas abajo y así se queda.

estoy mirando de poner el board portal ,actualizando el portal que tengo ,no se si despues se puede poner de diferente manera o sera similar a este?

ya que el portal php es un copia del board portal.
se supone que el board es mucho mejor y esta actualizado de diciembre del 2010.

Re: NV recent topics en portal como...  Tema Solucionado

Publicado: 16 Ene 2011, 23:40
por leviatan21
En la plantilla template/portal/portal_body.html

Busca :

Código: Seleccionar todo

ul.topiclist dt {
    float:left;
    width: 90%;
    font-size: 1em;
} 
Y donde dice width: 90%; reemplaza por width: 45%; después de actualizar la plantilla se debería ver mucho mejor

Re: NV recent topics en portal como...

Publicado: 16 Ene 2011, 23:46
por cvqs
leviatan21 escribió:En la plantilla template/portal/portal_body.html

Busca :

Código: Seleccionar todo

ul.topiclist dt {
    float:left;
    width: 90%;
    font-size: 1em;
} 
Y donde dice width: 90%; reemplaza por width: 45%; después de actualizar la plantilla se debería ver mucho mejor

Hombre esto es otra cosa!!!!!!! :mrgreen:

ahora si queda bien ,esto no me lo decías he :wink:

gracias!