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

TopTen Topics in tabella personalizzata

Supporto stili in generale.
Shanks le roux
Utente
Utente
Messaggi: 85
Iscritto il: 29/01/2011, 11:40
Sesso: Maschio
Versione: 3.0.9
Server: UNIX/Linux
Database: MySQL 5.1.49-community-log

Re: TopTen Topics in tabella personalizzata

Messaggio da Shanks le roux » 10/12/2011, 17:41

Devo mettere il tutto nell'index ^^
Poi altri problemi xD
Allora ricopiando il codice degli ultimi topic vado a cambiare da row1 a row2 da sql1 a sql2 perchè pensavo che tu parlavi di questo prima..Ma forse sbaglio..Comunque il risultato di ciò è ottenere la prima colonna con le funzioni della seconda..E la seconda piena di "(di)"

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: TopTen Topics in tabella personalizzata

Messaggio da Micogian » 10/12/2011, 17:55

Passami il codice che hai usato, ma non te lo posso vedere oggi.
Non mettere il codice nell'index, metti solo un include.

Avatar utente
Lady R
phpBB Expert
phpBB Expert
Messaggi: 900
Iscritto il: 08/11/2011, 13:43
Sesso: Femmina
Versione: 3.0.9
Server: UNIX/Linux
PHP: 5.3.8
Database: MySQLi
Contatta:

Re: TopTen Topics in tabella personalizzata

Messaggio da Lady R » 11/12/2011, 0:10

le direttive W3C non dicono di "non usare il tag table"

Dicono di usarlo quando è opportuno usarlo, ovvero quando si ha bisogno di inserire dei dati.
Il contenuto generato dalla TopTenList sono dei dati, quindi un <table> sarebbe sintatticamente corretto.

Shanks le roux
Utente
Utente
Messaggi: 85
Iscritto il: 29/01/2011, 11:40
Sesso: Maschio
Versione: 3.0.9
Server: UNIX/Linux
Database: MySQL 5.1.49-community-log

Re: TopTen Topics in tabella personalizzata

Messaggio da Shanks le roux » 11/12/2011, 17:18

Il codice è

Codice: Seleziona tutto

<?php
// MOD Topten Topics : Topics più recenti, Topics più visti e Posts più recenti 
// created by Micogian (Bingo)
if (!defined('IN_PHPBB'))
{
   exit;
}
// configurazione: numero dei recods da visualizzare nella Lista
$list_rec = 20 ;   // numero di records da estrarre dalla tabella (alcuni topics potrebbero non aver il permesso di lettura)
$list_view = 10 ;  // sostituire il numero della variabile $lista se si desidera diminuire/aumentare il numero dei Topics 

//---------- 10 Topics più Recenti start -----------//
$sql1 = "SELECT tt.topic_id, tt.forum_id, tt.topic_title, tt.topic_time, tt.topic_moved_id, tt.topic_first_poster_name,
    ft.forum_id, ft.forum_name
    FROM " . TOPICS_TABLE . " tt, " . FORUMS_TABLE . " ft 
	WHERE tt.forum_id IN (212)
    AND tt.topic_type = 0
    AND tt.topic_moved_id = 0
    AND tt.forum_id = ft.forum_id
    ORDER BY tt.topic_time DESC LIMIT 0,$list_rec";
$result1 = $db->sql_query($sql1);
    $n1 = 0;
    while ($row1 = $db->sql_fetchrow($result1))
    {
       	if ($auth->acl_get('f_read', $row1['forum_id']) == 1) 
        {
            if ($n1 < $list_view)
			{
				if (strlen($row1['topic_title']) > 28)
				{
				$topic_title1 = substr($row1['topic_title'],0,27) . "...";
				}else{
				$topic_title1 = $row1['topic_title'];
				}
			$last_topic_link[$n1]   		= append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=" . $row1['forum_id'] . "&t=" . $row1['topic_id']);
            $last_topic_title[$n1]  		= $row1['topic_title'];
			$last_topic_title_short[$n1]  	= $topic_title1;
			$last_topic_forum[$n1]  		= $row1['forum_name'];
            $last_topic_author[$n1] 		= $row1['topic_first_poster_name'];
            $last_topic_data[$n1]   		= $user->format_date($row1['topic_time'], "|d M|");
			++$n1 ;          	
            }else{
			break ;
			}
        }
    }
//---------- 10 Topics più Recenti end -----------//

//---------- 10 Topics più Visti start -----------//

$sql2 = "SELECT tt.topic_id, tt.forum_id, tt.topic_title, tt.topic_time, tt.topic_moved_id, tt.topic_first_poster_name,
    ft.forum_id, ft.forum_name
    FROM " . TOPICS_TABLE . " tt, " . FORUMS_TABLE . " ft 
	WHERE tt.forum_id IN (213)
    AND tt.topic_type = 0
    AND tt.topic_moved_id = 0
    AND tt.forum_id = ft.forum_id
    ORDER BY tt.topic_time DESC LIMIT 0,$list_rec";
$result2 = $db->sql_query($sql2);
    $n2 = 0;
    while ($row2 = $db->sql_fetchrow($result2))
    {
       	if ($auth->acl_get('f_read', $row2['forum_id']) == 1) 
        {
            if ($n2 < $list_view)
			{
				if (strlen($row2['topic_title']) > 28)
				{
				$topic_title2 = substr($row2['topic_title'],0,27) . "...";
				}else{
				$topic_title2 = $row2['topic_title'];
				}
			$last_topic_link[$n2]   		= append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=" . $row2['forum_id'] . "&t=" . $row2['topic_id']);
            $last_topic_title[$n2]  		= $row2['topic_title'];
			$last_topic_title_short[$n2]  	= $topic_title2;
			$last_topic_forum[$n2]  		= $row2['forum_name'];
            $last_topic_author[$n2] 		= $row2['topic_first_poster_name'];
            $last_topic_data[$n2]   		= $user->format_date($row2['topic_time'], "|d M|");
			++$n2 ;          	
            }else{
			break ;
			}
        }
    }
//---------- 10 Topics più visti end -----------//

//---------- 10 Ultimi posts start -----------//
$sql4 = "SELECT tt.topic_id, tt.forum_id, tt.topic_moved_id, tt.topic_last_post_id, tt.topic_last_poster_id, tt.topic_last_poster_name, tt.topic_last_post_subject, tt.topic_last_post_time,
    ft.forum_id, ft.forum_name
    FROM " . TOPICS_TABLE . " tt, " . FORUMS_TABLE . " ft 
    WHERE tt.topic_type = 0
    AND tt.topic_moved_id = 0
    AND tt.forum_id = ft.forum_id
    ORDER BY tt.topic_last_post_time DESC LIMIT 0,$list_rec";
$result4 = $db->sql_query($sql4);
    $n4 = 0;
    while ($row4 = $db->sql_fetchrow($result4))
    {
       	if ($auth->acl_get('f_read', $row4['forum_id']) == 1) 
        {
            if ($n4 < $list_view)
			{
				$post_subject = str_replace("Re: ", "", $row4['topic_last_post_subject']) ;
				if (strlen($post_subject) > 28)
				{
				$post_title = substr($post_subject,0,25) . "...";
				}else{
				$post_title = $post_subject ;
				}
			$last_post_link[$n4]		= append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=" . $row4['forum_id'] . "&t=" . $row4['topic_id'] . "#p" . $row4['topic_last_post_id']);
			//$last_post_link[$n4]   		= append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=" . $row4['forum_id'] . "&t=" . $row4['topic_id'] . "p#" . $row4['topic_last_post_id']);
			$last_post_title[$n4] 		= $row4['topic_last_post_subject'];
			$last_post_title_short[$n4] = $post_title;
			$last_post_forum[$n4]  		= $row4['forum_name'];
			$last_post_author[$n4] 		= $row4['topic_last_poster_name'];
			++$n4 ;          	
			}else{
			break ;
			}
        }
    }
//---------- 10 Ultimi posts end -----------//

// Crea l'array "topten_list" che contiene le Variabili per il Template
for ($x = 0; $x < $list_view; ++$x)
{
 $template->assign_block_vars('topten_list',array(
	'LAST_TOPIC_LINK'			=> $last_topic_link[$x],
	'LAST_TOPIC_TITLE'			=> $last_topic_title[$x],
	'LAST_TOPIC_TITLE_SHORT'	=> $last_topic_title_short[$x],
	'LAST_TOPIC_FORUM'			=> $last_topic_forum[$x],
	'LAST_TOPIC_AUTHOR'			=> $last_topic_author[$x],
	'LAST_TOPIC_DATA'			=> $last_topic_data[$x],

	'VIEW_TOPIC_LINK'			=> $view_topic_link[$x],
	'VIEW_TOPIC_TITLE'			=> $view_topic_title[$x],
	'VIEW_TOPIC_TITLE_SHORT'	=> $view_topic_title_short[$x],
	'VIEW_TOPIC_FORUM'			=> $view_topic_forum[$x],
	'VIEW_TOPIC_AUTHOR'			=> $view_topic_author[$x],
	'VIEW_TOPIC_VIEWS'			=> $view_topic_views[$x],

	'LAST_POST_LINK'			=> $last_post_link[$x],
	'LAST_POST_TITLE'			=> $last_post_title[$x],
	'LAST_POST_TITLE_SHORT'		=> $last_post_title_short[$x],
	'LAST_POST_FORUM'			=> $last_post_forum[$x],
	'LAST_POST_AUTHOR'			=> $last_post_author[$x]
	));
}
?>
Il risultato è questo
Immagine

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: TopTen Topics in tabella personalizzata

Messaggio da Micogian » 11/12/2011, 17:39

Per capire bisogna vedere anche il template.
Non ho capito cosa vuoi visualizzare perchè la query centrale riguardava i "Topics più visti", l'hai modificata e sicuramente c'è qualche errore perchè non visualizza nulla, che sia un problema della query o del template non posso saperlo senza vedere il template.
Ho bisogno che tu sia più chiaro, quello che vuoi fare e quello che hai fatto, in entrambi i file.

Shanks le roux
Utente
Utente
Messaggi: 85
Iscritto il: 29/01/2011, 11:40
Sesso: Maschio
Versione: 3.0.9
Server: UNIX/Linux
Database: MySQL 5.1.49-community-log

Re: TopTen Topics in tabella personalizzata

Messaggio da Shanks le roux » 11/12/2011, 17:53

Io voglio vedere gli ultimi topic di 3 sezioni diverse(se è possibile anche 4) in 3 o 4 colonne diverse..
Il template della tabella è

Codice: Seleziona tutto

<!--  Mod topten_topics ver 1.0.2 by Micogian start -->
<div class="sn-cat-header">
   <ul class="topiclist">
      <li class="header">
         <dl class="icon">
            <dd style="width: 34%">&nbsp;Ultimi Topics</dd>
            <dd style="width: 33%">&nbsp;Topics pi&ugrave; visti&nbsp;&nbsp;&nbsp;&nbsp;</dd>
            <dd>&nbsp;Ultimi Posts</dd>
         </dl>
      </li>
   </ul>
</div>
<div class="sn-cat-row rtl-viewforum">
   <ul class="topiclist topics">
      <!-- BEGIN topten_list -->
      <li>
         <dl>
            <dd style="width: 34%">{topten_list.LAST_TOPIC_DATA} &nbsp;<a style="font-weight: bold" href="{topten_list.LAST_TOPIC_LINK}" title="{topten_list.LAST_TOPIC_TITLE} (in: {topten_list.LAST_TOPIC_FORUM})">{topten_list.LAST_TOPIC_TITLE_SHORT}</a> <span style="color: #708090">(di {topten_list.LAST_TOPIC_AUTHOR})</span></dd>
            <dd style="width: 34%">{topten_list.VIEW_TOPIC_VIEWS} &nbsp;<a style="font-weight: bold" href="{topten_list.VIEW_TOPIC_LINK}" title="{topten_list.VIEW_TOPIC_TITLE} (in: {topten_list.VIEW_TOPIC_FORUM})">{topten_list.VIEW_TOPIC_TITLE_SHORT}</a> <span style="color: #708090">(di {topten_list.VIEW_TOPIC_AUTHOR})</span></dd>
            <dd style="padding: 1px"><a style=" font-weight: bold" href="{topten_list.LAST_POST_LINK}" title="{topten_list.LAST_POST_TITLE} (in: {topten_list.LAST_POST_FORUM})">{topten_list.LAST_POST_TITLE_SHORT}</a> <span style="color: #708090">(di {topten_list.LAST_POST_AUTHOR})</span></dd>               
         </dl>
      </li>   
      <!-- END topten_list -->   
   </ul>
</div><div class="sn-cat-footer"></div>
<!--  Mod topten_topics ver 1.0.2 by Micogian end -->

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: TopTen Topics in tabella personalizzata

Messaggio da Micogian » 11/12/2011, 18:29

Shanks le roux ha scritto:Io voglio vedere gli ultimi topic di 3 sezioni diverse(se è possibile anche 4) in 3 o 4 colonne diverse..
Ma se chiedo chiarezza perchè le risposte sono sempre incomplete ?
Se vuoi gli ultimi topics di 3 sezioni diverse perchè hai lasciato la query che estrae gli "Ultimo posts" ??????
Hai messo 2 Forum (212 e 213), e l'altro ?

Sulle 4 colonne la vedo dura se non c'è spazio sufficiente, si può togliere la data e accorciare il titolo ma non so se basta.

EDIT:
Comunque ti avevo detto di cambiare le variabili, TUTTE

PHP (nella terza query ho messo il forum_id=214 se è sbagliato cambialo)

Codice: Seleziona tutto

<?php
    // MOD Topten Topics : Topics più recenti di 3 Forums diversi
    // created by Micogian (Bingo)
    if (!defined('IN_PHPBB'))
    {
       exit;
    }
    // configurazione: indicare i records da elaborare e quelli da visualizzare
    $list_rec = 20 ;   // numero di records da estrarre dalla tabella (alcuni topics potrebbero non aver il permesso di lettura)
    $list_view = 10 ;  // numero dei recods da visualizzare nella Lista/aumentare il numero dei Topics

    //---------- 10 Topics più Recenti Forum 212 - start -----------//
    $sql1 = "SELECT tt.topic_id, tt.forum_id, tt.topic_title, tt.topic_time, tt.topic_moved_id, tt.topic_first_poster_name,
        ft.forum_id, ft.forum_name
        FROM " . TOPICS_TABLE . " tt, " . FORUMS_TABLE . " ft
        WHERE tt.forum_id = '212'
        AND tt.topic_type = 0
        AND tt.topic_moved_id = 0
        AND tt.forum_id = ft.forum_id
        ORDER BY tt.topic_time DESC LIMIT 0,$list_rec";
    $result1 = $db->sql_query($sql1);
    $n1 = 0;
    while ($row1 = $db->sql_fetchrow($result1))
    {
        if ($auth->acl_get('f_read', $row1['forum_id']) == 1)
        {
            if ($n1 < $list_view)
            {
                if (strlen($row1['topic_title']) > 28)
                {
                $topic_title1 = substr($row1['topic_title'],0,27) . "...";
                }else{
                $topic_title1 = $row1['topic_title'];
                }
                $last_topic1_link[$n1]         = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=" . $row1['forum_id'] . "&t=" . $row1['topic_id']);
                $last_topic1_title[$n1]        = $row1['topic_title'];
                $last_topic1_title_short[$n1]  = $topic_title1;
                $last_topic1_forum[$n1]        = $row1['forum_name'];
                $last_topic1_author[$n1]       = $row1['topic_first_poster_name'];
                //$last_topic1_data[$n1]         = $user->format_date($row1['topic_time'], "|d M|");
                ++$n1 ;             
            }else{
                break ;
            }
        }
    }
    //---------- 10 Topics più Recenti Forum 212 - end -----------//

    //---------- 10 Topics più Recenti Forum 213 - start -----------//
    $sql2 = "SELECT tt.topic_id, tt.forum_id, tt.topic_title, tt.topic_time, tt.topic_moved_id, tt.topic_first_poster_name,
        ft.forum_id, ft.forum_name
        FROM " . TOPICS_TABLE . " tt, " . FORUMS_TABLE . " ft
        WHERE tt.forum_id = '213'
        AND tt.topic_type = 0
        AND tt.topic_moved_id = 0
        AND tt.forum_id = ft.forum_id
        ORDER BY tt.topic_time DESC LIMIT 0,$list_rec";
    $result2 = $db->sql_query($sql2);
    $n2 = 0;
    while ($row2 = $db->sql_fetchrow($result2))
    {
        if ($auth->acl_get('f_read', $row2['forum_id']) == 1)
        {
            if ($n2 < $list_view)
            {
                if (strlen($row2['topic_title']) > 28)
                {
                $topic_title2 = substr($row2['topic_title'],0,27) . "...";
                }else{
                $topic_title2 = $row2['topic_title'];
                }
                $last_topic2_link[$n2]         = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=" . $row2['forum_id'] . "&t=" . $row2['topic_id']);
                $last_topic2_title[$n2]        = $row2['topic_title'];
                $last_topic2_title_short[$n2]  = $topic_title2;
                $last_topic2_forum[$n2]        = $row2['forum_name'];
                $last_topic2_author[$n2]       = $row2['topic_first_poster_name'];
                //$last_topic2_data[$n2]         = $user->format_date($row2['topic_time'], "|d M|");
                ++$n2 ;             
            }else{
                break ;
            }
        }
    }
    //---------- 10 Topics più Recenti Forum 213 - end -----------//

    //---------- 10 Topics più Recenti Forum 214 - start -----------//
    $sql2 = "SELECT tt.topic_id, tt.forum_id, tt.topic_title, tt.topic_time, tt.topic_moved_id, tt.topic_first_poster_name,
        ft.forum_id, ft.forum_name
        FROM " . TOPICS_TABLE . " tt, " . FORUMS_TABLE . " ft
        WHERE tt.forum_id = '214'
        AND tt.topic_type = 0
        AND tt.topic_moved_id = 0
        AND tt.forum_id = ft.forum_id
        ORDER BY tt.topic_time DESC LIMIT 0,$list_rec";
    $result1 = $db->sql_query($sql1);
    $n1 = 0;
    while ($row1 = $db->sql_fetchrow($result1))
    {
        if ($auth->acl_get('f_read', $row1['forum_id']) == 1)
        {
            if ($n1 < $list_view)
            {
                if (strlen($row1['topic_title']) > 28)
                {
                $topic_title1 = substr($row1['topic_title'],0,27) . "...";
                }else{
                $topic_title1 = $row1['topic_title'];
                }
                $last_topic_link[$n1]         = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=" . $row1['forum_id'] . "&t=" . $row1['topic_id']);
                $last_topic_title[$n1]        = $row1['topic_title'];
                $last_topic_title_short[$n1]  = $topic_title1;
                $last_topic_forum[$n1]        = $row1['forum_name'];
                $last_topic_author[$n1]       = $row1['topic_first_poster_name'];
                $last_topic_data[$n1]         = $user->format_date($row1['topic_time'], "|d M|");
                ++$n1 ;             
            }else{
                break ;
            }
        }
    }
    //---------- 10 Topics più Recenti Forum 214 - end -----------//

    // Crea l'array "topten_list" che contiene le Variabili per il Template
    for ($x = 0; $x < $list_view; ++$x)
    {
    $template->assign_block_vars('topten_list',array(
       'LAST_TOPIC1_LINK'           => $last_topic1_link[$x],
       'LAST_TOPIC1_TITLE'          => $last_topic1_title[$x],
       'LAST_TOPIC1_TITLE_SHORT'      => $last_topic1_title_short[$x],
       'LAST_TOPIC1_FORUM'           => $last_topic1_forum[$x],
       'LAST_TOPIC1_AUTHOR'         => $last_topic1_author[$x],

       'LAST_TOPIC2_LINK'           => $last_topic2_link[$x],
       'LAST_TOPIC2_TITLE'          => $last_topic2_title[$x],
       'LAST_TOPIC2_TITLE_SHORT'      => $last_topic2_title_short[$x],
       'LAST_TOPIC2_FORUM'           => $last_topic2_forum[$x],
       'LAST_TOPIC2_AUTHOR'         => $last_topic2_author[$x],

       'LAST_TOPIC3_LINK'           => $last_topic3_link[$x],
       'LAST_TOPIC3_TITLE'          => $last_topic3_title[$x],
       'LAST_TOPIC3_TITLE_SHORT'      => $last_topic3_title_short[$x],
       'LAST_TOPIC3_FORUM'           => $last_topic3_forum[$x],
       'LAST_TOPIC3_AUTHOR'         => $last_topic3_author[$x],
       ));
    }
?>
HTML

Codice: Seleziona tutto

<!--  Mod topten_topics  by Micogian start -->
    <div class="sn-cat-header">
       <ul class="topiclist">
          <li class="header">
             <dl class="icon">
                <dd style="width: 33%">&nbsp;Forum 1</dd>
                <dd style="width: 33%">&nbsp;Forum 2</dd>
                <dd>&nbsp;Forum 3</dd>
             </dl>
          </li>
       </ul>
    </div>
	<div class="sn-cat-row rtl-viewforum">
		<ul class="topiclist topics">
		<!-- BEGIN topten_list -->
			<li>
				<dl>
					<dd style="width: 33%">&nbsp;<a style="font-weight: bold" href="{topten_list.LAST_TOPIC1_LINK}" title="{topten_list.LAST_TOPIC1_TITLE} (in: {topten_list.LAST_TOPIC1_FORUM})">{topten_list.LAST_TOPIC_TITLE1_SHORT}</a> <span style="color: #708090"> {topten_list.LAST_TOPIC1_AUTHOR}</span></dd>
					<dd style="width: 33%">&nbsp;<a style="font-weight: bold" href="{topten_list.LAST_TOPIC2_LINK}" title="{topten_list.LAST_TOPIC2_TITLE} (in: {topten_list.LAST_TOPIC2_FORUM})">{topten_list.LAST_TOPIC_TITLE2_SHORT}</a> <span style="color: #708090"> {topten_list.LAST_TOPIC2_AUTHOR}</span></dd>
					<dd style="padding: 1px">&nbsp;<a style="font-weight: bold" href="{topten_list.LAST_TOPIC3_LINK}" title="{topten_list.LAST_TOPIC3_TITLE} (in: {topten_list.LAST_TOPIC3_FORUM})">{topten_list.LAST_TOPIC_TITLE3_SHORT}</a> <span style="color: #708090"> {topten_list.LAST_TOPIC3_AUTHOR}</span></dd>
				</dl>
			</li>   
		<!-- END topten_list -->   
		</ul>
<!--  Mod topten_topics  by Micogian end -->
</div><div class="sn-cat-footer"></div>

Shanks le roux
Utente
Utente
Messaggi: 85
Iscritto il: 29/01/2011, 11:40
Sesso: Maschio
Versione: 3.0.9
Server: UNIX/Linux
Database: MySQL 5.1.49-community-log

Re: TopTen Topics in tabella personalizzata

Messaggio da Shanks le roux » 12/12/2011, 0:30

Avevo messo solo 2 forum perchè trovando l'errore era stupido andare avanti..Poi di query e compagnia non ne capisco..E' vero avevi detto di cambiarle tutte,ho visto la differenza tra la prima e la terza e ad intuito ho sostituito "1" con "2"..Poi,la prima diceva ultimi topic no?Quindi io ho copiato quella per ottenere lo stesso risultato,non ho capito perchè parli di query "ultimO topic"..Abbiate pazienza,non è facile per tutti ^^

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: TopTen Topics in tabella personalizzata

Messaggio da Micogian » 12/12/2011, 7:55

Shanks le roux ha scritto:Avevo messo solo 2 forum perchè trovando l'errore era stupido andare avanti..Poi di query e compagnia non ne capisco..E' vero avevi detto di cambiarle tutte,ho visto la differenza tra la prima e la terza e ad intuito ho sostituito "1" con "2"..Poi,la prima diceva ultimi topic no?Quindi io ho copiato quella per ottenere lo stesso risultato,non ho capito perchè parli di query "ultimO topic"..Abbiate pazienza,non è facile per tutti ^^
Non so dove ho parlato di "Ultimo Topic", ho detto "Ultimi Posts" che è un'altra cosa.
Il Topic è la discussione, le risposte a queste discussioni sono Posts. Gli ultimi Topics non sempre sono gli "Ultimo posts", si può rispondere a un Topic vecchio quindi questo rientra tra gli "Ultimi posts" ma resta sempre un Topic vecchio.
Se vuoi ottenete gli "Ultimi Topics" di Sezioni diverse le query sono uguali, salvo il forum_id, naturalmente.
Ma per evitare sovrapposizioni tutte le variabili utilizzate (sia quelle php che quelle PHPBB) vanno modificate.
Le variabili php sono quelle minuscole, le maiuscole sono phpbb.

Se vedi le tre query che ho elaborato sono perfettamente identiche, salvo i nomi di tutte le variabili usate e quindi anche le successive variabili PHPBB che vengono passate al Template.

Shanks le roux
Utente
Utente
Messaggi: 85
Iscritto il: 29/01/2011, 11:40
Sesso: Maschio
Versione: 3.0.9
Server: UNIX/Linux
Database: MySQL 5.1.49-community-log

Re: TopTen Topics in tabella personalizzata

Messaggio da Shanks le roux » 12/12/2011, 16:47

Ho inserito i tuoi codici ma niente..Nella prima e nella seconda colonna escono solo degli autori nella terza nulla..

Rispondi

Torna a “Supporto stili”

Chi c’è in linea

Visitano il forum: Nessuno e 64 ospiti