Customizing SMF > Simpleportal

3 maneiras diferentes mostrar topicos recentes - bloco php

(1/1)

candidosa2:



PHP Personalizado Bloco


--- Código: ---global $scripturl, $settings, $context, $txt;

   

   $what = ssi_recentTopics('10', NULL, 'array');

   

   echo '

<table width="100%" style="border-collapse: collapse" id="table1">
    <tr>
        <td class="cat_bar"><div class="cat_bar"> <h3 class="catbg">
        &nbsp; Última 10 tópicos respondidos</h3><></td>
        <td class="cat_bar"><div class="cat_bar"><h3 class="catbg">
        &nbsp; Secção respondido</h3><></td>
        <td class="cat_bar" align="center"><div class="cat_bar"><h3 class="catbg">
        Enviado</h3><></td>
        <td class="cat_bar" align="center"><div class="cat_bar"><h3 class="catbg">
        História</h3><></td>
    </tr>
    ';



   foreach ($what as $topic)

   {
   echo '

    <tr>
        <td height="20">
        <img border="0" src="Themes/default/images/ok.png" width="16" height="12">&nbsp; ', $topic['link'];

     

      // Is this topic new? (assuming they are logged in!)

      if (!$topic['new'] && $context['user']['is_logged'])

         echo '

               <a href="', $scripturl, '?topic=', $topic['topic'], '.from', $topic['time'], '#new"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" border="0" /></a>';

           

      echo '</td>
        <td height="20">&nbsp; ', $topic['board']['link'], '</td>
        <td align="center" height="20">', $topic['poster']['link'], '</td>
        <td align="center" height="20">', $topic['time'], '</td>
       
';


   }



echo '

    </tr>
</table>
';
--- Fim de Código ---

candidosa2:








--- Código: ---
global $scripturl, $settings, $context, $txt;


   


   $what = ssi_recentTopics('10', NULL, 'array');


   


   echo '


<table width="100%" id="table1" style="border-collapse: collapse">
    <tr>
        <td class="cat_bar"><div class="cat_bar"> <h3 class="catbg">
        &nbsp; 10 respostas Último Postes</h3><></td>
        <td class="cat_bar">&nbsp;</td>
        <td class="cat_bar"><div class="cat_bar"><h3 class="catbg">
        &nbsp; Secção respondido</h3><></td>
        <td class="cat_bar">&nbsp;</td>
        <td class="cat_bar" align="center"><div class="cat_bar"><h3 class="catbg">
        Enviado</h3><></td>
        <td class="cat_bar" align="center">&nbsp;</td>
        <td class="cat_bar" align="center"><div class="cat_bar"><h3 class="catbg">
        História</h3><></td>
    </tr>
    ';






   foreach ($what as $topic)


   {
   echo '


    <tr>
        <td class="sbtson" height="20">
        <img border="0" src="Themes/default/images/ok.png" width="16" height="12">&nbsp; ', $topic['link'];


     


      // Is this topic new? (assuming they are logged in!)


      if (!$topic['new'] && $context['user']['is_logged'])


         echo '


               <a href="', $scripturl, '?topic=', $topic['topic'], '.from', $topic['time'], '#new"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" border="0" /></a>';


           


      echo '</td>
        <td class="sbtson5" height="20"></td>
        <td class="sbtson2" height="20">&nbsp; ', $topic['board']['link'], '</td>
        <td class="sbtson5" height="20"></td>
        <td class="sbtson3" align="center" height="20">', $topic['poster']['link'], '</td>
        <td class="sbtson5" align="center" height="20"></td>
        <td class="sbtson4" align="center" height="20">', $topic['time'], '</td>
       
';




   }






echo '


    </tr>
</table><br />
';

--- Fim de Código ---


Abrir o ficheiro index.css


Adicionar este codigo



--- Código: ---.sbtson {background: #DBE3F7;}
.sbtson2 {background: #E5E5E5;}
.sbtson3 {background: #FFE1FF;}
.sbtson4 {background: #E9F1AD;}
.sbtson5 {background: #F5F5F5; width: 2px}
--- Fim de Código ---

candidosa2:





--- Código: ---global $scripturl, $settings, $context, $txt;


   


   $what = ssi_recentTopics('10', NULL, 'array');


   


   echo '


<table width="100%" id="table1" style="border-collapse: collapse">
    <tr>
        <td class="sbtcat1"><h3>&nbsp; 10 respostas Último Post</h3></td>
        <td>&nbsp;</td>
        <td class="sbtcat2"><h3>&nbsp; Secção respondido</h3></td>
        <td>&nbsp;</td>
        <td class="sbtcat3" align="center"><h3>Enviado Por</h3></td>
        <td align="center">&nbsp;</td>
        <td class="sbtcat4" align="center"><h3>História</h3></td>
    </tr>
    ';






   foreach ($what as $topic)


   {
   echo '


    <tr>
        <td class="sbtson" height="20">
        <img border="0" src="Themes/default/images/ok.png" width="16" height="12">&nbsp; ', $topic['link'];


     


      // Is this topic new? (assuming they are logged in!)


      if (!$topic['new'] && $context['user']['is_logged'])


         echo '


               <a href="', $scripturl, '?topic=', $topic['topic'], '.from', $topic['time'], '#new"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" border="0" /></a>';


           


      echo '</td>
        <td class="sbtson5" height="20"></td>
        <td class="sbtson2" height="20">&nbsp; ', $topic['board']['link'], '</td>
        <td class="sbtson5" height="20"></td>
        <td class="sbtson3" align="center" height="20">', $topic['poster']['link'], '</td>
        <td class="sbtson5" align="center" height="20"></td>
        <td class="sbtson4" align="center" height="20">', $topic['time'], '</td>
       
';




   }






echo '


    </tr>
</table><br />
';
--- Fim de Código ---






Abrir o ficheiro index.css


Adiciona este codigo


--- Código: ---.sbtson {background: #DBE3F7;}
.sbtson2 {background: #E5E5E5;}
.sbtson3 {background: #FFE1FF;}
.sbtson4 {background: #E9F1AD;}
.sbtson5 {background: #F5F5F5; width: 2px}
.sbtcat1  h3{background: #456CD6; color: #ffffff; overflow: hidden; height: 24px; line-height: 28px; font-weight: bold;}
.sbtcat2  h3{background: #707070; color: #ffffff; overflow: hidden; height: 24px; line-height: 28px; font-weight: bold;}
.sbtcat3  h3{background: #E600E6; color: #ffffff; overflow: hidden; height: 24px; line-height: 28px; font-weight: bold;}
.sbtcat4  h3{background: #6A7614; color: #ffffff; overflow: hidden; height: 24px; line-height: 28px; font-weight: bold;}
--- Fim de Código ---

Navegação

[0] Índice de mensagens

Ir para versão completa