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

Problema SimplePortal

Supporto MODs generale.
Avatar utente
lenders
phpBB Expert
phpBB Expert
Messaggi: 713
Iscritto il: 22/06/2010, 14:28
Sesso: Maschio
Versione: 3.0.10
Server: UNIX/Linux
Database: MySQL(i) 5.1.49-community-log
Località: Napoli
Contatta:

Problema SimplePortal

Messaggio da lenders » 18/09/2010, 12:57

Una volta eseguito tutte le modifiche e inseriti i file nella root del forum mi da questo errore,sopra al logo del forum:

Codice: Seleziona tutto

phpBB Debug] PHP Notice: in file /portal.php on line 44: Division by zero
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4290: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4292: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4293: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4294: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3493)
Dove sbaglio?

ldm
Utente
Utente
Messaggi: 350
Iscritto il: 09/09/2009, 13:53
Versione: 3.0.7-PL1
Server: UNIX/Linux
Contatta:

Re: Problema SimplePortal

Messaggio da ldm » 18/09/2010, 13:34

Ciao , allegami il file includes/functions.php , il file portal.php ed il link dove hai scaricato la mod che stai tentando di installare.

p.s. Ovviamente presumo che hai già lanciato l'installer dal percorso relativo tuodomino/install_portal.php e pulito la cache?

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: Problema SimplePortal

Messaggio da Micogian » 18/09/2010, 13:49

Controlla che nel file portal.php non ci sia qualche spazio o tab prima del tag <?php

Avatar utente
lenders
phpBB Expert
phpBB Expert
Messaggi: 713
Iscritto il: 22/06/2010, 14:28
Sesso: Maschio
Versione: 3.0.10
Server: UNIX/Linux
Database: MySQL(i) 5.1.49-community-log
Località: Napoli
Contatta:

Re: Problema SimplePortal

Messaggio da lenders » 18/09/2010, 13:55

La mod in questione è questa http://www.phpbb3bbcodes.com/done/?f=8& ... mpleportal però il forum di Stoker ha smesso di dare supporto.E la mod è andata persa.Però poi lo recuperata qui http://www.phpbb.it/forum/viewtopic.php?f=73&t=23360 completa di traduzione.

X Idm: Il simpleportal non necessita di nessuna installazione. ;-)
X bingo: credo sia tutto ok,nel file portal.php questo è l'inizio del codice:

Codice: Seleziona tutto

<?php
/** 
*
* @package phpBB3
* @version $Id: portal.php,v 1.0 2009/07/04 15:49:44 stoker Exp $
* @copyright (c) 2005 phpBB Group 
* @license http://opensource.org/licenses/gpl-license.php GNU Public License 
*

Avatar utente
Carlo
Amministratore
Amministratore
Messaggi: 9957
Iscritto il: 19/04/2009, 10:24
Sesso: Maschio
Versione: 3.2.0
Server: UNIX/Linux
PHP: 7.1.0
Database: MySQL(i) 10.0.27-MariaDB-cll-lve
Località: Puglia
Contatta:

Re: Problema SimplePortal

Messaggio da Carlo » 18/09/2010, 14:01

@bingo: Hai visto la prima riga dell'errore? Alla riga 44 del file portal.php dovrebbe esserci qualche divisione aritmetica, ma una delle variabili ha come suo valore 0, oppure non è impostata o vuota.

@lenders: Allegami l'intero file portal.php.
MODs | Stili | Traduzioni MOD
Ogni MP contenente una richiesta di supporto verrà ignorato.

Avatar utente
lenders
phpBB Expert
phpBB Expert
Messaggi: 713
Iscritto il: 22/06/2010, 14:28
Sesso: Maschio
Versione: 3.0.10
Server: UNIX/Linux
Database: MySQL(i) 5.1.49-community-log
Località: Napoli
Contatta:

Re: Problema SimplePortal

Messaggio da lenders » 18/09/2010, 14:04

E' tutto tuo :D

Codice: Seleziona tutto

<?php
/** 
*
* @package phpBB3
* @version $Id: portal.php,v 1.0 2009/07/04 15:49:44 stoker Exp $
* @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);

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

// Lets build a page ...
// 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_files	= $config['num_files'];
$total_users	= $config['num_users'];
$start_date  	= date("d M Y, H:i:s", $config['board_startdate'] );
$boarddays = ceil((time() - $config['board_startdate']) / 86400);

$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_file_s = ($total_files == 0) ? 'TOTAL_FILES_ZERO' : 'TOTAL_FILES_OTHER';
$l_total_topic_s = ($total_topics == 0) ? 'TOTAL_TOPICS_ZERO' : 'TOTAL_TOPICS_OTHER';

$posts_per_day = $total_posts / $boarddays;
$l_posts_per_day_s = ($posts_per_day == 0) ? 'POSTS_PER_DAY_ZERO' : 'POSTS_PER_DAY_OTHER';
$posts_per_year = $posts_per_day * 365;
$l_posts_per_year_s = ($posts_per_year == 0) ? 'POSTS_PER_YEAR_ZERO' : 'POSTS_PER_YEAR_OTHER';
$posts_per_user = $total_posts / $total_users;
$l_posts_per_user_s = ($posts_per_user == 0) ? 'POSTS_PER_USER_ZERO' : 'POSTS_PER_USER_OTHER';
$posts_per_topic = $total_posts / $total_topics;
$l_posts_per_topic_s = ($posts_per_topic == 0) ? 'POSTS_PER_TOPIC_ZERO' : 'POSTS_PER_TOPIC_OTHER';
$topics_per_day = $total_topics / $boarddays;
$l_topics_per_day_s = ($topics_per_day == 0) ? 'TOPICS_PER_DAY_ZERO' : 'TOPICS_PER_DAY_OTHER';
$topics_per_year = $topics_per_day * 365;
$l_topics_per_year_s = ($topics_per_year == 0) ? 'TOPICS_PER_YEAR_ZERO' : 'TOPICS_PER_YEAR_OTHER';
$topics_per_user = $total_topics / $total_users;
$l_topics_per_user_s = ($topics_per_user == 0) ? 'TOPICS_PER_USER_ZERO' : 'TOPICS_PER_USER_OTHER';
$files_per_day = $total_files / $boarddays;
$l_files_per_day_s = ($files_per_day == 0) ? 'FILES_PER_DAY_ZERO' : 'FILES_PER_DAY_OTHER';
$files_per_year = $files_per_day * 365;
$l_files_per_year_s = ($files_per_year == 0) ? 'FILES_PER_YEAR_ZERO' : 'FILES_PER_YEAR_OTHER';
$files_per_user = $total_files / $total_users;
$l_files_per_user_s = ($files_per_day == 0) ? 'FILES_PER_USER_ZERO' : 'FILES_PER_USER_OTHER';
$users_per_day = $total_users / $boarddays;
$l_users_per_day_s = ($users_per_day == 0) ? 'USERS_PER_DAY_ZERO' : 'USERS_PER_DAY_OTHER';
$users_per_year = $users_per_day * 365;
$l_users_per_year_s = ($users_per_year == 0) ? 'USERS_PER_YEAR_ZERO' : 'USERS_PER_YEAR_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
	{
		$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('<br />', $legend);

// Get the avatar
if (!function_exists('get_user_avatar'))
    {    
        include_once($phpbb_root_path . 'includes/functions_display.' . $phpEx);
    }

//-- mod: top five ---------------------------------------------------------//
	include($phpbb_root_path . 'includes/portal/top_five.' . $phpEx);
//-- end: top five ---------------------------------------------------------//

// BEGIN Welcome Mod
$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 < 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;
}    
//END Welcome Mod

// Assign index specific vars
$template->assign_vars(array(
    'TOTAL_POSTS'		=> sprintf($user->lang[$l_total_post_s], number_format($total_posts, 0, ',', '.')),
	'POSTS_PER_DAY'		=> str_replace('.', ',', sprintf($user->lang[$l_posts_per_day_s], $posts_per_day)),
	'POSTS_PER_YEAR'	=> sprintf($user->lang[$l_posts_per_year_s], number_format($posts_per_year, 0, ',', '.')),
	'POSTS_PER_TOPIC'	=> str_replace('.', ',', sprintf($user->lang[$l_posts_per_topic_s], $posts_per_topic)),
	'POSTS_PER_USER'	=> str_replace('.', ',', sprintf($user->lang[$l_posts_per_user_s], $posts_per_user)),
	'TOTAL_TOPICS'		=> sprintf($user->lang[$l_total_topic_s], number_format($total_topics, 0, ',', '.')),
	'TOPICS_PER_DAY'	=> str_replace('.', ',', sprintf($user->lang[$l_topics_per_day_s], $topics_per_day)),
	'TOPICS_PER_YEAR'	=> sprintf($user->lang[$l_topics_per_year_s], number_format($topics_per_year, 0, ',', '.')),
	'TOPICS_PER_USER'	=> str_replace('.', ',', sprintf($user->lang[$l_topics_per_user_s], $topics_per_user)),
	'TOTAL_FILES'		=> sprintf($user->lang[$l_total_file_s], number_format($total_files, 0, ',', '.')),
	'FILES_PER_DAY'		=> str_replace('.', ',', sprintf($user->lang[$l_files_per_day_s], $files_per_day)),
	'FILES_PER_YEAR'	=> sprintf($user->lang[$l_files_per_year_s], number_format($files_per_year, 0, ',', '.')),
	'FILES_PER_USER'	=> str_replace('.', ',', sprintf($user->lang[$l_files_per_user_s], $files_per_user)),
	'TOTAL_USERS'		=> sprintf($user->lang[$l_total_user_s], number_format($total_users, 0, ',', '.')),
	'USERS_PER_DAY'		=> str_replace('.', ',', sprintf($user->lang[$l_users_per_day_s], $users_per_day)),
	'USERS_PER_YEAR'	=> sprintf($user->lang[$l_users_per_year_s], number_format($users_per_year, 0, ',', '.')),
	'NEWEST_USER'		=> sprintf($user->lang['NEWEST_USER'], get_username_string('full', $config['newest_user_id'], $config['newest_username'], $config['newest_user_colour'])),
	'S_LOGIN_ACTION'	=> append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'),
	'USER_AVATAR'		=> get_user_avatar($user->data['user_avatar'], $user->data['user_avatar_type'], $user->data['user_avatar_width'], $user->data['user_avatar_height']),
	'USERNAME'			=> get_username_string('full', $user->data['user_id'], $user->data['username'], $user->data['user_colour']),
	'LEGEND'		=> $legend,
	'START_DATE'		=> $start_date,
	'S_WELCOME'                => $s_welcome,
));

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

page_header($user->lang['PORTAL_HEADLINE']);

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

page_footer();

?>

ldm
Utente
Utente
Messaggi: 350
Iscritto il: 09/09/2009, 13:53
Versione: 3.0.7-PL1
Server: UNIX/Linux
Contatta:

Re: Problema SimplePortal

Messaggio da ldm » 18/09/2010, 14:11

Ho parlato di installer , poichè pensavo ti riferissi alla phpBB3 portal 1.2.2 che necessita dell' installer.
Io resto del parere che sarebbe necessario vedere il tuo file
includes/functions.php

Avatar utente
lenders
phpBB Expert
phpBB Expert
Messaggi: 713
Iscritto il: 22/06/2010, 14:28
Sesso: Maschio
Versione: 3.0.10
Server: UNIX/Linux
Database: MySQL(i) 5.1.49-community-log
Località: Napoli
Contatta:

Re: Problema SimplePortal

Messaggio da lenders » 18/09/2010, 14:15

Non posso allegare il file mi dice questo

Codice: Seleziona tutto

Il messaggio contiene 135402 caratteri. Il numero massimo di caratteri permessi è 60000.

ldm
Utente
Utente
Messaggi: 350
Iscritto il: 09/09/2009, 13:53
Versione: 3.0.7-PL1
Server: UNIX/Linux
Contatta:

Re: Problema SimplePortal

Messaggio da ldm » 18/09/2010, 14:21

Nel file portal.php la riga di errore è la seguente:
$posts_per_topic = $total_posts / $total_topics;
questa ti restituisce un errore pari a 0 divisionale poichè ci sono meno post che topics aperti - attualmente la tua board è disattivata ti prego di controllare se è così .

per il file functions lo devi proprio allegare ,non quotare (in basso inserisci allegato)

Avatar utente
lenders
phpBB Expert
phpBB Expert
Messaggi: 713
Iscritto il: 22/06/2010, 14:28
Sesso: Maschio
Versione: 3.0.10
Server: UNIX/Linux
Database: MySQL(i) 5.1.49-community-log
Località: Napoli
Contatta:

Re: Problema SimplePortal

Messaggio da lenders » 18/09/2010, 14:25

Allegato il file,si adesso il forum è disabilitato.
Non hai i permessi necessari per visualizzare i file allegati in questo messaggio.

Rispondi

Torna a “Supporto MODs”

Chi c’è in linea

Visitano il forum: Nessuno e 38 ospiti