Good art is a taste, good design is an opinion.


Come as guest, stay as family.
Board Index

Come as guest, stay as family.


You are not connected. Please login or register

Foto

[Solved] Problem "HOT" Next to topics



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

1
Offline

  FrOsTyXi

avatar
V.I.P. Member
V.I.P. Member
  • Description:
Hello, tried to add the code from this post--> http://punbb-design.forumotion.com/t380p10-javascript-how-to-put-hot-topic-next-to-replies But nothing happened i have many topics with more than 5 replies was wonder if maybe the code needs modification or something.

Thank you in advance for any help!

Note: I have this removed for now.

  • Information:
Forum:http://www.team-psn.net/Version:PUNBB
Type:Errors in codeTags:topics

Powered by PunBB
Currently 0 users have thanked FrOsTyXi for this post:

2
Offline

  Van-Helsing

avatar
★Moderator★
★Moderator★
Hello,
Can you post your template topics_list_box?


Powered by PunBB
Currently 0 users have thanked Van-Helsing for this post:

3
Offline

  FrOsTyXi

avatar
V.I.P. Member
V.I.P. Member
Sure np here it is.

Code:
<!-- BEGIN topics_list_box -->
<!-- BEGIN row -->
<!-- BEGIN header_table -->
<!-- BEGIN multi_selection -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta name="generator" content=
  "HTML Tidy for Linux/x86 (vers 25 March 2009), see www.w3.org" />
  <script type="text/javascript">
//<![CDATA[
                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 -->

  <title></title>
</head>

<body>
  <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">
    <strong>{topics_list_box.row.L_TITLE}</strong>

    <table cellspacing="0" class="table">
      <tbody class="statused">
        <!-- END header_table -->
        <!-- BEGIN header_row -->
        <!-- 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 -->

        <tr>
          <td class=
          "tcl tdtopics &lt;!-- BEGIN line_sticky --&gt; sticky-separator &lt;!-- END line_sticky --&gt;">
          <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}" />&nbsp; <!-- END single_selection -->
            {topics_list_box.row.ICON}&nbsp; {topics_list_box.row.NEWEST_POST_IMG}
            {topics_list_box.row.PARTICIPATE_POST_IMG}&nbsp;
            {topics_list_box.row.TOPIC_TYPE}&nbsp;

            <h2 class="topic-title"><a class="topictitle" href=
            "{topics_list_box.row.U_VIEW_TOPIC}">{topics_list_box.row.TOPIC_TITLE}</a></h2>&nbsp;
            {topics_list_box.row.GOTO_OPEN} {topics_list_box.row.GOTO_PAGE_NEW}
            {topics_list_box.row.GOTO_CLOSE}&nbsp; {topics_list_box.row.L_BY}
            {topics_list_box.row.TOPIC_AUTHOR}, {topics_list_box.row.FIRST_POST_TIME}
            <!-- BEGIN switch_description -->
            <br />
            &nbsp;{topics_list_box.row.topic.switch_description.TOPIC_DESCRIPTION}
            <!-- END switch_description -->
          </td>

          <td class="tc2"></td>

          <td class=
          "tc3 &lt;!-- BEGIN line_sticky --&gt; sticky-separator &lt;!-- END line_sticky --&gt;">
          {topics_list_box.row.REPLIES} Replies<br />
          {topics_list_box.row.VIEWS} Views</td>

          <td class=
          "tcr &lt;!-- BEGIN line_sticky --&gt; sticky-separator &lt;!-- END line_sticky --&gt;">
          {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}" /></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>&nbsp;{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 -->
</body>
</html>

Powered by PunBB
Currently 0 users have thanked FrOsTyXi for this post:

4
Offline

  Shadow

avatar
Administrator
Administrator
There are many issues with that template + it's heavily modified and wrongly coded. I recommend you to replace it with default one or with some other [ic]topic_list_box[/ic] since there are many errors like
Code:
<td class=
          "tcl tdtopics <!-- BEGIN line_sticky --> sticky-separator <!-- END line_sticky -->">
Code:
 <td class="tc2"></td>
Code:
  <td class=
          "tcr &lt;!-- BEGIN line_sticky --&gt; sticky-separator &lt;!-- END line_sticky --&gt;">
          {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>
and so on.

Powered by PunBB
Currently 0 users have thanked Shadow for this post:

5
Offline

  FrOsTyXi

avatar
V.I.P. Member
V.I.P. Member
Thank you for that see what you think of this template it was the original modded template.

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">
      <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} />&nbsp;
            <!-- END single_selection -->
            {topics_list_box.row.ICON}&nbsp;
            {topics_list_box.row.NEWEST_POST_IMG}
            {topics_list_box.row.PARTICIPATE_POST_IMG}&nbsp;
            {topics_list_box.row.TOPIC_TYPE}&nbsp;
            <h2 class="topic-title"><a class="topictitle" href="{topics_list_box.row.U_VIEW_TOPIC}">{topics_list_box.row.TOPIC_TITLE}</a></h2>&nbsp;
            {topics_list_box.row.GOTO_OPEN} {topics_list_box.row.GOTO_PAGE_NEW} {topics_list_box.row.GOTO_CLOSE}&nbsp;
                 {topics_list_box.row.L_BY} {topics_list_box.row.TOPIC_AUTHOR}, {topics_list_box.row.FIRST_POST_TIME}
            <!-- BEGIN switch_description -->
            <br />
            &nbsp;{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} Replies<br />{topics_list_box.row.VIEWS} Views</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>&nbsp;{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 -->

Let me know what you think of this template but i will say i went to a default template and i see no changes with looks but the hot topic JS and CSS is working. Thank you for your time!

Powered by PunBB
Currently 0 users have thanked FrOsTyXi for this post:

6
Offline

  Shadow

avatar
Administrator
Administrator
Still the same, [ic]tc[/ic] classes are broken.

Powered by PunBB
Currently 0 users have thanked Shadow for this post:

7
Offline

  FrOsTyXi

avatar
V.I.P. Member
V.I.P. Member
Thank you sir for looking that ove i just went with a default template as you suggested.

This can be closed!

Regards
FrOsTyXi

Powered by PunBB
Currently 0 users have thanked FrOsTyXi for this post:

8
Offline

  Shadow

avatar
Administrator
Administrator
[sucesso="Marked as Solved"]The question(s) in this topic have been answered and the owner has been able to solve the problem. Because of this, the topic has been marked as Solved.

If you have further questions, please open a new topic.[/sucesso]

Powered by PunBB
Currently 0 users have thanked Shadow for this post:

9
Offline

  Sponsored content



Powered by PunBB
Currently 0 users have thanked Sponsored content for this post:

View previous topic View next topic Back to top Message [Page 1 of 1]


Topic URL's

URL
BBcode
HTML" />

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