SocialAcademy • Forum

Social Academy Community Support Forum & Free Tutorial's & Skins



SocialAcademy • Forum » Support Section » Ask Question 's & Problems » Solved & Trash Files  →   [archived] Hot Topic on forum

[archived] Hot Topic on forum


    Go to page : 1, 2  Next

  • Please log in to Reply

View previous topic View next topic Go down  Message [Page 1 of 2]

#1

Offlinemicul`wji

micul`wji
 
Member
Member

Posted Sat May 31, 2014 1:38 pm

 
Details:How can I add my forum hot topic option I have tried several codes but does not work does not appear hot word.
Elegant theme using punbb version I made ​​to drink template topics_list_box my work so hot topic
demo: [archived] Hot Topic on forum Screenshot_3

my topics_list_box:
Code:
<!-- 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">
      <thead>
         <tr>
            <th class="tcl">{L_TOPICS}</th>
                          <th class="tc2"></th>
            <th class="tcr">{topics_list_box.row.L_LASTPOST}</th>
         </tr>
      </thead>
      <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">
      <thead>
         <tr>
            <th class="tcl">{L_TOPICS}</th>
                          <th class="tc2"></th>
            <th class="tcr">{topics_list_box.row.topic.table_sticky.L_LASTPOST}</th>
         </tr>
      </thead>
      <tbody class="statused">
   <!-- END table_sticky -->
      <tr>
         <td class="tcl tdtopics <!-- BEGIN line_sticky --> sticky-separator <!-- END line_sticky -->">
            <span class="status">
               <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>
<div class="t2">

{topics_list_box.row.ICON} <a class="topictitle" href="{topics_list_box.row.U_VIEW_TOPIC}">{topics_list_box.row.TOPIC_TITLE}</a> {topics_list_box.row.GOTO_PAGE_NEW}
</div>
<div class="by smalltext">

    Started By {topics_list_box.row.TOPIC_AUTHOR}

</div>
            <!-- BEGIN switch_description -->
            <br />
             {topics_list_box.row.topic.switch_description.TOPIC_DESCRIPTION}
            <!-- END switch_description -->
         </td>
                  <td class="tc2 <!-- BEGIN line_sticky --> sticky-separator <!-- END line_sticky -->"></td>
         
         <td class="tcr <!-- BEGIN line_sticky --> sticky-separator <!-- END line_sticky -->">
                   <!-- BEGIN avatar -->
    <span class="lastpost-avatar">{topics_list_box.row.topic.avatar.LAST_POST_AVATAR}</span>
    <!-- END avatar -->
                          
                          <div>

   {topics_list_box.row.LAST_POST_AUTHOR}

</div>
<div>

    {topics_list_box.row.LAST_POST_TIME}

</div>
<div>

    

  <span class="sta1" style=" padding-right: 6px; ">{topics_list_box.row.VIEWS} Views</span> |

  <span class="sta2" style=" padding-left: 6px; ">{topics_list_box.row.REPLIES} Replies</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>
   <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}"></a> &nbsp;<a href="#top">{L_BACK_TO_TOP}</a>
      </p>
   </div>
<!-- END bottom -->
<!-- BEGIN spacer --><br /><!-- END spacer -->
<!-- END row -->
<!-- END topics_list_box -->
Forum Address: http://testeady7.forumgratuit.ro/
Forum Version: punbb

http://exiled.wow3.info/
#2

OfflineJ0k3R^

J0k3R^
 
Advance Member
Advance Member

Posted Sat May 31, 2014 2:00 pm

 
go to ACP > Display > Templates > General > topic_list_box, find:

Code:
<td class="tc3 <!-- BEGIN line_sticky --> sticky-separator <!-- END line_sticky -->">{topics_list_box.row.REPLIES} replies<br/> {topics_list_box.row.VIEWS} views</td>

and replace with:

Code:
<td class="tc3 <!-- BEGIN line_sticky --> sticky-separator <!-- END line_sticky -->"><span style="display: none;" data-id="hot_topic" class="ipsBadge ipsBadge_orange">Hot</span>&nbsp;<span data-id="replies">{topics_list_box.row.REPLIES}</span> replies<br/> {topics_list_box.row.VIEWS} views</td>

at the end of the template add this:

Code:
<script>
  var target = $('td.tc3');
    target.each(function(index){
        var oThis = $(this);
        var replies = oThis.children('span[data-id="replies"]').text();

        if (replies > 9) {
            oThis.children('span[data-id="hot_topic"]').show();
        }
    });
</script>

css:

Code:
.ipsBadge_orange {
  background: none repeat scroll 0 0 #ED7710;
}
.ipsBadge {
  border-radius: 4px 4px 4px 4px;
  color: #FFFFFF;
  display: inline-block;
  font-size: 9px;
  font-weight: bold;
  height: 15px;
  line-height: 15px;
  padding: 0 5px;
  text-transform: uppercase;
  vertical-align: middle;
}

http://fmplanet.forumgreek.com
#3

Offlinemicul`wji

micul`wji
 
Member
Member

Posted Sat May 31, 2014 3:00 pm

 
i dont find tihs code
Code:
<td class="tc3 <!-- BEGIN line_sticky --> sticky-separator <!-- END line_sticky -->">{topics_list_box.row.REPLIES} replies<br/> {topics_list_box.row.VIEWS} views</td>

in my template is does exist

http://exiled.wow3.info/
#4

OfflineGrafix

Grafix
 
Management Team
 Management Team

Posted Mon Jun 02, 2014 6:23 am

 
Replace your Topiclist_box with this


Code:
<!-- 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">
      <thead>
         <tr>
            <th class="tcl">{L_TOPICS}</th>
                          <th class="tc2"></th>
            <th class="tcr">{topics_list_box.row.L_LASTPOST}</th>
         </tr>
      </thead>
      <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">
      <thead>
         <tr>
            <th class="tcl">{L_TOPICS}</th>
                          <th class="tc2"></th>
            <th class="tcr">{topics_list_box.row.topic.table_sticky.L_LASTPOST}</th>
         </tr>
      </thead>
      <tbody class="statused">
   <!-- END table_sticky -->
      <tr>
         <td class="tcl tdtopics <!-- BEGIN line_sticky --> sticky-separator <!-- END line_sticky -->">        <span style="display: none;" data-id="hot_topic" class="orange"> HOT </span>
            <span class="status">
               <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>
<div class="t2">

<a class="topictitle" href="{topics_list_box.row.U_VIEW_TOPIC}">{topics_list_box.row.TOPIC_TITLE}</a> {topics_list_box.row.GOTO_PAGE_NEW}

</div>
<div class="by smalltext">

    Started By {topics_list_box.row.TOPIC_AUTHOR}

</div>
            <!-- BEGIN switch_description -->
            <br />
             {topics_list_box.row.topic.switch_description.TOPIC_DESCRIPTION}
            <!-- END switch_description -->
         </td>
<td id="postA" class="tc2 <!-- BEGIN line_sticky --> sticky-separator <!-- END line_sticky -->"><span class="ipsBadge ipsBadge_orange" data-id="hot_topic" style="display:none;">HOT</span><strong data-id="replies" class="RP">{topics_list_box.row.REPLIES}</strong> replies<br /><strong class="VW"> {topics_list_box.row.VIEWS}</strong> views</td>
                  <td style="margin-left:11px;" class="tcr <!-- BEGIN line_sticky --> sticky-separator <!-- END line_sticky -->"><p style="margin-bottom: 18px;"><br>{topics_list_box.row.LAST_POST_TIME}<br/>by {topics_list_box.row.LAST_POST_AUTHOR}</br></p></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 -->
         
          <script type="text/javascript">
                //<![CDATA[
            /***
            * Copyright (c) 2013 JScript <jscriptbrasil at live.com>
            * This work is free. You can redistribute it and/or modify it
            * under the terms of the WTFPL, Version 2
            *
            * For more information, go to the home page:
            * http://punbb.forumeiros.com/forum
            */
                var replies_value = 1;
                var target = $('td.tc2');
           
                target.each(function(index){
                    var oThis = $(this);
                    var replies = oThis.children('strong[data-id="replies"]').text();

                    if (replies > replies_value) {
                        oThis.children('span[data-id="hot_topic"]').show();
                    }
                });
                //]]>
            </script>
<style>
.ipsBadge {
  background: url('http://i57.servimg.com/u/f57/17/68/86/50/highli11.png') repeat-x scroll 0px -1px #ED7710;
    display: inline-block;
    height: 15px;
    line-height: 15px;
    padding: 0px 5px;
    font-size: 9px;
    font-weight: bold;
    text-transform: uppercase;
    color: #FFF;
    text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2);
    border-radius: 3px;
    background-image: url('http://www.ipbfocus.com/forums/public/style_images/ipbfs34x/highlight.png');
    background-repeat: repeat-x;
    background-position: 0px -1px;
    vertical-align: middle;
}
.ipsBadge_orange {
              background: #ED7710;
  margin-right: 5px;
}

</style>         

https://socialacademy.forumotion.com
#5

Offlinemicul`wji

micul`wji
 
Member
Member

Posted Mon Jun 02, 2014 6:51 am

 
red I want my template not receive any change. You can not add without changing?

http://exiled.wow3.info/
#6

OfflineGrafix

Grafix
 
Management Team
 Management Team

Posted Fri Jun 06, 2014 3:48 am

 
Actually for now you cant add hot topic in your old topic_listbox template because tc3 is missing .. just use now the template that i gve you ...

https://socialacademy.forumotion.com
#7

Offlinemicul`wji

micul`wji
 
Member
Member

Posted Fri Jun 06, 2014 6:58 am

 
I understand that but there is somehow a way to add my current template hot topic? The given you does not match the forum

http://exiled.wow3.info/
#8

OfflineGrafix

Grafix
 
Management Team
 Management Team

Posted Fri Jun 13, 2014 5:23 am

 
ok if you dont like the codes above delete it and put this at the end of your Topic_list_box
Code:
<script type="text/javascript">
                //<![CDATA[
            /***
            * Copyright (c) 2013 JScript <jscriptbrasil at live.com>
            * This work is free. You can redistribute it and/or modify it
            * under the terms of the WTFPL, Version 2
            *
            * For more information, go to the home page:
            * http://punbb.forumeiros.com/forum
            */
                var replies_value = 7;
                var target = $('td.tc2');
           
                target.each(function(index){
                    var oThis = $(this);
                    var replies = oThis.children('strong[data-id="replies"]').text();

                    if (replies > replies_value) {
                        oThis.children('span[data-id="hot_topic"]').show();
                    }
                });
                //]]>
            </script>
<style>
.ipsBadge_orange {
              background: #ED7710;
}
.tcl.tdtopics #ipsBadge strong {
    background:url('http://i56.servimg.com/u/f56/17/97/98/69/highli20.png') repeat scroll 0% 0% #7BA60D;
    vertical-align: middle;
    display: inline-block;
    height: 16px;
    line-height: 16px !important;
    padding: 0px 5px;
    font-size: 9px !important;
    font-weight: bold !important;
    text-transform: uppercase;
    color: rgb(255, 255, 255) !important;
    text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2);
    border-radius: 3px;
    background-repeat: repeat-x;
    background-position: 0px -1px;
}
</style>


https://socialacademy.forumotion.com
#9

Offlinemicul`wji

micul`wji
 
Member
Member

Posted Fri Jun 13, 2014 6:42 am

 
don't work does not appear

http://exiled.wow3.info/
#10

OfflineGrafix

Grafix
 
Management Team
 Management Team

Posted Tue Jul 08, 2014 10:16 am

 
still need this ?

https://socialacademy.forumotion.com
#11

OfflineSponsored content


 

Posted

 

Message (Page 1 of 2)


    Go to page : 1, 2  Next


Share Topics Url

Url
BBcode
HTML

Permissions in this forum:
You cannot reply to topics in this forum

 
  • Free forum | ©phpBB | Free forum support | Report an abuse | Forumotion.com


Social Academy Forum
© Social Academy 2013-2022