Pagina 1 di 2

problema liste con spazi vuoti

Inviato: 17/07/2011, 16:55
da chicks0315
salve ho un mezzo problemino:

nel mio portale ho inserito(nel portal.php) questo codice per visualizzare le ultime recensioni e ultime guide:

Codice: Seleziona tutto

// INIZIO - 10 giochi prossimi all'uscita
    $sql1 = "SELECT topic_id, forum_id, topic_title, topic_time, topic_moved_id, topic_first_poster_name
        FROM " . TOPICS_TABLE . "
        WHERE topic_type = 0
        AND topic_moved_id = 0
		AND forum_id = 2
        ORDER BY topic_time DESC LIMIT 0,10";
    $result1 = $db->sql_query($sql1);

    while ($row1 = $db->sql_fetchrow($result1))
    {
       if ($auth->acl_get('f_read', $row1['forum_id']) == 1) {
          $template->assign_block_vars('topics_last', array(
             'LAST_LINK'      => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=" . $row1['forum_id'] . "&t=" . $row1['topic_id']),
             'LAST_TITOLO'    => $row1['topic_title']
          ));
       }
    }
    $db->sql_freeresult($result1);
    // FINE QUERY 10 giochi in uscita
	
	
	// INIZIO - 10 ultime guide
    $sql2 = "SELECT topic_id, forum_id, topic_title, topic_time, topic_moved_id, topic_first_poster_name
        FROM " . TOPICS_TABLE . "
        WHERE topic_type = 0
        AND topic_moved_id = 0
		AND forum_id = 3
        ORDER BY topic_time DESC LIMIT 0,10";
    $result2 = $db->sql_query($sql2);

    while ($row2 = $db->sql_fetchrow($result2))
    {
       if ($auth->acl_get('f_read', $row2['forum_id']) == 1) {
          $template->assign_block_vars('topics_last', array(
             'LAST_LIN'      => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=" . $row2['forum_id'] . "&t=" . $row2['topic_id']),
             'LAST_TITOL'    => $row2['topic_title'],
          ));
       }
    }
    $db->sql_freeresult($result1);
    // FINE QUERY 10 ultime guide

il risultato effettivamente viene corretto nelle liste ma c'è un problema che potete vedere dalla sorgente dell'html della pagina che è qusto il pezzo interessato della tabella dove va l'output:

Codice: Seleziona tutto

<table width="100%">
			<tr>
				<td class="row1"><IMG SRC="/styles/supernova/template/portal/modules/immaginitp/ginuscita.png"></br><strong>Ultime Recensioni</strong></td>
				<td class="row1"><IMG SRC="/styles/supernova/template/portal/modules/immaginitp/ultimeguide.png"></br><strong>Ultime Guide</strong></td>
				<td class="row1"><IMG SRC="/styles/supernova/template/portal/modules/immaginitp/ginuscita.png"></br><strong>Giochi in uscita</strong></td>
			</tr>

			<tr>
				
				<td class="row1" style="width: 33%;" valign="top">
					<span class="gensmall">
					
					<a href="./viewtopic.php?f=2&t=2" title="Crysis 2">Crysis 2</a><br>
                  
					<a href="./viewtopic.php?f=2&t=1" title="Benvenuto su phpBB3">Benvenuto su phpBB3</a><br>
                  
					<a href="" title=""></a><br>
                  
					<a href="" title=""></a><br>
                                    
                   </span>

				</td>
				
				
				<td class="row1" style="width: 33%;" valign="top">
					<span class="gensmall">
					
					<a href="" title=""></a><br>
                  
					<a href="" title=""></a><br>
                  
					<a href="./viewtopic.php?f=3&t=4" title="prova 2">prova 2</a><br>
                  
					<a href="./viewtopic.php?f=3&t=3" title="prova">prova</a><br>
                                    
                   </span>

				</td>
				
				
				<td class="row1" style="width: 33%;" valign="top">
					<span class="gensmall">
					
					<a href="./viewtopic.php?f=2&t=2" title="Crysis 2">Crysis 2</a><br>
                  
					<a href="./viewtopic.php?f=2&t=1" title="Benvenuto su phpBB3">Benvenuto su phpBB3</a><br>
                  
					<a href="" title=""></a><br>
                  
					<a href="" title=""></a><br>
                                    
                   </span>

				</td>
				
			</tr>
			</table>


praticamente per ogni lista aggiunge sti cosi vuoti:

<a href="" title=""></a><br>

<a href="" title=""></a><br>

che in pratica lo vede come 2 spazi vuoti nella lista il che da fastidio.

Cosa ho sbagliato ?

nel template è tutto ok eccolo:

Codice: Seleziona tutto


<!-- IF .latest_announcements or .latest_hot_topics or .latest_topics -->
{$C_BLOCK_H_L}{$TITLE}{$C_BLOCK_H_R}
	<ul class="topiclist bg1">
		<li><dl>
			<dd style="border-left:0px; width:100%">
			<table width="100%">
			<tr>
				<td class="row1"><IMG SRC="/styles/supernova/template/portal/modules/immaginitp/ginuscita.png"></br><strong>Ultime Recensioni</strong></td>
				<td class="row1"><IMG SRC="/styles/supernova/template/portal/modules/immaginitp/ultimeguide.png"></br><strong>Ultime Guide</strong></td>
				<td class="row1"><IMG SRC="/styles/supernova/template/portal/modules/immaginitp/ginuscita.png"></br><strong>{L_PORTAL_RECENT_TOPIC}</strong></td>
			</tr>
			<tr>
				
				<td class="row1" style="width: 33%;" valign="top">
					<span class="gensmall">
					<!-- BEGIN topics_last -->
					<a href="{topics_last.LAST_LINK}" title="{topics_last.LAST_TITOLO}">{topics_last.LAST_TITOLO}</a><br>
                  <!-- END topics_last -->                  
                   </span>
				</td>
				
				
				<td class="row1" style="width: 33%;" valign="top">
					<span class="gensmall">
					<!-- BEGIN topics_last -->
					<a href="{topics_last.LAST_LIN}" title="{topics_last.LAST_TITOL}">{topics_last.LAST_TITOL}</a><br>
                  <!-- END topics_last -->                  
                   </span>
				</td>
				
				
				<td class="row1" style="width: 33%;" valign="top">
					<span class="gensmall">
					<!-- BEGIN topics_last -->
					<a href="{topics_last.LAST_LINK}" title="{topics_last.LAST_TITOLO}">{topics_last.LAST_TITOLO}</a><br>
                  <!-- END topics_last -->                  
                   </span>
				</td>
				
			</tr>
			</table>
			</dd>
		</dl></li>
	</ul>
{$C_BLOCK_F_L}{$C_BLOCK_F_R}
<!-- ENDIF -->

Re: problema liste con spazi vuoti

Inviato: 18/07/2011, 10:43
da chicks0315
scusate se faccio bump dell'argomento ma è abbastanza urgente in quanto non posso andare avanti per paura che mi sfasa il resto dello stile.

Re: problema liste con spazi vuoti

Inviato: 18/07/2011, 18:24
da pegasus81
Potresti creare un utente Test in modo da poter accedere al tuo sito e verificare il problema? Grazie.

Re: problema liste con spazi vuoti

Inviato: 18/07/2011, 18:41
da chicks0315
OK FATTO:

USERNAME: pegasus81
PASSOWRD: pegasus81

fammi sapere non so propio che fare.

Re: problema liste con spazi vuoti

Inviato: 18/07/2011, 18:56
da pegasus81
Il forum è quello indicato nel tuo profilo? Perchè se è quello, non mi fa accedere coi dati che mi hai passato.

Re: problema liste con spazi vuoti

Inviato: 18/07/2011, 18:59
da chicks0315
no sto utilizzando un sito di prova: http://www.webpapers.sc8.eu/portal.php

Re: problema liste con spazi vuoti

Inviato: 18/07/2011, 19:27
da pegasus81
Ecco l'errore:
chicks0315 ha scritto:

Codice: Seleziona tutto

// INIZIO - 10 giochi prossimi all'uscita
    $sql1 = "SELECT topic_id, forum_id, topic_title, topic_time, topic_moved_id, topic_first_poster_name
        FROM " . TOPICS_TABLE . "
        WHERE topic_type = 0
        AND topic_moved_id = 0
		AND forum_id = 2
        ORDER BY topic_time DESC LIMIT 0,10";
    $result1 = $db->sql_query($sql1);

    while ($row1 = $db->sql_fetchrow($result1))
    {
       if ($auth->acl_get('f_read', $row1['forum_id']) == 1) {
          $template->assign_block_vars('topics_last', array(
             'LAST_LINK'      => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=" . $row1['forum_id'] . "&t=" . $row1['topic_id']),
             'LAST_TITOLO'    => $row1['topic_title']
          ));
       }
    }
    $db->sql_freeresult($result1);
    // FINE QUERY 10 giochi in uscita
	
	
	// INIZIO - 10 ultime guide
    $sql2 = "SELECT topic_id, forum_id, topic_title, topic_time, topic_moved_id, topic_first_poster_name
        FROM " . TOPICS_TABLE . "
        WHERE topic_type = 0
        AND topic_moved_id = 0
		AND forum_id = 3
        ORDER BY topic_time DESC LIMIT 0,10";
    $result2 = $db->sql_query($sql2);

    while ($row2 = $db->sql_fetchrow($result2))
    {
       if ($auth->acl_get('f_read', $row2['forum_id']) == 1) {
          $template->assign_block_vars('topics_last', array(
             'LAST_LIN'      => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=" . $row2['forum_id'] . "&t=" . $row2['topic_id']),
             'LAST_TITOL'    => $row2['topic_title'],
          ));
       }
    }
    $db->sql_freeresult($result1);
    // FINE QUERY 10 ultime guide
Devi sostituire la penultima riga con:
$db->sql_freeresult($result2);

Re: problema liste con spazi vuoti

Inviato: 18/07/2011, 19:31
da chicks0315
lo avevo già fatto ma non va ancora vedi tu come lo vedi.

Re: problema liste con spazi vuoti

Inviato: 18/07/2011, 19:39
da pegasus81
Prova a utilizzare questo codice:

Codice: Seleziona tutto

    // INIZIO - 10 giochi prossimi all'uscita
        $sql1 = "SELECT topic_id, forum_id, topic_title, topic_time, topic_moved_id, topic_first_poster_name
            FROM " . TOPICS_TABLE . "
            WHERE topic_type = 0
            AND topic_moved_id = 0
          AND forum_id = 2
            ORDER BY topic_time DESC LIMIT 0,10";
        $result1 = $db->sql_query($sql1);

        while ($row1 = $db->sql_fetchrow($result1))
        {
           if ($auth->acl_get('f_read', $row1['forum_id']) == 2) {
              $template->assign_block_vars('topics_last', array(
                 'LAST_LINK'      => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=" . $row1['forum_id'] . "&t=" . $row1['topic_id']),
                 'LAST_TITOLO'    => $row1['topic_title']
              ));
           }
        }
        $db->sql_freeresult($result1);
        // FINE QUERY 10 giochi in uscita
       
       
       // INIZIO - 10 ultime guide
        $sql2 = "SELECT topic_id, forum_id, topic_title, topic_time, topic_moved_id, topic_first_poster_name
            FROM " . TOPICS_TABLE . "
            WHERE topic_type = 0
            AND topic_moved_id = 0
          AND forum_id = 3
            ORDER BY topic_time DESC LIMIT 0,10";
        $result2 = $db->sql_query($sql2);

        while ($row2 = $db->sql_fetchrow($result2))
        {
           if ($auth->acl_get('f_read', $row2['forum_id']) == 3) {
              $template->assign_block_vars('topics_last', array(
                 'LAST_LIN'      => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=" . $row2['forum_id'] . "&t=" . $row2['topic_id']),
                 'LAST_TITOL'    => $row2['topic_title'],
              ));
           }
        }
        $db->sql_freeresult($result1);
        // FINE QUERY 10 ultime guide

Re: problema liste con spazi vuoti

Inviato: 18/07/2011, 19:41
da chicks0315
non mi da nessun risultato cosi