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

Link che mantiene la sessione

Supporto per phpBB 3.0.x.
Avatar utente
marcomg
Utente
Utente
Messaggi: 160
Iscritto il: 08/08/2011, 20:17
Sesso: Maschio
Versione: 3.0.11
Server: UNIX/Linux
PHP: 5.4.7
Database: MySQL(i) 5.1.57

Link che mantiene la sessione

Messaggio da marcomg » 12/08/2011, 12:13

Scusate se il post è doppio, ma non sono riuscito a trovarlo con la ricerca.
Ho aggiunto un box con i link (home e chat) che in pratica sarebbero delle pagine aggiunte al forum.
Mi spiego meglio con immagini:

Immagine

Però il problema è che quando collego alla pagina home e la pagina chat perde alla sessione. Infatti giustamente ricollega a chat.php e non chat.php?sid=codicedellasessione
Ora, c'è un modo, una variabile, un qualcosa da inserire nel link per mantenere la sessione?

Questo è il mio overall_header.html (quello che ho modificato!)
Le modifiche lo ho fatte fra
<!-- Inizia la mia modifica -->
<!-- Finisce la mia modifica -->

Codice: Seleziona tutto

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
<head>

<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="content-language" content="{S_USER_LANG}" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="resource-type" content="document" />
<meta name="distribution" content="global" />
<meta name="keywords" content="" />
<meta name="description" content="" />
{META}
<title>{SITENAME} &bull; <!-- IF S_IN_MCP -->{L_MCP} &bull; <!-- ELSEIF S_IN_UCP -->{L_UCP} &bull; <!-- ENDIF -->{PAGE_TITLE}</title>

<!-- IF S_ENABLE_FEEDS -->
	<!-- IF S_ENABLE_FEEDS_OVERALL --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {SITENAME}" href="{U_FEED}" /><!-- ENDIF -->
	<!-- IF S_ENABLE_FEEDS_NEWS --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FEED_NEWS}" href="{U_FEED}?mode=news" /><!-- ENDIF -->
	<!-- IF S_ENABLE_FEEDS_FORUMS --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_ALL_FORUMS}" href="{U_FEED}?mode=forums" /><!-- ENDIF -->
	<!-- IF S_ENABLE_FEEDS_TOPICS --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FEED_TOPICS_NEW}" href="{U_FEED}?mode=topics" /><!-- ENDIF -->
	<!-- IF S_ENABLE_FEEDS_TOPICS_ACTIVE --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FEED_TOPICS_ACTIVE}" href="{U_FEED}?mode=topics_active" /><!-- ENDIF -->
	<!-- IF S_ENABLE_FEEDS_FORUM and S_FORUM_ID --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FORUM} - {FORUM_NAME}" href="{U_FEED}?f={S_FORUM_ID}" /><!-- ENDIF -->
	<!-- IF S_ENABLE_FEEDS_TOPIC and S_TOPIC_ID --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_TOPIC} - {TOPIC_TITLE}" href="{U_FEED}?f={S_FORUM_ID}&t={S_TOPIC_ID}" /><!-- ENDIF -->
<!-- ENDIF -->

<!--
	phpBB style name: prosilver
	Based on style:   prosilver (this is the default phpBB3 style)
	Original author:  Tom Beddard ( http://www.subBlue.com/ )
	Modified by:

	NOTE: This page was generated by phpBB, the free open-source bulletin board package.
	      The phpBB Group is not responsible for the content of this page and forum. For more information
	      about phpBB please visit http://www.phpbb.com
-->

<script type="text/javascript">
// <![CDATA[
	var jump_page = '{LA_JUMP_PAGE}:';
	var on_page = '{ON_PAGE}';
	var per_page = '{PER_PAGE}';
	var base_url = '{A_BASE_URL}';
	var style_cookie = 'phpBBstyle';
	var style_cookie_settings = '{A_COOKIE_SETTINGS}';
	var onload_functions = new Array();
	var onunload_functions = new Array();

	<!-- IF S_USER_PM_POPUP and S_NEW_PM -->
		var url = '{UA_POPUP_PM}';
		window.open(url.replace(/&/g, '&'), '_phpbbprivmsg', 'height=225,resizable=yes,scrollbars=yes, width=400');
	<!-- ENDIF -->

	/**
	* Find a member
	*/
	function find_username(url)
	{
		popup(url, 760, 570, '_usersearch');
		return false;
	}

	/**
	* New function for handling multiple calls to window.onload and window.unload by pentapenguin
	*/
	window.onload = function()
	{
		for (var i = 0; i < onload_functions.length; i++)
		{
			eval(onload_functions[i]);
		}
	}

	window.onunload = function()
	{
		for (var i = 0; i < onunload_functions.length; i++)
		{
			eval(onunload_functions[i]);
		}
	}

// ]]>
</script>
<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/styleswitcher.js"></script>
<script type="text/javascript" src="{T_SUPER_TEMPLATE_PATH}/forum_fn.js"></script>

<link href="{T_THEME_PATH}/print.css" rel="stylesheet" type="text/css" media="print" title="printonly" />
<link href="{T_STYLESHEET_LINK}" rel="stylesheet" type="text/css" media="screen, projection" />

<link href="{T_THEME_PATH}/normal.css" rel="stylesheet" type="text/css" title="A" />
<link href="{T_THEME_PATH}/medium.css" rel="alternate stylesheet" type="text/css" title="A+" />
<link href="{T_THEME_PATH}/large.css" rel="alternate stylesheet" type="text/css" title="A++" />

<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
	<link href="{T_THEME_PATH}/bidi.css" rel="stylesheet" type="text/css" media="screen, projection" />
<!-- ENDIF -->

</head>

<body id="phpbb" class="section-{SCRIPT_NAME} {S_CONTENT_DIRECTION}">

<div id="wrap">
	<a id="top" name="top" accesskey="t"></a>
	<div id="page-header">
		<div class="headerbar">
			<div class="inner"><span class="corners-top"><span></span></span>

			<div id="site-description">
				<a href="{U_INDEX}" title="{L_INDEX}" id="logo">{SITE_LOGO_IMG}</a>
				<h1>{SITENAME}</h1>
				<p>{SITE_DESCRIPTION}</p>
				<p class="skiplink"><a href="#start_here">{L_SKIP}</a></p>
			</div>

		<!-- IF S_DISPLAY_SEARCH and not S_IN_SEARCH -->
			<div id="search-box">
				<form action="{U_SEARCH}" method="get" id="search">
				<fieldset>
					<input name="keywords" id="keywords" type="text" maxlength="128" title="{L_SEARCH_KEYWORDS}" class="inputbox search" value="<!-- IF SEARCH_WORDS-->{SEARCH_WORDS}<!-- ELSE -->{L_SEARCH_MINI}<!-- ENDIF -->" onclick="if(this.value=='{LA_SEARCH_MINI}')this.value='';" onblur="if(this.value=='')this.value='{LA_SEARCH_MINI}';" />
					<input class="button2" value="{L_SEARCH}" type="submit" /><br />
					<a href="{U_SEARCH}" title="{L_SEARCH_ADV_EXPLAIN}">{L_SEARCH_ADV}</a> {S_SEARCH_HIDDEN_FIELDS}
				</fieldset>
				</form>
			</div>
		<!-- ENDIF -->

			<span class="corners-bottom"><span></span></span></div>
		</div>

		<div class="navbar">
			<div class="inner"><span class="corners-top"><span></span></span>

			<ul class="linklist navlinks">
				<li class="icon-home"><a href="{U_INDEX}" accesskey="h">{L_INDEX}</a> <!-- BEGIN navlinks --> <strong>&#8249;</strong> <a href="{navlinks.U_VIEW_FORUM}">{navlinks.FORUM_NAME}</a><!-- END navlinks --></li>

				<li class="rightside"><a href="#" onclick="fontsizeup(); return false;" onkeypress="return fontsizeup(event);" class="fontsize" title="{L_CHANGE_FONT_SIZE}">{L_CHANGE_FONT_SIZE}</a></li>

				<!-- IF U_EMAIL_TOPIC --><li class="rightside"><a href="{U_EMAIL_TOPIC}" title="{L_EMAIL_TOPIC}" class="sendemail">{L_EMAIL_TOPIC}</a></li><!-- ENDIF -->
				<!-- IF U_EMAIL_PM --><li class="rightside"><a href="{U_EMAIL_PM}" title="{L_EMAIL_PM}" class="sendemail">{L_EMAIL_PM}</a></li><!-- ENDIF -->
				<!-- IF U_PRINT_TOPIC --><li class="rightside"><a href="{U_PRINT_TOPIC}" title="{L_PRINT_TOPIC}" accesskey="p" class="print">{L_PRINT_TOPIC}</a></li><!-- ENDIF -->
				<!-- IF U_PRINT_PM --><li class="rightside"><a href="{U_PRINT_PM}" title="{L_PRINT_PM}" accesskey="p" class="print">{L_PRINT_PM}</a></li><!-- ENDIF -->
			</ul>

			<!-- IF not S_IS_BOT and S_USER_LOGGED_IN -->
			<ul class="linklist leftside">
				<li class="icon-ucp">
					<a href="{U_PROFILE}" title="{L_PROFILE}" accesskey="e">{L_PROFILE}</a>
						<!-- IF S_DISPLAY_PM --> (<a href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}</a>)<!-- ENDIF -->
					<!-- IF S_DISPLAY_SEARCH --> &bull;
					<a href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a>
					<!-- ENDIF -->
					<!-- IF U_RESTORE_PERMISSIONS --> &bull;
					<a href="{U_RESTORE_PERMISSIONS}">{L_RESTORE_PERMISSIONS}</a>
					<!-- ENDIF -->
				</li>
			</ul>
			<!-- ENDIF -->

			<ul class="linklist rightside">
				<li class="icon-faq"><a href="{U_FAQ}" title="{L_FAQ_EXPLAIN}">{L_FAQ}</a></li>
				<!-- IF not S_IS_BOT -->
					<!-- IF S_DISPLAY_MEMBERLIST --><li class="icon-members"><a href="{U_MEMBERLIST}" title="{L_MEMBERLIST_EXPLAIN}">{L_MEMBERLIST}</a></li><!-- ENDIF -->
					<!-- IF not S_USER_LOGGED_IN and S_REGISTER_ENABLED and not (S_SHOW_COPPA or S_REGISTRATION) --><li class="icon-register"><a href="{U_REGISTER}">{L_REGISTER}</a></li><!-- ENDIF -->
					<li class="icon-logout"><a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="x">{L_LOGIN_LOGOUT}</a></li>
				<!-- ENDIF -->
			</ul>

			<span class="corners-bottom"><span></span></span></div>
		</div>
<!-- Inizia la mia modifica -->

   <br />

    <div class="navbar">
             <div class="inner"><span class="corners-top"><span></span></span>

             <ul class="linklist leftside">

       <li><a href="http://totalfirefusion.comli.com/forum/index.php">Home</a> &bull; </li>
       <li><a href="http://totalfirefusion.comli.com/forum/chat.php">Chat</a></li>
       
             </ul>
             <span class="corners-bottom"><span></span></span></div>
          </div>
<!-- Finisce la mia modifica -->
	</div>

	<a name="start_here"></a>
	<div id="page-body">
		<!-- IF S_BOARD_DISABLED and S_USER_LOGGED_IN and (U_MCP or U_ACP) -->
		<div id="information" class="rules">
			<div class="inner"><span class="corners-top"><span></span></span>
				<strong>{L_INFORMATION}:</strong> {L_BOARD_DISABLED}
			<span class="corners-bottom"><span></span></span></div>
		</div>
		<!-- ENDIF -->
Windows is what you open when you want fresh air from outside.

Avatar utente
Barrnet
Leader Moderatori
Leader Moderatori
Messaggi: 3124
Iscritto il: 04/07/2010, 23:31
Sesso: Maschio
Versione: 3.0.10
Server: UNIX/Linux
PHP: 5.3.10
Database: MySQL 5.1.61-community-log
Contatta:

Re: Link che mantiene la sessione

Messaggio da Barrnet » 12/08/2011, 16:03

Teoricamente la sezione dovrebbe mantenersi.
Per la chat cosa hai usato? una pagina personalizzata di phpbb3 o una semplice pagina in html?
http://www.phpbbitalia.net/forum/phpbb- ... a-t23.html

Avatar utente
marcomg
Utente
Utente
Messaggi: 160
Iscritto il: 08/08/2011, 20:17
Sesso: Maschio
Versione: 3.0.11
Server: UNIX/Linux
PHP: 5.4.7
Database: MySQL(i) 5.1.57

Re: Link che mantiene la sessione

Messaggio da marcomg » 12/08/2011, 16:17

Una pagina personalizzata phpbb
Windows is what you open when you want fresh air from outside.

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: Link che mantiene la sessione

Messaggio da Micogian » 12/08/2011, 19:45

Ma tu cosa intendi per Home ? L'indice del Forum o la Home page del Sito (che dovrebbe essere nella root e non nella cartella 'forum').
Se la home è l'indice del forum puoi usare lo stesso link previsto per la testata:

Codice: Seleziona tutto

<li><a href="{U_INDEX}" title="{L_INDEX}" >Home</a> &bull; </li>
Stessa cosa per la Chat ma dovresti creare la variabile link in index.php o nel file functions.

Avatar utente
marcomg
Utente
Utente
Messaggi: 160
Iscritto il: 08/08/2011, 20:17
Sesso: Maschio
Versione: 3.0.11
Server: UNIX/Linux
PHP: 5.4.7
Database: MySQL(i) 5.1.57

Re: Link che mantiene la sessione

Messaggio da marcomg » 13/08/2011, 9:03

Chiedo scusa se non mi so esprimere bene.
Allora il forum è stato installato in
www/forum/
mentre la root sarebbe
www/
Nella root ho messo un file index.php che sarebbe una pagina personalizzata di phpbb, la homepage. Essa invita ad acceedere al forum o alla chat. (Tutte pagine personalizzate di phpbb)
Tu mu hai detto che dovrei inserire una variabile che ricollega alla chat e all'home page
(se non sbaglio per la chat ./chat.php mentre l'home page ../index.php)

Allora, non ho capito come dovrei modificare la index o il file functions.
Anche perchè quest'ultimo non lo trovo!
Windows is what you open when you want fresh air from outside.

Avatar utente
marcomg
Utente
Utente
Messaggi: 160
Iscritto il: 08/08/2011, 20:17
Sesso: Maschio
Versione: 3.0.11
Server: UNIX/Linux
PHP: 5.4.7
Database: MySQL(i) 5.1.57

Re: Link che mantiene la sessione

Messaggio da marcomg » 13/08/2011, 14:02

Barrnet ha scritto:Teoricamente la sezione dovrebbe mantenersi.
Per la chat cosa hai usato? una pagina personalizzata di phpbb3 o una semplice pagina in html?
http://www.phpbbitalia.net/forum/phpbb- ... a-t23.html
Ho aperto un'altro forum e ho notato che sul nuovo forum ha ragione Barrnet. Ho importato il veccio database sul nuovo forum e nuovamente non andava. Ho ripristinato quello vecchio e nuovamente l'autenticazione rimane anche se cancello il numero della sessione.
Quindi deduco che sia un'impostazione nel database!
Però quale?
Windows is what you open when you want fresh air from outside.

Avatar utente
marcomg
Utente
Utente
Messaggi: 160
Iscritto il: 08/08/2011, 20:17
Sesso: Maschio
Versione: 3.0.11
Server: UNIX/Linux
PHP: 5.4.7
Database: MySQL(i) 5.1.57

Re: Link che mantiene la sessione

Messaggio da marcomg » 14/08/2011, 8:12

Nessuno risponde?
Ultima modifica di pegasus81 il 16/08/2011, 17:54, modificato 1 volta in totale.
Motivazione: Messaggio indecifrabile
Windows is what you open when you want fresh air from outside.

Avatar utente
marcomg
Utente
Utente
Messaggi: 160
Iscritto il: 08/08/2011, 20:17
Sesso: Maschio
Versione: 3.0.11
Server: UNIX/Linux
PHP: 5.4.7
Database: MySQL(i) 5.1.57

Re: Link che mantiene la sessione

Messaggio da marcomg » 16/08/2011, 19:10

Nessuno nessuno?
:( :? :shock: :cry:
Windows is what you open when you want fresh air from outside.

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: Link che mantiene la sessione

Messaggio da Micogian » 16/08/2011, 19:59

Il Database è un "contenitore" dove vengono memorizzati dati, non ci sono impostazioni del database che non siano il frutto di un inserimento nel Forum o nel PCA.
Per quanto riguarda le variabili bisogna sapere che a grandi linee phpbb funziona in questo modo: attraverso i file php viene interrogato il database, viene creato un array con variabili che contengono i dati che vengono passati al template, un file html che usa le variabili per visualizzare le pagine.
Le variabili phpbb devono essere tutte maiuscole.
Se tu hai fatto una Pagina personalizzata in phpbb , anche se sei nella root hai a disposizione tutte le funzioni di phpbb, puoi utilizzare variabili già definite e puoi aggiungerne altre.

Per creare una variabile phpbb usa questo sistema:

Codice: Seleziona tutto

 $template->assign_vars(array(
	'U_INDEX'		=> append_sid("{$phpbb_root_path}index.$phpEx"),
	'U_CHAT'		=> append_sid("chat.$phpEx"),
	));
Nel template, potrai usare le variabili {U_INDEX} e {U_CHAT} per i links alla Home e alla Chat se quest'ultima è nella root.

Avatar utente
marcomg
Utente
Utente
Messaggi: 160
Iscritto il: 08/08/2011, 20:17
Sesso: Maschio
Versione: 3.0.11
Server: UNIX/Linux
PHP: 5.4.7
Database: MySQL(i) 5.1.57

Re: Link che mantiene la sessione

Messaggio da marcomg » 16/08/2011, 20:16

E questo mi farebbe rimanere con la sessione aperta?
Windows is what you open when you want fresh air from outside.

Rispondi

Torna a “[3.0.x] Forum di Supporto”

Chi c’è in linea

Visitano il forum: Nessuno e 2 ospiti