Boas-vindas ao Power Pixel

Junte-se a comunidade! Crie o seu próprio conteúdo, e faça amizades.EntrarCriar uma conta

Tópico quente.

3 participantes

Phill Lima Phill Lima  • Qua 12 Mar 2014 - 7:23

Tópico quente. Empty Tópico quente. Qua 12 Mar 2014 - 7:23

Qual é minha questão:
Pessoal, segui o tutorial do Daemon: [Tens de ter uma conta e sessão iniciada para poderes visualizar este link]

Só que o meu template é editado, alguém pode me ajudar a colocar para funcionar no meu?

Meu topiclist box
Código:
<!-- BEGIN topics_list_box -->
<!-- BEGIN row -->
<!-- BEGIN header_table -->
   <!-- BEGIN multi_selection -->
      <script type="text/javascript">
      function check_uncheck_main_{topics_list_box.row.header_table.BOX_ID}() {
         var all_checked = true;
         for (i = 0; (i < document.{topics_list_box.FORMNAME}.elements.length) && all_checked; i++) {
         if (document.{topics_list_box.FORMNAME}.elements[i].name == '{topics_list_box.FIELDNAME}[]{topics_list_box.row.header_table.BOX_ID}') {
            all_checked = document.{topics_list_box.FORMNAME}.elements[i].checked;
         }
         }
         document.{topics_list_box.FORMNAME}.all_mark_{topics_list_box.row.header_table.BOX_ID}.checked = all_checked;
      }
      function check_uncheck_all_{topics_list_box.row.header_table.BOX_ID}() {
         for (i = 0; i < document.{topics_list_box.FORMNAME}.length; i++) {
         if (document.{topics_list_box.FORMNAME}.elements[i].name == '{topics_list_box.FIELDNAME}[]{topics_list_box.row.header_table.BOX_ID}') {
            document.{topics_list_box.FORMNAME}.elements[i].checked = document.{topics_list_box.FORMNAME}.all_mark_{topics_list_box.row.header_table.BOX_ID}.checked;
         }
         }
      }
      </script>
   <!-- END multi_selection -->

   <div class="main-head">
      <!-- BEGIN multi_selection -->
      <input onclick="check_uncheck_all_{topics_list_box.row.header_table.BOX_ID}();" type="checkbox" name="all_mark_{topics_list_box.row.header_table.BOX_ID}" value="0" />
      <!-- END multi_selection -->
      <h1 class="page-title">{topics_list_box.row.L_TITLE} [{topics_list_box.row.COUNT_TOTAL_TOPICS}]</h1>
   </div>
   <div class="main-content">
   <table cellspacing="0" class="table">
      <tbody class="statused">
<!-- END header_table -->

<!-- BEGIN header_row -->
<strong>{topics_list_box.row.L_TITLE}</strong>
<!-- END header_row -->

<!-- BEGIN topic -->
   <!-- BEGIN table_sticky -->
      </tbody>
   </table>
   </div>

   <div class="main-head">
      <!-- BEGIN multi_selection -->
      <input onclick="check_uncheck_all_{topics_list_box.row.header_table.BOX_ID}();" type="checkbox" name="all_mark_{topics_list_box.row.header_table.BOX_ID}" value="0" /   >
      <!-- END multi_selection -->
      <h2>{topics_list_box.row.topic.table_sticky.L_TITLE} [{topics_list_box.row.topic.table_sticky.COUNT_TOTAL_TOPICS}]</h2>
   </div>
   <div class="main-content">
   <table cellspacing="0" class="table">
      <tbody class="statused">
   <!-- END table_sticky -->
         <td class="tcl tdtopics <!-- BEGIN line_sticky --> sticky-separator <!-- END line_sticky -->">
                                <span class="stats">
               <img title="{topics_list_box.row.L_TOPIC_FOLDER_ALT}" src="{topics_list_box.row.TOPIC_FOLDER_IMG}" alt="{topics_list_box.row.L_TOPIC_FOLDER_ALT}" />
            </span>
            <!-- BEGIN single_selection -->
            <input type="radio" name="{topics_list_box.FIELDNAME}" value="{topics_list_box.row.FID}" {topics_list_box.row.L_SELECT} /> 
            <!-- END single_selection -->
            {topics_list_box.row.ICON} 
            {topics_list_box.row.NEWEST_POST_IMG}
            {topics_list_box.row.PARTICIPATE_POST_IMG} 
            {topics_list_box.row.TOPIC_TYPE} 
            <h2 class="topic-title"><a class="topictitle" href="{topics_list_box.row.U_VIEW_TOPIC}">{topics_list_box.row.TOPIC_TITLE}</a></h2> 
            {topics_list_box.row.GOTO_OPEN} {topics_list_box.row.GOTO_PAGE_NEW} {topics_list_box.row.GOTO_CLOSE} 
                 {topics_list_box.row.L_BY} {topics_list_box.row.TOPIC_AUTHOR}
            <!-- BEGIN switch_description -->
            <br />
             {topics_list_box.row.topic.switch_description.TOPIC_DESCRIPTION}
            <!-- END switch_description -->
         </td>
                  <td class="tc2"></td>
                  <td class="tc3 <!-- BEGIN line_sticky --> sticky-separator <!-- END line_sticky -->">{topics_list_box.row.REPLIES} respostas<br />{topics_list_box.row.VIEWS} visualizações</td>
                  <td class="tcr <!-- BEGIN line_sticky --> sticky-separator <!-- END line_sticky -->">{topics_list_box.row.L_BY} {topics_list_box.row.LAST_POST_AUTHOR}<br />{topics_list_box.row.LAST_POST_TIME} {topics_list_box.row.LAST_POST_IMG}</td>
         <!-- BEGIN multi_selection -->
         <td><input onclick="javascript:check_uncheck_main_{topics_list_box.row.BOX_ID}();" type="checkbox" name="{topics_list_box.FIELDNAME}[]{topics_list_box.row.BOX_ID}" value="{topics_list_box.row.FID}" {topics_list_box.row.L_SELECT} /></td>
         <!-- END multi_selection -->
      </tr>
<!-- END topic -->
<!-- BEGIN no_topics -->
<tr>
   <td class="tcl" colspan="4"><strong>{topics_list_box.row.L_NO_TOPICS}</strong></td>
</tr>
<!-- END no_topics -->

<!-- BEGIN bottom -->
      </tbody>
   </table>
   </div>
   <div class="main-foot clearfix">
      <!-- BEGIN multi_selection -->
      <input onclick="check_uncheck_all_{topics_list_box.row.header_table.BOX_ID}();" type="checkbox" name="all_mark_{topics_list_box.row.header_table.BOX_ID}" value="0" />
      <!-- END multi_selection -->
      <p class="h2">{L_TOPICS} [{topics_list_box.row.bottom.COUNT_TOTAL_TOPICS}]</p>
      <p class="options">
         <a href="{U_MARK_READ}">{L_MARK_TOPICS_READ}</a> {S_WATCH_FORUM}&nbsp;<a href="#top">{L_BACK_TO_TOP}</a>
      </p>
   </div>
<!-- END bottom -->
<!-- BEGIN spacer --><br /><!-- END spacer -->
<!-- END row -->
<!-- END topics_list_box -->

Endereço do meu fórum:
[Tens de ter uma conta e sessão iniciada para poderes visualizar este link]

Versão:
PunBB

Phill Lima Phill Lima  • Qui 13 Mar 2014 - 7:52

Tópico quente. Empty Re: Tópico quente. Qui 13 Mar 2014 - 7:52

Ap

B4N3 B4N3  • Sáb 15 Mar 2014 - 0:19

Tópico quente. Empty Re: Tópico quente. Sáb 15 Mar 2014 - 0:19

utilizando o mesmo codigo do topico do daemon
só troque o template do topic_list por este!

Código:
<!-- BEGIN topics_list_box -->
<!-- BEGIN row -->
<!-- BEGIN header_table -->
  <!-- BEGIN multi_selection -->
      <script type="text/javascript">
      function check_uncheck_main_{topics_list_box.row.header_table.BOX_ID}() {
        var all_checked = true;
        for (i = 0; (i < document.{topics_list_box.FORMNAME}.elements.length) && all_checked; i++) {
        if (document.{topics_list_box.FORMNAME}.elements[i].name == '{topics_list_box.FIELDNAME}[]{topics_list_box.row.header_table.BOX_ID}') {
            all_checked = document.{topics_list_box.FORMNAME}.elements[i].checked;
        }
        }
        document.{topics_list_box.FORMNAME}.all_mark_{topics_list_box.row.header_table.BOX_ID}.checked = all_checked;
      }
      function check_uncheck_all_{topics_list_box.row.header_table.BOX_ID}() {
        for (i = 0; i < document.{topics_list_box.FORMNAME}.length; i++) {
        if (document.{topics_list_box.FORMNAME}.elements[i].name == '{topics_list_box.FIELDNAME}[]{topics_list_box.row.header_table.BOX_ID}') {
            document.{topics_list_box.FORMNAME}.elements[i].checked = document.{topics_list_box.FORMNAME}.all_mark_{topics_list_box.row.header_table.BOX_ID}.checked;
        }
        }
      }
      </script>
  <!-- END multi_selection -->

  <div class="main-head">
      <!-- BEGIN multi_selection -->
      <input onclick="check_uncheck_all_{topics_list_box.row.header_table.BOX_ID}();" type="checkbox" name="all_mark_{topics_list_box.row.header_table.BOX_ID}" value="0" />
      <!-- END multi_selection -->
      <h1 class="page-title">{topics_list_box.row.L_TITLE} [{topics_list_box.row.COUNT_TOTAL_TOPICS}]</h1>
  </div>
  <div class="main-content">
  <table cellspacing="0" class="table">
      <tbody class="statused">
<!-- END header_table -->

<!-- BEGIN header_row -->
<strong>{topics_list_box.row.L_TITLE}</strong>
<!-- END header_row -->

<!-- BEGIN topic -->
  <!-- BEGIN table_sticky -->
      </tbody>
  </table>
  </div>

  <div class="main-head">
      <!-- BEGIN multi_selection -->
      <input onclick="check_uncheck_all_{topics_list_box.row.header_table.BOX_ID}();" type="checkbox" name="all_mark_{topics_list_box.row.header_table.BOX_ID}" value="0" /  >
      <!-- END multi_selection -->
      <h2>{topics_list_box.row.topic.table_sticky.L_TITLE} [{topics_list_box.row.topic.table_sticky.COUNT_TOTAL_TOPICS}]</h2>
  </div>
  <div class="main-content">
  <table cellspacing="0" class="table">
      <tbody class="statused">
  <!-- END table_sticky -->
        <td class="tcl tdtopics <!-- BEGIN line_sticky --> sticky-separator <!-- END line_sticky -->">
                                <span class="stats">
              <img title="{topics_list_box.row.L_TOPIC_FOLDER_ALT}" src="{topics_list_box.row.TOPIC_FOLDER_IMG}" alt="{topics_list_box.row.L_TOPIC_FOLDER_ALT}" />
            </span>
            <!-- BEGIN single_selection -->
            <input type="radio" name="{topics_list_box.FIELDNAME}" value="{topics_list_box.row.FID}" {topics_list_box.row.L_SELECT} />
            <!-- END single_selection -->
            {topics_list_box.row.ICON}
            {topics_list_box.row.NEWEST_POST_IMG}
            {topics_list_box.row.PARTICIPATE_POST_IMG}
            {topics_list_box.row.TOPIC_TYPE}
            <h2 class="topic-title"><a class="topictitle" href="{topics_list_box.row.U_VIEW_TOPIC}">{topics_list_box.row.TOPIC_TITLE}</a></h2>
            {topics_list_box.row.GOTO_OPEN} {topics_list_box.row.GOTO_PAGE_NEW} {topics_list_box.row.GOTO_CLOSE}
                {topics_list_box.row.L_BY} {topics_list_box.row.TOPIC_AUTHOR}
            <!-- BEGIN switch_description -->
            <br />
            {topics_list_box.row.topic.switch_description.TOPIC_DESCRIPTION}
            <!-- END switch_description -->
        </td>
                  <td class="tc2"></td>
                  <td class="tc3 <!-- BEGIN line_sticky --> sticky-separator <!-- END line_sticky -->">{topics_list_box.row.REPLIES} respostas<br />{topics_list_box.row.VIEWS} visualizações<br/><span class="hot_topic">Quente</span></td>
                  <td class="tcr <!-- BEGIN line_sticky --> sticky-separator <!-- END line_sticky -->">{topics_list_box.row.L_BY} {topics_list_box.row.LAST_POST_AUTHOR}<br />{topics_list_box.row.LAST_POST_TIME} {topics_list_box.row.LAST_POST_IMG}</td>
        <!-- BEGIN multi_selection -->
        <td><input onclick="javascript:check_uncheck_main_{topics_list_box.row.BOX_ID}();" type="checkbox" name="{topics_list_box.FIELDNAME}[]{topics_list_box.row.BOX_ID}" value="{topics_list_box.row.FID}" {topics_list_box.row.L_SELECT} /></td>
        <!-- END multi_selection -->
      </tr>
<!-- END topic -->
<!-- BEGIN no_topics -->
<tr>
  <td class="tcl" colspan="4"><strong>{topics_list_box.row.L_NO_TOPICS}</strong></td>
</tr>
<!-- END no_topics -->

<!-- BEGIN bottom -->
      </tbody>
  </table>
  </div>
  <div class="main-foot clearfix">
      <!-- BEGIN multi_selection -->
      <input onclick="check_uncheck_all_{topics_list_box.row.header_table.BOX_ID}();" type="checkbox" name="all_mark_{topics_list_box.row.header_table.BOX_ID}" value="0" />
      <!-- END multi_selection -->
      <p class="h2">{L_TOPICS} [{topics_list_box.row.bottom.COUNT_TOTAL_TOPICS}]</p>
      <p class="options">
        <a href="{U_MARK_READ}">{L_MARK_TOPICS_READ}</a> {S_WATCH_FORUM} <a href="#top">{L_BACK_TO_TOP}</a>
      </p>
  </div>
<!-- END bottom -->
<!-- BEGIN spacer --><br /><!-- END spacer -->
<!-- END row -->
<!-- END topics_list_box -->

Resultado:[Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]
Avisa se resolver

Phill Lima Phill Lima  • Sáb 15 Mar 2014 - 1:21

Tópico quente. Empty Re: Tópico quente. Sáb 15 Mar 2014 - 1:21

Show Bane, o problema é que colocou em todos, até nos que tinham 0 resposta, mas, tinham 20 visualizações...

eu desativei lá para não ficar estranho...

Phill Lima Phill Lima  • Sáb 15 Mar 2014 - 10:24

Tópico quente. Empty Re: Tópico quente. Sáb 15 Mar 2014 - 10:24

E awe pessoal, alguém?

B4N3 B4N3  • Sáb 15 Mar 2014 - 11:44

Tópico quente. Empty Re: Tópico quente. Sáb 15 Mar 2014 - 11:44

Phill Lima escreveu:E awe pessoal, alguém?


vc ativou o javascript do tutorial do daemon?
veja la no painel o valor que um topico deve ter pra ser popular.. e modifique ao se gosto.. tanto no painel quando no javascrip!

Phill Lima Phill Lima  • Sáb 15 Mar 2014 - 11:53

Tópico quente. Empty Re: Tópico quente. Sáb 15 Mar 2014 - 11:53

eu deixei normal em 3, depois editei e coloquei 10, mesmo assim continuou todos marcados como quente, aé o que não tinham nenhuma resposta, o que pode ser?

há, quando desativei o script ele continuou, como se estivesse no css mesmo, independente do script

Phill Lima Phill Lima  • Sáb 15 Mar 2014 - 12:02

Tópico quente. Empty Re: Tópico quente. Sáb 15 Mar 2014 - 12:02

B4n3, deixei ativado no meu fórum de teste... se ajudar olha: [Tens de ter uma conta e sessão iniciada para poderes visualizar este link]

Phill Lima Phill Lima  • Seg 17 Mar 2014 - 11:45

Tópico quente. Empty Re: Tópico quente. Seg 17 Mar 2014 - 11:45

UP

[S]herlock H. [S]herlock H.  • Seg 17 Mar 2014 - 13:46

Tópico quente. Empty Re: Tópico quente. Seg 17 Mar 2014 - 13:46

Veja este tópico:
[Tens de ter uma conta e sessão iniciada para poderes visualizar este link]

Phill Lima Phill Lima  • Seg 17 Mar 2014 - 15:43

Tópico quente. Empty Re: Tópico quente. Seg 17 Mar 2014 - 15:43

O tópico que você linkou não tem solução

[S]herlock H. [S]herlock H.  • Seg 17 Mar 2014 - 16:41

Tópico quente. Empty Re: Tópico quente. Seg 17 Mar 2014 - 16:41

Desculpe amigão!
Expliquei errado, veja esta mensagem (mesmo que não seja o mesmo template, tente, só para ser um teste).
[S]herlock H. escreveu:Saudações!

Tente este amigo!:
Código:

<!-- BEGIN topics_list_box -->
<!-- BEGIN row -->
<!-- BEGIN header_table -->
  <!-- BEGIN multi_selection -->
     <script type="text/javascript">
     function check_uncheck_main_{topics_list_box.row.header_table.BOX_ID}() {
        var all_checked = true;
        for (i = 0; (i < document.{topics_list_box.FORMNAME}.elements.length) && all_checked; i++) {
        if (document.{topics_list_box.FORMNAME}.elements[i].name == '{topics_list_box.FIELDNAME}[]{topics_list_box.row.header_table.BOX_ID}') {
           all_checked = document.{topics_list_box.FORMNAME}.elements[i].checked;
        }
        }
        document.{topics_list_box.FORMNAME}.all_mark_{topics_list_box.row.header_table.BOX_ID}.checked = all_checked;
     }
     function check_uncheck_all_{topics_list_box.row.header_table.BOX_ID}() {
        for (i = 0; i < document.{topics_list_box.FORMNAME}.length; i++) {
        if (document.{topics_list_box.FORMNAME}.elements[i].name == '{topics_list_box.FIELDNAME}[]{topics_list_box.row.header_table.BOX_ID}') {
           document.{topics_list_box.FORMNAME}.elements[i].checked = document.{topics_list_box.FORMNAME}.all_mark_{topics_list_box.row.header_table.BOX_ID}.checked;
        }
        }
     }
     </script>
  <!-- END multi_selection -->
<div class="topme"><!-- BEGIN multi_selection -->
     <input onclick="check_uncheck_all_{topics_list_box.row.header_table.BOX_ID}();" type="checkbox" name="all_mark_{topics_list_box.row.header_table.BOX_ID}" value="0" />
     <!-- END multi_selection -->
     <h1 class="page-title">{L_TOPICS} [{topics_list_box.row.COUNT_TOTAL_TOPICS}]</h1>
     <p class="options">
        <a href="{U_MARK_READ}">{L_MARK_TOPICS_READ}</a> {S_WATCH_FORUM} <a href="#top">{L_BACK_TO_TOP}</a>
 </p></div>
                 <div class="main-content">
  <table cellspacing="0" class="table">
     
     <tbody class="statused">
<!-- END header_table -->

<!-- BEGIN header_row -->
<strong>{topics_list_box.row.L_TITLE}</strong>
<!-- END header_row -->

<!-- BEGIN topic -->
  <!-- BEGIN table_sticky -->
     </tbody>
  </table>
  </div><div class="topme">
                 <!-- BEGIN multi_selection -->
     <input onclick="check_uncheck_all_{topics_list_box.row.header_table.BOX_ID}();" type="checkbox" name="all_mark_{topics_list_box.row.header_table.BOX_ID}" value="0" />
     <!-- END multi_selection -->
     <p class="h2">{L_TOPICS} [{topics_list_box.row.bottom.COUNT_TOTAL_TOPICS}]</p>
     <p class="options">
        <a href="{U_MARK_READ}">{L_MARK_TOPICS_READ}</a> {S_WATCH_FORUM} <a href="#top">{L_BACK_TO_TOP}</a>
                 </p></div>
<div class="main-content">
  <table cellspacing="0" class="table">
     
     <tbody class="statused">
  <!-- END table_sticky -->
     <tr>
        <td class="tcl tdtopics <!-- BEGIN line_sticky --> sticky-separator <!-- END line_sticky -->">
           <span class="status" style="padding-top: 0.8%!important">
              <img title="{topics_list_box.row.L_TOPIC_FOLDER_ALT}" src="{topics_list_box.row.TOPIC_FOLDER_IMG}" alt="{topics_list_box.row.L_TOPIC_FOLDER_ALT}" />
           </span>
           <!-- BEGIN single_selection -->
           <input type="radio" name="{topics_list_box.FIELDNAME}" value="{topics_list_box.row.FID}" {topics_list_box.row.L_SELECT} /> 
           <!-- END single_selection -->
                         <span id="tipe-post">{topics_list_box.row.TOPIC_TYPE} </span>
                         {topics_list_box.row.NEWEST_POST_IMG}
           {topics_list_box.row.ICON} 
           <h2 class="topic-title"><a class="topictitle" href="{topics_list_box.row.U_VIEW_TOPIC}">{topics_list_box.row.TOPIC_TITLE}</a> {topics_list_box.row.PARTICIPATE_POST_IMG} </h2> 
           <!-- BEGIN switch_description -->
           <br />
            {topics_list_box.row.topic.switch_description.TOPIC_DESCRIPTION}
           <!-- END switch_description -->
                         <p>{topics_list_box.row.L_BY} {topics_list_box.row.TOPIC_AUTHOR}  {topics_list_box.row.GOTO_PAGE_NEW} </p>
           
        </td>
        <td class="tc2 <!-- BEGIN line_sticky --> sticky-separator <!-- END line_sticky -->"></td>
                 <td class="tc3 <!-- BEGIN line_sticky --> sticky-separator <!-- END line_sticky -->"><p><span style="display: none;" data-id="hot_topic" class="ipsBadge_orange">HOT</span>&nbsp;<strong data-id="replies">{topics_list_box.row.REPLIES}</strong> <span>Respostas</span></p><p>{topics_list_box.row.VIEWS} <span>Visualizações</span></p></td>
                 <td class="tcr <!-- BEGIN line_sticky --> sticky-separator <!-- END line_sticky -->"><div class="avs" style="padding-left: 30px;"><span><p>{topics_list_box.row.LAST_POST_AUTHOR}</p>{topics_list_box.row.LAST_POST_TIME}{topics_list_box.row.LAST_POST_IMG}</span></div></td>
        <!-- BEGIN multi_selection -->
        <td><input onclick="javascript:check_uncheck_main_{topics_list_box.row.BOX_ID}();" type="checkbox" name="{topics_list_box.FIELDNAME}[]{topics_list_box.row.BOX_ID}" value="{topics_list_box.row.FID}" {topics_list_box.row.L_SELECT} /></td>
        <!-- END multi_selection -->
     </tr>
<!-- END topic -->
<!-- BEGIN no_topics -->
<tr>
  <td class="tcl" colspan="4"><strong>{topics_list_box.row.L_NO_TOPICS}</strong></td>
</tr>
<!-- END no_topics -->

<!-- BEGIN bottom -->
     </tbody>
  </table>
  </div>
  
<!-- END bottom -->
<!-- BEGIN spacer --><br /><!-- END spacer -->
<!-- END row -->
<!-- END topics_list_box -->
<script type="text/javascript">
   //<![CDATA[
   /***
   * Show [HOT] topic tag!
   * Made by JScript from www.punbb.forumeiros.com
   */  
   var target = $('td.tc3');
   target.each(function(index){
       var oThis = $(this);
       var replies = oThis.children('strong[data-id="replies"]').text();

       if (replies > 10) {
           oThis.children('span[data-id="hot_topic"]').show();
       }
   }); 
   //]]>
</script>
<style>
.ipsBadge_lightgrey {
background: rgba(178, 176, 176, 0.42);
display: inline-block;
height: 16px;
line-height: 16px;
padding: 0 5px;
font-size: 9px;
font-weight: bold;
text-transform: uppercase;
color: black !important;
vertical-align: middle;
margin-top: 1%;
}
</style>

OBS: No final do template tem a seguinte linha: if (replies > 10) { o 10 significa o número de resposta para o efeito aparecer.

Até mais.

Preste atenção na hora da edição.

Conteúdo patrocinado  • 

Tópico quente. Empty Re: Tópico quente.

Permissões neste sub-fórum
Não podes responder a tópicos