Autor Tópico: 3 maneiras diferentes mostrar topicos recentes - bloco php  (Lida 4878 vezes)

0 Membros e 2 Visitantes estão a ver este tópico.

Offline candidosa2

  • Suporte Tecnico
  • Fundador
  • *
  • Mensagens: 5072
  • Rank: 1658
  • Sexo: Masculino
  • Suporte
    • Hosting Moçambique
3 maneiras diferentes mostrar topicos recentes - bloco php
« em: 26 de Agosto de 2013, 22:47 »



PHP Personalizado Bloco

Código: [Seleccione]
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>
';


Offline candidosa2

  • Suporte Tecnico
  • Fundador
  • *
  • Mensagens: 5072
  • Rank: 1658
  • Sexo: Masculino
  • Suporte
    • Hosting Moçambique
Re: 3 maneiras diferentes mostrar topicos recentes - bloco php
« Responder #1 em: 26 de Agosto de 2013, 23:07 »







Código: [Seleccione]

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 />
';


Abrir o ficheiro index.css


Adicionar este codigo


Código: [Seleccione]
.sbtson {background: #DBE3F7;}
.sbtson2 {background: #E5E5E5;}
.sbtson3 {background: #FFE1FF;}
.sbtson4 {background: #E9F1AD;}
.sbtson5 {background: #F5F5F5; width: 2px}

Offline candidosa2

  • Suporte Tecnico
  • Fundador
  • *
  • Mensagens: 5072
  • Rank: 1658
  • Sexo: Masculino
  • Suporte
    • Hosting Moçambique
Re: 3 maneiras diferentes mostrar topicos recentes - bloco php
« Responder #2 em: 26 de Agosto de 2013, 23:14 »




Código: [Seleccione]
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 />
';






Abrir o ficheiro index.css


Adiciona este codigo

Código: [Seleccione]
.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;}