Pagina 2 di 5 primaprima 1 2 3 4 ... ultimoultimo
Visualizzazione dei risultati da 11 a 20 su 42
  1. #11
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    1,805
    no io di config ne uso uno solament e lo uso per i parametri di connessione
    Non è tanto importante saper fare,quanto ad avere voglia d imparare .

  2. #12
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    1,805
    help come posso assegniare ad ogni td la posizione ti spiego nel tpl sto facendo cosi
    codice:
    <table id='helptable'  cellpadding='0' cellspacing='0'>
      <tr>
        <td>
       <table id='contenutitexticone'>
        <tr>
          <td id='iconticket'> <a href ="{$path_site}/{$path_content}/index.php" target="_parent">[img]{$path_site}/immagini/{$img_icon}.gif[/img]</a> </td>
          <td id='titlemessage'><a href ="{$path_site}/{$path_content}/index.php" target="_parent">{$title_content}</a>
    <span class='smalltext'>{$descrict_content}</span> </td>
        </tr>
      </table>
        
        </td>
        <td>
        
     <table id='contenutitexticone'>
        <tr>
          <td id='iconticket'> <a href ="{$path_site}/{$path_content}/index.php" target="_parent">[img]{$path_site}/immagini/{$img_icon}.gif[/img]</a> </td>
          <td id='titlemessage'><a href ="{$path_site}/{$path_content}/index.php" target="_parent">{$title_content}</a>
    <span class='smalltext'>{$descrict_content}</span> </td>
         </tr>
     </table>
        
     
        </td>
     </tr>
     <tr>
       <td>

    e il php cosi
    Codice PHP:
    $caric_blocks_home mysql_query("select  * from blocks_home where posizione ='4'  and enable ='1' limit 1");
    while(
    $array=mysql_fetch_array($caric_blocks_home)){
    $smarty->assign("img_icon","".$array['img']."" );
    $smarty->assign("path_content","".$array['path']."");
    $smarty->assign("title_content",constant("".$array['nome'].""));
    $smarty->assign("descrict_content",constant("".$array['description'].""));
    }

    $caric_blocks_home mysql_query("select  * from blocks_home where posizione ='5'  and enable ='1' limit 1");
    while(
    $array=mysql_fetch_array($caric_blocks_home)){
    $smarty->assign("img_icon","".$array['img']."" );
    $smarty->assign("path_content","".$array['path']."");
    $smarty->assign("title_content",constant("".$array['nome'].""));
    $smarty->assign("descrict_content",constant("".$array['description'].""));
    }

    $caric_blocks_home mysql_query("select  * from blocks_home where posizione ='6'  and enable ='1' limit 1");
    while(
    $array=mysql_fetch_array($caric_blocks_home)){
    $smarty->assign("img_icon","".$array['img']."" );
    $smarty->assign("path_content","".$array['path']."");
    $smarty->assign("title_content",constant("".$array['nome'].""));
    $smarty->assign("descrict_content",constant("".$array['description'].""));


    e mi ede le stesse immagini dovrei identificarle per posizione
    Non è tanto importante saper fare,quanto ad avere voglia d imparare .

  3. #13
    Utente di HTML.it L'avatar di Gab-81
    Registrato dal
    Nov 2005
    Messaggi
    558
    Prova a cambiare il nome di $caric_blocks_home; a volte in PHP si hanno problemi nel sovrascrivere variabili già usate...oppure fai un unset($carc_blocks_home) prima che la riusi...

  4. #14
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    1,805
    ciao mi faresti un esempio di come unsettare le variabili ma poi vedevo da altri lavori che nel template potrei mettere un lavoro tipo {if $posizione ==1}{/if} ho provato a passare la posizione ma niente da fare
    Non è tanto importante saper fare,quanto ad avere voglia d imparare .

  5. #15
    Utente di HTML.it L'avatar di Gab-81
    Registrato dal
    Nov 2005
    Messaggi
    558
    Codice PHP:
    $caric_blocks_home mysql_query("select  * from blocks_home where posizione ='4'  and enable ='1' limit 1");
    while(
    $array=mysql_fetch_array($caric_blocks_home)){
    $smarty->assign("img_icon","".$array['img']."" );
    $smarty->assign("path_content","".$array['path']."");
    $smarty->assign("title_content",constant("".$array['nome'].""));
    $smarty->assign("descrict_content",constant("".$array['description'].""));
    }
    unset(
    $caric_blocks_home);
    $caric_blocks_home mysql_query("select  * from blocks_home where posizione ='5'  and enable ='1' limit 1");
    while(
    $array=mysql_fetch_array($caric_blocks_home)){
    $smarty->assign("img_icon","".$array['img']."" );
    $smarty->assign("path_content","".$array['path']."");
    $smarty->assign("title_content",constant("".$array['nome'].""));
    $smarty->assign("descrict_content",constant("".$array['description'].""));
    }
    unset(
    $caric_blocks_home);
    $caric_blocks_home mysql_query("select  * from blocks_home where posizione ='6'  and enable ='1' limit 1");
    while(
    $array=mysql_fetch_array($caric_blocks_home)){
    $smarty->assign("img_icon","".$array['img']."" );
    $smarty->assign("path_content","".$array['path']."");
    $smarty->assign("title_content",constant("".$array['nome'].""));
    $smarty->assign("descrict_content",constant("".$array['description'].""));


    Per usare if, prova a fare

    {if $posizione eq "1"}
    ...
    {/if}

    Il confronto tra stringhe e non interi...il parametro è passato come stringa...


  6. #16
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    1,805
    grazie ma non riesco a apire metto cosi
    {if $posizione eq "1"}
    <table id='contenutitexticone'>
    <tr>
    <td id='iconticket'> <a href ="{$path_site}/{$path_content}index.php" target="_parent">[img]{$path_site}/immagini/{$img_icon}.gif[/img]</a> </td>
    <td id='titlemessage'><a href ="{$path_site}/{$path_content}index.php" target="_parent">{$title_content}</a>
    <span class='smalltext'>{$descrict_content}</span> </td>
    </tr>
    </table>
    {/if}
    e scompare
    Non è tanto importante saper fare,quanto ad avere voglia d imparare .

  7. #17
    Utente di HTML.it L'avatar di Gab-81
    Registrato dal
    Nov 2005
    Messaggi
    558
    Originariamente inviato da rocco.mod
    grazie ma non riesco a apire metto cosi
    {if $posizione eq "1"}
    <table id='contenutitexticone'>
    <tr>
    <td id='iconticket'> <a href ="{$path_site}/{$path_content}index.php" target="_parent">[img]{$path_site}/immagini/{$img_icon}.gif[/img]</a> </td>
    <td id='titlemessage'><a href ="{$path_site}/{$path_content}index.php" target="_parent">{$title_content}</a>
    <span class='smalltext'>{$descrict_content}</span> </td>
    </tr>
    </table>
    {/if}
    e scompare
    Cosa scompare? Ma prima si vede qualcosa?

  8. #18
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    1,805
    ora mi vede solo uno che sarebbe l ultimo che carica
    codice:
    <table id='helptable'   cellpadding='0' cellspacing='0'>
      <tr>
        <td>
    {if $posizione == "1"}
      <table id='contenutitexticone'>
        <tr>
          <td id='iconticket'> <a href ="{$path_site}/{$path_content}index.php" target="_parent">[img]{$path_site}/immagini/{$img_icon}.gif[/img]</a> </td>
          <td id='titlemessage'><a href ="{$path_site}/{$path_content}index.php" target="_parent">{$title_content}</a>
    <span class='smalltext'>{$descrict_content}</span> </td>
        </tr>
      </table>
    {/if}
        </td>
        <td>
    
    {if $posizione == "2"}
     <table id='contenutitexticone'>
        <tr>
          <td id='iconticket'> <a href ="{$path_site}/{$path_content}index.php" target="_parent">[img]{$path_site}/immagini/{$img_icon}.gif[/img]</a> </td>
          <td id='titlemessage'><a href ="{$path_site}/{$path_content}index.php" target="_parent">{$title_content}</a>
    <span class='smalltext'>{$descrict_content}</span> </td>
         </tr>
     </table>
    {/if}
     
        </td>
     </tr>
     <tr>
       <td>
    {if $posizione == "3"}
    <table id='contenutitexticone'>
       <tr>
         <td id='iconticket'> <a href ="{$path_site}/{$path_content}index.php" target="_parent">[img]{$path_site}/immagini/{$img_icon}.gif[/img]</a> </td>
          <td id='titlemessage'><a href ="{$path_site}/{$path_content}index.php" target="_parent">{$title_content}</a>
    <span class='smalltext'>{$descrict_content}</span> </td>
        </tr>
    </table>
    {/if}
       </td>
       <td>
    {if $posizione == "4"}
    <table id='contenutitexticone'>
       <tr>
         <td id='iconticket'> <a href ="{$path_site}/{$path_content}index.php" target="_parent">[img]{$path_site}/immagini/{$img_icon}.gif[/img]</a> </td>
          <td id='titlemessage'><a href ="{$path_site}/{$path_content}index.php" target="_parent">{$title_content}</a>
    <span class='smalltext'>{$descrict_content}</span> </td>
        </tr>
    </table>
    {/if}
       </td>
     </tr>
      <tr>
       <td>
    {if $posizione == "5"}
    <table id='contenutitexticone'>
       <tr>
         <td id='iconticket'> <a href ="{$path_site}/{$path_content}index.php" target="_parent">[img]{$path_site}/immagini/{$img_icon}.gif[/img]</a> </td>
          <td id='titlemessage'><a href ="{$path_site}/{$path_content}index.php" target="_parent">{$title_content}</a>
    <span class='smalltext'>{$descrict_content}</span> </td>
        </tr>
    </table>
    {/if}
       </td>
       <td>
    {if $posizione == "6"}
    <table id='contenutitexticone'>
       <tr>
        <td id='iconticket'> <a href ="{$path_site}/{$path_content}index.php" target="_parent">[img]{$path_site}/immagini/{$img_icon}.gif[/img]</a> </td>
          <td id='titlemessage'><a href ="{$path_site}/{$path_content}index.php" target="_parent">{$title_content}</a>
    <span class='smalltext'>{$descrict_content}</span> </td>
        </tr>
    </table>
    {/if}
    </td>
     </tr>
     <tr>
       <td></td>
       <td></td>
     </tr>
    </table>
    
        </td>
      </tr>
    </table>
    Codice PHP:
    if($autorizzato==1){
    $caric_blocks_home mysql_query("select  * from blocks_home where posizione ='1' and permission='2' and enable ='1' limit 1");
    while(
    $array=mysql_fetch_array($caric_blocks_home)){
    $posizione $array['posizione'];
    $smarty->assign("posizione","$posizione);
    $smarty->assign("img_icon","".$array['img']."" );
    $smarty->assign("path_content","".$array['path']."");
    $smarty->assign("title_content",constant("".$array['nome'].""));
    $smarty->assign("descrict_content",constant("".$array['description'].""));


    }
    }
    else
    {
    $caric_blocks_home mysql_query("select  * from blocks_home where posizione ='1' and permission='1' and enable ='1' limit 1");
    while(
    $array=mysql_fetch_array($caric_blocks_home)){
    $posizione $array['posizione'];
    $smarty->assign("posizione","$posizione);
    $smarty->assign("img_icon","".$array['img']."" );
    $smarty->assign("path_content","".$array['path']."");
    $smarty->assign("title_content",constant("".$array['nome'].""));
    $smarty->assign("descrict_content",constant("".$array['description'].""));
    }
    }
    unset(
    $caric_blocks_home); 
    $caric_blocks_home mysql_query("select  * from blocks_home where posizione ='3'  and enable ='1' limit 1");
    while(
    $array=mysql_fetch_array($caric_blocks_home)){
    $posizione $array['posizione'];
    $smarty->assign("posizione","$posizione);
    $smarty->assign("img_icon","".$array['img']."" );
    $smarty->assign("path_content","".$array['path']."");
    $smarty->assign("title_content",constant("".$array['nome'].""));
    $smarty->assign("descrict_content",constant("".$array['description'].""));

    }

    unset(
    $caric_blocks_home); 
    $caric_blocks_home mysql_query("select  * from blocks_home where posizione ='4'  and enable ='1' limit 1");
    while(
    $array=mysql_fetch_array($caric_blocks_home)){
    $posizione $array['posizione'];
    $smarty->assign("posizione","$posizione);
    $smarty->assign("img_icon","".$array['img']."" );
    $smarty->assign("path_content","".$array['path']."");
    $smarty->assign("title_content",constant("".$array['nome'].""));
    $smarty->assign("descrict_content",constant("".$array['description'].""));

    }
    unset(
    $caric_blocks_home); 
    $caric_blocks_home mysql_query("select  * from blocks_home where posizione ='5'  and enable ='1' limit 1");
    while(
    $array=mysql_fetch_array($caric_blocks_home)){
    $posizione $array['posizione'];
    $smarty->assign("posizione","$posizione);
    $smarty->assign("img_icon","".$array['img']."" );
    $smarty->assign("path_content","".$array['path']."");
    $smarty->assign("title_content",constant("".$array['nome'].""));
    $smarty->assign("descrict_content",constant("".$array['description'].""));

    }
    unset(
    $caric_blocks_home); 
    $caric_blocks_home mysql_query("select  * from blocks_home where posizione ='6'  and enable ='1' limit 1");
    while(
    $array=mysql_fetch_array($caric_blocks_home)){
    $posizione $array['posizione'];
    $smarty->assign("posizione","$posizione);
    $smarty->assign("img_icon","".$array['img']."" );
    $smarty->assign("path_content","".$array['path']."");
    $smarty->assign("title_content",constant("".$array['nome'].""));
    $smarty->assign("descrict_content",constant("".$array['description'].""));


    Non è tanto importante saper fare,quanto ad avere voglia d imparare .

  9. #19
    Utente di HTML.it L'avatar di Gab-81
    Registrato dal
    Nov 2005
    Messaggi
    558
    Certo!!! Scusa ma non me ne ero accorto...quando fai $smarty->assign(...) nel ramo else, assegni alle stesse variabili tre valori, SOVREASCRIVENDOLI ogni volta. Dovresti usare variabili diversi o metterli in un array ed usare il costrutto {foreach} in smarty...

  10. #20
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    1,805
    ti dispiacerebbe fare un esempio
    Non è tanto importante saper fare,quanto ad avere voglia d imparare .

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.