Boas-vindas ao Power Pixel

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

B4N3 B4N3  • Qua 5 Mar 2014 - 17:54

Tópico Quente (template editado) topics_list_box Empty Tópico Quente (template editado) topics_list_box Qua 5 Mar 2014 - 17:54

Qual é minha questão:
Bom gostaria de ter o código do tópico quente para este template editável
topics_list_box

código:
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}&nbsp;</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>{topics_list_box.row.REPLIES} <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 -->

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

Versão:
PunBB

B4N3 B4N3  • Qui 6 Mar 2014 - 20:28

B4N3 B4N3  • Sex 7 Mar 2014 - 17:21

[K]oke [K]oke  • Sáb 8 Mar 2014 - 13:13

B4N3 B4N3  • Sáb 8 Mar 2014 - 13:27

[K]oke [K]oke  • Sáb 8 Mar 2014 - 13:30

Tópico Quente (template editado) topics_list_box Empty Re: Tópico Quente (template editado) topics_list_box Sáb 8 Mar 2014 - 13:30

Vejo que não entendi não meche com templage coloque o JAVA do tutorial e coloque no inicio do seu CSS
Código:
.hot_topic {
background: #ED7710;
display: block;
height: 16px;
margin: 0 auto;
max-width: 45px;
line-height: 16px;
padding: 1px 5px;
font-size: 9px;
font-weight: bold;
text-transform: uppercase;
color: #fff;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
vertical-align: middle;
}

B4N3 B4N3  • Sáb 8 Mar 2014 - 15:30

[S]herlock H. [S]herlock H.  • Sáb 8 Mar 2014 - 16:06

Tópico Quente (template editado) topics_list_box Empty Re: Tópico Quente (template editado) topics_list_box Sáb 8 Mar 2014 - 16:06

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.

B4N3 B4N3  • Sáb 8 Mar 2014 - 16:29

[S]herlock H. [S]herlock H.  • Sáb 8 Mar 2014 - 16:39

Tópico Quente (template editado) topics_list_box Empty Re: Tópico Quente (template editado) topics_list_box Sáb 8 Mar 2014 - 16:39

Amigão, trocou a linha que eu falei?
Ela só irá aparecer com o número superior ao que você determinou no código.
Em meu fórum é este código que utilizo, e funciona perfeitamente.

Até

B4N3 B4N3  • Sáb 8 Mar 2014 - 17:03

Tópico Quente (template editado) topics_list_box Empty Re: Tópico Quente (template editado) topics_list_box Sáb 8 Mar 2014 - 17:03

[S]herlock H. escreveu:Amigão, trocou a linha que eu falei?
Ela só irá aparecer com o número superior ao que você determinou no código.
Em meu fórum é este código que utilizo, e funciona perfeitamente.

Até

sim amigo troquei sim
mais nao resultou!

B4N3 B4N3  • Dom 9 Mar 2014 - 18:59

Daemon Daemon  • Dom 9 Mar 2014 - 19:58

Tópico Quente (template editado) topics_list_box Empty Re: Tópico Quente (template editado) topics_list_box Dom 9 Mar 2014 - 19:58

Tente este código:
Código:
$(document).ready(function(){
$('thead:contains("Respostas")').each(function() {
  $(this).parents('.main-content').find('td.tc3').each(function() {
  var number = $(this).find('strong[data-id="replies"]').text();
  var hot = '<span class="hot_topic">Quente</span>';
 if(number >= 3) {
  $(this).append(hot);
 }
  });
});
});
Até!

B4N3 B4N3  • Seg 10 Mar 2014 - 18:52

Tópico Quente (template editado) topics_list_box Empty Re: Tópico Quente (template editado) topics_list_box Seg 10 Mar 2014 - 18:52

Daemon escreveu:Tente este código:
Código:
$(document).ready(function(){
$('thead:contains("Respostas")').each(function() {
  $(this).parents('.main-content').find('td.tc3').each(function() {
  var number = $(this).find('strong[data-id="replies"]').text();
  var hot = '<span class="hot_topic">Quente</span>';
 if(number >= 3) {
  $(this).append(hot);
 }
  });
});
});
Até!

nao resultou...

Podem fechar pois decidi não colocar mais no fórum pois ta pesando muito tem muito js!


Última edição por B4N3 em Seg 10 Mar 2014 - 20:52, editado 1 vez(es) (Motivo da edição : muitos js no forum!)

Conteúdo patrocinado  • 

Tópico Quente (template editado) topics_list_box Empty Re: Tópico Quente (template editado) topics_list_box

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