phpBB Italia chiude!
phpBB Italia ringrazia tutti gli utenti che hanno dato fiducia al nostro progetto per ben 9 anni, e che, grazie al grande lavoro fatto da tutto lo Staff (rigorosamente a titolo gratuito), hanno portato il portale a diventare il principale punto di riferimento italiano alla piattaforma phpBB.

Purtroppo, causa motivi personali, non ho più modo di gestirlo e portarlo avanti. Il forum viene ora posto in uno stato di sola lettura, nonché un archivio storico per permettere a chiunque di fruire di tutte le discussioni trattate.

Il nuovo portale di assistenza per l'Italia di phpBB diventa phpBB-Store.it, cui ringrazio per aver deciso di portare avanti questo grande progetto.

Grazie ancora,
Carlo - Amministratore di phpBB Italia

Welcome MOD

Supporto MODs generale.
Avatar utente
Haku
Utente
Utente
Messaggi: 2529
Iscritto il: 22/09/2009, 22:36
Sesso: Maschio
Versione: 3.0.9
Server: UNIX/Linux
Contatta:

Re: Welcome MOD

Messaggio da Haku » 23/08/2011, 0:22

il $my_avatar, era nel vecchio codice di autoresize, prima che postassi il tuo:

Codice: Seleziona tutto

$my_avatar = $user->data['user_avatar'];
    $my_avatar_type = $user->data['user_avatar_type'];
    $my_avatar_width = $user->data['user_avatar_width'];
    $my_avatar_height = $user->data['user_avatar_height'];

    if ($my_avatar_width > 100 || $my_avatar_height > 100)
    {
       if ($my_avatar_width > $my_avatar_height)
       {
          $my_avatar_height = ($my_avatar_height * 100) / $my_avatar_width;
          $my_avatar_width = 100;
       }
       elseif ($my_avatar_height > $my_avatar_width)
       {
          $my_avatar_width = ($my_avatar_width * 100) / $my_avatar_height;
          $my_avatar_height = 100;
       }
    }
    // funzione autoriduzione avatar
La variabile Avatar_COR; c'è, ed è nel file includes/function.php:

Codice: Seleziona tutto

// The following assigns all _common_ variables that may be used at any point in a template.
	$template->assign_vars(array(
	    'AVATAR_COR'                    => $user->data['user_avatar'],
	    'CHAT_USERS_ONLINE'             => chat_users_online(), 
		'SITENAME'						=> $config['sitename'],
		'SITE_DESCRIPTION'				=> $config['site_desc'],
		'PAGE_TITLE'					=> $page_title,
		'SCRIPT_NAME'					=> str_replace('.' . $phpEx, '', $user->page['page_name']),
		'LAST_VISIT_DATE'				=> sprintf($user->lang['YOU_LAST_VISIT'], $s_last_visit),
		'LAST_VISIT_YOU'				=> $s_last_visit,
		'CURRENT_TIME'					=> sprintf($user->lang['CURRENT_TIME'], $user->format_date(time(), false, true)),
		'TOTAL_USERS_ONLINE'			=> $l_online_users,
		'LOGGED_IN_USER_LIST'			=> $online_userlist,
		'RECORD_USERS'					=> $l_online_record,
		'PRIVATE_MESSAGE_INFO'			=> $l_privmsgs_text,
		'PRIVATE_MESSAGE_INFO_UNREAD'	=> $l_privmsgs_text_unread,
Ora, cosa dovrei fare precisamente?

Avatar utente
Micogian
Leader Programmatori
Leader Programmatori
Messaggi: 3704
Iscritto il: 07/01/2010, 8:51
Versione: 3.2.0
Server: UNIX/Linux
PHP: 5.4.36
Database: MySQL 5.1.70-log
Località: Udine
Contatta:

Re: Welcome MOD

Messaggio da Micogian » 23/08/2011, 7:35

Pensavo di averlo spiegato. due cose semplicissime.
Devi ripristinare la variabile USER_AVATAR che utilizza $user_data['user_avatar_width']e non NEW_USER_AVATAR che utilizza $my_avatar_width, il vecchio resize non serve.

Codice: Seleziona tutto

'USER_AVATAR'               => get_user_avatar($user->data['user_avatar'], $user->data['user_avatar_type'], $user->data['user_avatar_width'], $user->data['user_avatar_height']),
Come puoi vedere i valori immessi nella function get_user_avatar sono quelli relativi a $user->data['user_avatar_width'] e $user->data['user_avatar_height'] e per avere l'avatar ridimensionato bisogna modificare questi valori prima della creazione della variabile, con il codice che ti ho detto:

Codice: Seleziona tutto

   // Ridimensiona Avatar se superiore di 140 px
   if ($user->data['user_avatar_width'] > 140 )
   {
   $user->data[user_avatar_height'] = ($user->data['user_avatar_height'] * 140 /  $user->data['user_avatar_width']);
   $user->data['user_avatar_width'] = 140 ;   
   }
   // fine ridimensiona Avatar
Tutto qua, il template va bene così, salvo usare la variabile USER_AVATAR e non NEW_USER_AVATAR.

Codice: Seleziona tutto

<!-- IF AVATAR_COR == '' --><img src="{T_THEME_PATH}/images/Guest.gif" alt="" /><!-- ELSE -->{USER_AVATAR}<!-- ENDIF -->
Il risultato sarà che se la variabile AVATAR_COR è vuota verrà visualizzato l'avatar "Guest.gif", altrimenti quello risultante da USER_AVATAR, ridimensionato se supera 140 pixel di larghezza.
Tutto il resto non serve.

Avatar utente
Haku
Utente
Utente
Messaggi: 2529
Iscritto il: 22/09/2009, 22:36
Sesso: Maschio
Versione: 3.0.9
Server: UNIX/Linux
Contatta:

Re: Welcome MOD

Messaggio da Haku » 23/08/2011, 17:59

Quindi:

Codice: Seleziona tutto

    // Ridimensiona Avatar se superiore di 140 px
       if ($user->data['user_avatar_width'] > 140 )
       {
       $user->data[user_avatar_height'] = ($user->data['user_avatar_height'] * 140 /  $user->data['user_avatar_width']);
       $user->data['user_avatar_width'] = 140 ;   
       }
       // fine ridimensiona Avatar
'USER_AVATAR'               => get_user_avatar($user->data['user_avatar'], $user->data['user_avatar_type'], $user->data['user_avatar_width'], $user->data['user_avatar_height']),
Proprio sopra la variabile?

Avatar utente
Micogian
Leader Programmatori
Leader Programmatori
Messaggi: 3704
Iscritto il: 07/01/2010, 8:51
Versione: 3.2.0
Server: UNIX/Linux
PHP: 5.4.36
Database: MySQL 5.1.70-log
Località: Udine
Contatta:

Re: Welcome MOD

Messaggio da Micogian » 23/08/2011, 19:00

No, non puoi mettere del codice php all'interno della funzione che crea l'array di variabili, lo devi fare al di fuori, prima delle righe

Codice: Seleziona tutto

// Assign index specific vars
$template->assign_vars(array(
In sostanza, prima modifichi i valori width e height e poi crei le variabili, mi sembrava ovvio, l'ho detto in tutte le salse che le due cose sono separate.

La function get_user_avatar che crea la variabile USER_AVATAR prenderà in considerazione i valori modificati e l'avatar verrà ridimensionato.

Avatar utente
Haku
Utente
Utente
Messaggi: 2529
Iscritto il: 22/09/2009, 22:36
Sesso: Maschio
Versione: 3.0.9
Server: UNIX/Linux
Contatta:

Re: Welcome MOD

Messaggio da Haku » 23/08/2011, 19:45

NO ma infatti non voglio farti ripetere le cose cento volte xD
Ho capito che bisogna fare in questo modo, infatti:

Codice: Seleziona tutto

<?php
/**
*
* @package phpBB3
* @version $Id: index.php 9614 2009-06-18 11:04:54Z nickvergessen $
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
*/

/**
* @ignore
*/
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup('viewforum');

display_forums('', $config['load_moderators']);

// Set some stats, get posts count from forums data if we... hum... retrieve all forums data
$total_posts	= $config['num_posts'];
$total_topics	= $config['num_topics'];
$total_users	= $config['num_users'];

$l_total_user_s = ($total_users == 0) ? 'TOTAL_USERS_ZERO' : 'TOTAL_USERS_OTHER';
$l_total_post_s = ($total_posts == 0) ? 'TOTAL_POSTS_ZERO' : 'TOTAL_POSTS_OTHER';
$l_total_topic_s = ($total_topics == 0) ? 'TOTAL_TOPICS_ZERO' : 'TOTAL_TOPICS_OTHER';

// Grab group details for legend display
if ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
{
	$sql = 'SELECT group_id, group_name, group_colour, group_type
		FROM ' . GROUPS_TABLE . '
		WHERE group_legend = 1
		ORDER BY group_name ASC';
}
else
{
	$sql = 'SELECT g.group_id, g.group_name, g.group_colour, g.group_type
		FROM ' . GROUPS_TABLE . ' g
		LEFT JOIN ' . USER_GROUP_TABLE . ' ug
			ON (
				g.group_id = ug.group_id
				AND ug.user_id = ' . $user->data['user_id'] . '
				AND ug.user_pending = 0
			)
		WHERE g.group_legend = 1
			AND (g.group_type <> ' . GROUP_HIDDEN . ' OR ug.user_id = ' . $user->data['user_id'] . ')
		ORDER BY g.group_name ASC';
}
$result = $db->sql_query($sql);

$legend = array();
while ($row = $db->sql_fetchrow($result))
{
	$colour_text = ($row['group_colour']) ? ' style="color:#' . $row['group_colour'] . '"' : '';
	$group_name = ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'];

	if ($row['group_name'] == 'BOTS' || ($user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile')))
	{
		$legend[] = '<span' . $colour_text . '>' . $group_name . '</span>';
	}
	else
	{
			// www.phpBB-SEO.com SEO TOOLKIT BEGIN
		$phpbb_seo->prepare_url('group', $row['group_name'], $row['group_id']);
		// www.phpBB-SEO.com SEO TOOLKIT END
		$legend[] = '<a' . $colour_text . ' href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $row['group_id']) . '">' . $group_name . '</a>';
	}
}
$db->sql_freeresult($result);

$legend = implode(', ', $legend);

// Generate birthday list if required ...
$birthday_list = '';
if ($config['load_birthdays'] && $config['allow_birthdays'])
{
	$now = getdate(time() + $user->timezone + $user->dst - date('Z'));
	$sql = 'SELECT u.user_id, u.username, u.user_colour, u.user_birthday
		FROM ' . USERS_TABLE . ' u
		LEFT JOIN ' . BANLIST_TABLE . " b ON (u.user_id = b.ban_userid)
		WHERE (b.ban_id IS NULL
			OR b.ban_exclude = 1)
			AND u.user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', $now['mday'], $now['mon'])) . "%'
			AND u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')';
	$result = $db->sql_query($sql);

	while ($row = $db->sql_fetchrow($result))
	{
		$birthday_list .= (($birthday_list != '') ? ', ' : '') . get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']);

		if ($age = (int) substr($row['user_birthday'], -4))
		{
			$birthday_list .= ' (' . ($now['year'] - $age) . ')';
		}
	}
	$db->sql_freeresult($result);
}

    // BEGIN Welcome Mod
    //--Welcome_Mod--get the hour number-->
    $date = $user->format_date(time(), 'H');

    if ($user->data['is_registered'])
    {
        $u_user_name = get_username_string('full', $user->data['user_id'], $user->data['username'], $user->data['user_colour']);
    }
    else
    {
        $u_user_name = $user->lang['WELCOME_GUEST'];
    }   

    switch (true)
    {
            case ($date < 1):
                // if the hour is 6pm-11pm (18-23)
                $s_welcome = sprintf($user->lang['GOOD_NIGHT'], $u_user_name);;
            break;
          
          case ($date < 4):
                // if the hour is 1-3 am
                $s_welcome = sprintf($user->lang['UP_LATE'], $u_user_name);
            break;
           
            case ($date < 8):
                // if the hour is 4-7 am
                $s_welcome = sprintf($user->lang['UP_EARLY'], $u_user_name);
            break;
           
            case ($date < 12):
                // if the hour is 8-11 am
                $s_welcome = sprintf($user->lang['GOOD_MORNING'], $u_user_name);
            break;
           
            case ($date < 18):
                // if the hour is 12-5pm (12-17)
                $s_welcome = sprintf($user->lang['GOOD_AFTERNOON'], $u_user_name);
            break;
           
            case ($date < 24):
                // if the hour is 6pm-11pm (18-23_
                $s_welcome = sprintf($user->lang['GOOD_EVENING'], $u_user_name);;
            break;
    } 

    // how long a member for
    $member_for = '';
    if ($user->data['is_registered'] && !$user->data['is_bot'])
    {
        $member_length = time() - $user->data['user_regdate'];
        $years = $months = $days = 0;
        $member_for = '';
        if ($member_length)
        {   
            if ($member_length >= 31536000)
            {
                $years = floor($member_length / 31536000);
                $member_length = $member_length - ($years * 31536000);
                $member_for .= $years > 1 ? ($years . '&nbsp;' . $user->lang['WELCOME_YEARS'] . ', ') : ($years . '&nbsp;' . $user->lang['WELCOME_YEAR'] . ', ');
            }
            $months = floor($member_length / 2628000);
            if ($months)
            {
                $months = $months > 1 ? ($months . '&nbsp;' . $user->lang['WELCOME_MONTHS'] . ', ') : ($months . '&nbsp;' . $user->lang['WELCOME_MONTHS'] . ', ');
                $member_length = $member_length - ($months * 2628000);
                $member_for .= $months;
            }
            $days = floor($member_length / 86400);
            if ($days)
            {
                $days = $days > 1 ? ($days . '&nbsp;' . $user->lang['WELCOME_DAYS']) : ($days . '&nbsp;' . $user->lang['WELCOME_DAY']);
                $member_for .= $days;
            }       
        }
    }
       
    // funzione autoriduzione avatar
    if ($user->data['user_avatar_width'] > 140 )
   {
   $user->data['user_avatar_height'] = ($user->data['user_avatar_height'] * 140 /  $user->data['user_avatar_width']);
   $user->data['user_avatar_width'] = 140 ;   
   }
    // funzione autoriduzione avatar

    //END Welcome Mod
	if (class_exists('phpbb_gallery_integration'))
{
	phpbb_gallery_integration::index_total_images();
}

// Assign index specific vars
$template->assign_vars(array(
	'TOTAL_POSTS'	=> sprintf($user->lang[$l_total_post_s], $total_posts),
	'TOTAL_TOPICS'	=> sprintf($user->lang[$l_total_topic_s], $total_topics),
	'TOTAL_USERS'	=> sprintf($user->lang[$l_total_user_s], $total_users),
	'NEWEST_USER'	=> sprintf($user->lang['NEWEST_USER'], get_username_string('full', $config['newest_user_id'], $config['newest_username'], $config['newest_user_colour'])),

	    // BEGIN Welcome Mod   
        'S_WELCOME'                   => $s_welcome,
        'S_JOINED_DATE'               => $user->lang['JOINED'] . ':&nbsp;' . $user->format_date($user->data['user_regdate']),
        'USER_AVATAR'               => get_user_avatar($user->data['user_avatar'], $user->data['user_avatar_type'], $user->data['user_avatar_width'], $user->data['user_avatar_height']),
        //'NEW_USER_AVATAR'             => get_user_avatar($my_avatar, $my_avatar_type, $my_avatar_width, $my_avatar_height),
        'MEMBER_FOR'                  => (!empty($member_for)) ? $user->lang['MEMBER_FOR'] . '&nbsp;' . $member_for : '',
       // END Welcome Mod 
	'LEGEND'		=> $legend,
	'BIRTHDAY_LIST'	=> $birthday_list,

	'FORUM_IMG'				=> $user->img('forum_read', 'NO_UNREAD_POSTS'),
	'FORUM_UNREAD_IMG'			=> $user->img('forum_unread', 'UNREAD_POSTS'),
	'FORUM_LOCKED_IMG'		=> $user->img('forum_read_locked', 'NO_UNREAD_POSTS_LOCKED'),
	'FORUM_UNREAD_LOCKED_IMG'	=> $user->img('forum_unread_locked', 'UNREAD_POSTS_LOCKED'),

	'S_LOGIN_ACTION'			=> append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'),
	'S_DISPLAY_BIRTHDAY_LIST'	=> ($config['load_birthdays']) ? true : false,

	'U_MARK_FORUMS'		=> ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}index.$phpEx", 'hash=' . generate_link_hash('global') . '&mark=forums') : '',
	'U_MCP'				=> ($auth->acl_get('m_') || $auth->acl_getf_global('m_')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=front', true, $user->session_id) : '')
);

include($phpbb_root_path . 'includes/functions_activity_stats.' . $phpEx);
activity_mod();

// Start DM Video
if ( isset($config['dm_video_version']) )
{
	$user->setup('mods/dm_video');

	$sql = 'SELECT COUNT(video_id) AS number_videos
	    FROM ' . DM_VIDEO_TABLE . '
	    WHERE video_approval = 1';
	$result = $db->sql_query($sql);
	$row = $db->sql_fetchrow($result);

	$sql2 = 'SELECT *
		FROM ' . DM_VIDEO_TABLE . '
		WHERE video_approval = 1
		ORDER BY video_counter DESC LIMIT 5';
	$result2 = $db->sql_query($sql2);

	while ( $row2 = $db->sql_fetchrow($result2) )
	{	
		$template->assign_block_vars('videoline', array(
			'VIDEO_COUNTER' => sprintf($user->lang['DMV_VIDEO_COUNTER'], $row2['video_counter']),
			'TITEL'			=> $row2['video_title'],
		));  
	}
	$db->sql_freeresult($result);

	$template->assign_vars(array(
		'S_VIDEO_EXIST'	=> true,
		'NUMBER_VIDEOS'	=> sprintf($user->lang['DMV_TOTAL_VIDEOS'], $row['number_videos']),
	));
}
// End DM Video

include($phpbb_root_path . 'mod_topten_topics.' . $phpEx); 
// Output page
// www.phpBB-SEO.com SEO TOOLKIT BEGIN - META
$seo_meta->collect('description', $config['sitename'] . ' : ' .  $config['site_desc']);
$seo_meta->collect('keywords', $config['sitename'] . ' ' . $seo_meta->meta['description']);
// www.phpBB-SEO.com SEO TOOLKIT END - META


// www.phpBB-SEO.com SEO TOOLKIT BEGIN - TITLE
page_header($config['sitename']);
// www.phpBB-SEO.com SEO TOOLKIT END - TITLE

$template->set_filenames(array(
	'body' => 'index_body.html')
);

page_footer();

?>
Però, se inserisco un'avatar di 150x150, sborda lo stesso çç

Avatar utente
Micogian
Leader Programmatori
Leader Programmatori
Messaggi: 3704
Iscritto il: 07/01/2010, 8:51
Versione: 3.2.0
Server: UNIX/Linux
PHP: 5.4.36
Database: MySQL 5.1.70-log
Località: Udine
Contatta:

Re: Welcome MOD

Messaggio da Micogian » 23/08/2011, 20:50

Aggiornato il template ?
A me sembra tutto giusto, a meno che non sia corretto il valore $user->data['user_avatar_width'],
Prova a fare così:

Codice: Seleziona tutto

    // funzione autoriduzione avatar
    if ($user->data['user_avatar_width'] > 140 )
   {
   $new_user_avatar_height = ($user->data['user_avatar_height'] * 140 /  $user->data['user_avatar_width']);
   $new_user_avatar_width = '140' ;   
   }
    // funzione autoriduzione avatar
La variabile diventa:

Codice: Seleziona tutto

'USER_AVATAR'               => get_user_avatar($user->data['user_avatar'], $user->data['user_avatar_type'], $new_user_avatar_width, $new_user_avatar_height),
Aggiorna il template e vedi se funzia.

Avatar utente
Haku
Utente
Utente
Messaggi: 2529
Iscritto il: 22/09/2009, 22:36
Sesso: Maschio
Versione: 3.0.9
Server: UNIX/Linux
Contatta:

Re: Welcome MOD

Messaggio da Haku » 23/08/2011, 21:05

Provato e svuotato cache...ma nulla...mi sembra strana la cosa :/
Non è che dipende dalla grandezza della tabella?

Avatar utente
Micogian
Leader Programmatori
Leader Programmatori
Messaggi: 3704
Iscritto il: 07/01/2010, 8:51
Versione: 3.2.0
Server: UNIX/Linux
PHP: 5.4.36
Database: MySQL 5.1.70-log
Località: Udine
Contatta:

Re: Welcome MOD

Messaggio da Micogian » 23/08/2011, 21:23

Prova a fare la riduzione degli avatar nei Topics.
Devi fare le modifiche seguenti:
1) Ridimensionare nei Topics gli Avatar superiori a 140 pixel.
Aprire il file viewtopic.php

Trova la parte di codice:

Codice: Seleziona tutto

// Posts are stored in the $rowset array while $attach_list, $user_cache
// and the global bbcode_bitfield are built
while ($row = $db->sql_fetchrow($result))
{
Aggiungere la seguente parte di codice:

Codice: Seleziona tutto

	// Ridimensiona Avatar se superiore di 140 px
	if ($row['user_avatar_width'] > 140 )
	{
	$row['user_avatar_height'] = ($row['user_avatar_height'] * '140' /  $row['user_avatar_width']);
	$row['user_avatar_width'] = 140 ;   
	}
	// fine ridimensiona Avatar
Puoi anche farlo nei messaggi Privati che di solito hanno uno spazio minore per il profilo.

2) Ridimensionare nei Messaggi Privati gli Avatar superiori a 100 pixel.
Aprire il file includes/ucp/ucp_pm_viewmessage.php

Trova la parte di codice:

Codice: Seleziona tutto

	if (!function_exists('get_user_avatar'))
	{
		include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
	}
Aggiungi la seguente parte che fissa in 100pixel la larghezza dell'Avatar:

Codice: Seleziona tutto

	// Ridimensiona avatar MP
	if ($user_row['user_avatar_width'] > 100 )
	{
	$user_row['user_avatar_height'] = ($user_row['user_avatar_height'] * '100' /  $user_row['user_avatar_width']);
	$user_row['user_avatar_width'] = 100 ;	
	}
	// fine ridimensiona avatar MP
Nei Messaggi Privati, se l'Avatar supera la larghezza di 100 pixel viene ridimensionato.

Queste modifiche le ho fatte nei miei Forum e funzionano. Se clicchi con il tasto destro sull'avatar ridotto e richiami "Informazioni sull'immagine" dovresti avere la dimensione 150x150 (ridotto a 140x140)
Se funziona per gli avatar di viewtopic e MP non vedo perchè non funzioni nell'index-
A meno che non ci sia bisogno di inserire qualche function negli include iniziali. Vedi gli include di viewtopic e prova a inserirli in index.php.
Potrebbe darsi che manchi la function get_user_avatar, visto che nell'index non servirebbe.

Non avendo installato la Welcome Mod devo solo andare per intuito. Il problema può essere proprio la function get_user_avatar

Avatar utente
Haku
Utente
Utente
Messaggi: 2529
Iscritto il: 22/09/2009, 22:36
Sesso: Maschio
Versione: 3.0.9
Server: UNIX/Linux
Contatta:

Re: Welcome MOD

Messaggio da Haku » 23/08/2011, 21:43

Per il function get etc,cosa devo copiare esattamente nel file index? La funzione di xir praticamente mi permetteva di non sfasare le immagini ma se autoridimensionate mantenevano una uniformita dell immagine..potrei provare a fare le modifiche da te indicate qui sopra ma al momento non mi servobi :-) quindi preferirei lavorare sollo alla welcone xD grazie per il tempo che ci state dedicando..

EDIT:
Vedo che tu però per queste due modifiche usi il row etc...e non $user->data.
Può essere questo?

Avatar utente
Micogian
Leader Programmatori
Leader Programmatori
Messaggi: 3704
Iscritto il: 07/01/2010, 8:51
Versione: 3.2.0
Server: UNIX/Linux
PHP: 5.4.36
Database: MySQL 5.1.70-log
Località: Udine
Contatta:

Re: Welcome MOD

Messaggio da Micogian » 23/08/2011, 23:13

Dipende in quale file stai operando.
In viewtopic.php il $row è il risultato di una query che interroga la tabella users.
In index.php questa query non c'è ma i dati sono ricavati da $user->data['nome_del_campo''].
Nel file index.php le function ci sono, sono rappresentate dai due include

Codice: Seleziona tutto

include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
La prova che ti dicevo di fare era per capire se in viewforum l'avatar viene ridimensionato.
Trovo strano che non funzioni nell'index. Potrebbe essere causato da qualche altra impostazione che esclude le modifiche, ma l'ultima modifica che ti avevo detto di fare cambiava la dimensione dell'avatar, sempre che la variabile USER_AVATAR usata nel template sia quella giusta.

E' difficile capire perchè non funzioni senza fare delle prove e la Mod Welcome non ho nessuna intenzione di installarla.

Rispondi

Torna a “Supporto MODs”

Chi c’è in linea

Visitano il forum: Nessuno e 112 ospiti