Warning: The author of this contribution does not provide support for it anymore.

Index Tabbed

Content suddenly disappeared - Index Tabbed

Content suddenly disappeared

by Jessica » Sun Nov 13, 2011 7:55 pm

Everything was working smoothly until now. I don't know how it happened...the content in "Statistics" and "Who was here" (which is a tab I added long ago) disappeared. I didn't remove any coding in index_tabbed.html. It SEEMS that when the Birthday tab appeared, the content in those two tab disappeared. but I don't know if it's that or not.

index_tabbed.html

Code: Select all

<script type="text/javascript">
// <![CDATA[
/**
@package Index Tabbed
@version 1.0.0
@copyright (c) zoby (http://www.phpbb-es.com/foro/usuario/zoby/)
@copyright (c) leviatan21 (http://www.phpbb-es.com/foro/usuario/leviatan21/)
@license http://opensource.org/licenses/gpl-license.php GNU Public License
**/

var panels_index = new Array('login-panel', 'online-panel', 'birthday-panel', 'statistics-panel', 'who-was-here-panel');

/**
* Alternate display of subPanels
*
* Based of Prosilver
* file forum_fn.js
* function subPanels()
**/
function subpanels_index(p)
{
   var i, e, t;

   if (typeof(p) == 'string')
   {
      show_panel = p;
   }

   for (i = 0; i < panels_index.length; i++)
   {
      e = document.getElementById(panels_index[i]);
      t = document.getElementById(panels_index[i] + '-tab');

      if (e)
      {
         if (panels_index[i] == show_panel)
         {
            e.style.display = 'block';
            if (t)
            {
               t.className = 'activetab';
            }
         }
         else
         {
            e.style.display = 'none';
            if (t)
            {
               t.className = '';
            }
         }
      }
   }
}

// ]]>
</script>

<div id="tabs">
   <ul>
      <!-- IF not S_USER_LOGGED_IN and not S_IS_BOT -->
      <li class="<!-- IF not S_USER_LOGGED_IN -->activetab<!-- ELSE --><!-- ENDIF -->" id="login-panel-tab"><a name="login" href="#login-panel-tab" onclick="subpanels_index('login-panel'); return false;"><span>{L_LOGIN}</span></a></li>
      <!-- ENDIF -->
      <!-- IF S_DISPLAY_ONLINE_LIST -->
      <li class="<!-- IF S_USER_LOGGED_IN -->activetab<!-- ELSE --><!-- ENDIF -->" id="online-panel-tab"><a name="online" href="#online-panel-tab" onclick="subpanels_index('online-panel'); return false;"><span>{L_WHO_IS_ONLINE}</span></a></li>
      <!-- ENDIF -->
      <!-- IF S_DISPLAY_BIRTHDAY_LIST and BIRTHDAY_LIST or BIRTHDAYS_AHEAD_LIST -->
      <li class="" id="birthday-panel-tab"><a name="birthday" href="#birthday-panel-tab" onclick="subpanels_index('birthday-panel'); return false;"><span>{L_BIRTHDAYS}</span></a></li>
      <!-- ENDIF -->
      <!-- IF NEWEST_USER -->
      <li class="" id="statistics-panel-tab"><a name="statistics" href="#statistics-panel" onclick="subpanels_index('statistics-panel'); return false;"><span>{L_STATISTICS}</span></a></li>
      <!-- ENDIF -->
      <li class="" id="who-was-here-panel-tab"><a name="who-was-here" href="#who-was-here-panel" onclick="subpanels_index('who-was-here-panel'); return false;"><span>{L_WHO_WAS_HERE}</span></a></li>
   </ul>
</div>

<div id="panel-tab" class="panel bg3">
   <div class="inner"><span class="corners-top"><span></span></span>

   <!-- IF not S_USER_LOGGED_IN and not S_IS_BOT -->
         <div id="login-panel" style="display: <!-- IF not S_USER_LOGGED_IN -->block<!-- ELSE -->none<!-- ENDIF -->;">
            <form method="post" action="{S_LOGIN_ACTION}" class="headerspace" style="margin-top: 0;">
               <h3><a href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a><!-- IF S_REGISTER_ENABLED -->&nbsp; &bull; &nbsp;<a href="{U_REGISTER}">{L_REGISTER}</a><!-- ENDIF --></h3>
               <fieldset class="quick-login">
                  <label for="username">{L_USERNAME}:</label>&nbsp;<input type="text" name="username" id="username" size="10" class="inputbox" title="{L_USERNAME}" />
                  <label for="password">{L_PASSWORD}:</label>&nbsp;<input type="password" name="password" id="password" size="10" class="inputbox" title="{L_PASSWORD}" />
                  <!-- IF S_AUTOLOGIN_ENABLED -->   | <label for="autologin">{L_LOG_ME_IN} <input type="checkbox" name="autologin" id="autologin" /></label><!-- ENDIF -->
                  <input type="submit" name="login" value="{L_LOGIN}" class="button2" />
                  {S_LOGIN_REDIRECT}
               </fieldset>
            </form>
         </div>
   <!-- ENDIF -->


   <!-- IF S_DISPLAY_ONLINE_LIST -->
   <div id="online-panel" style="display: <!-- IF S_USER_LOGGED_IN -->block<!-- ELSE -->none<!-- ENDIF -->;">
      <!-- IF U_VIEWONLINE --><h3><a href="{U_VIEWONLINE}"><font face="cambria">{L_WHO_IS_ONLINE}</font></a></h3><!-- ELSE --><h3>{L_WHO_IS_ONLINE}</h3><!-- ENDIF -->
      <p><font face="cambria"> {TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})  <br />{RECORD_USERS}<br /><!-- IF TOTAL_GUESTS_ONLINE -->{GUESTS_PAST_24}<br /><!-- ENDIF --> <br /> {LOGGED_IN_USER_LIST}</font>
   <!-- IF not S_IS_BOT --><br /><br />
   <font face="cambria">{USERS_24HOUR_TOTAL}: <!-- BEGIN lastvisit -->{lastvisit.USERNAME_FULL}<!-- IF not lastvisit.S_LAST_ROW -->, <!-- ENDIF --><!-- END lastvisit --></font>
   <!-- ENDIF -->
      
   <!-- IF LEGEND --><br /><b><font face="cambria">{L_LEGEND}: {LEGEND}</font></b><!-- ENDIF --></p>
   </div>
   <!-- ENDIF -->

   <!-- IF S_DISPLAY_BIRTHDAY_LIST and BIRTHDAY_LIST or BIRTHDAYS_AHEAD_LIST -->
   <div id="birthday-panel" style="display: none;">
      <h3><font face="cambria">{L_BIRTHDAYS}</font></h3>
   <p><font face="cambria"><!-- IF BIRTHDAY_LIST -->{L_CONGRATULATIONS}: <strong>{BIRTHDAY_LIST}</strong><!-- ELSE -->{L_NO_BIRTHDAYS}<!-- ENDIF -->   <br /><!-- IF BIRTHDAYS_AHEAD_LIST -->{L_BIRTHDAYS_AHEAD}: <strong>{BIRTHDAYS_AHEAD_LIST}</strong></font><!-- ENDIF --></p>
   <!-- ENDIF -->

   <!-- IF NEWEST_USER -->
   <div id="statistics-panel" style="display: none;">
      <h3><font face="cambria">{L_STATISTICS}</font></h3>
      <p><font face="cambria">{START_DATE} &bull; {TOTAL_POSTS} &bull; {TOTAL_TOPICS} &bull; {TOTAL_USERS} <!-- IF TOTAL_BANNED_USERS -->&bull; {L_BANNED_USERS} <a href="{U_BANLIST}">{TOTAL_BANNED_USERS}</a> <!-- ENDIF --> &bull; {NEWEST_USER}</font></p>
   
      <h3><font face="cambria">{L_BLOG_STATS}</font></h3>
      <p><font face="cambria">{TOTAL_BLOG_ENTRIES} &bull; {TOTAL_BLOG_COMMENTS}</font></p>

      <!-- Start Ultimate Points -->
   <!-- IF S_DISPLAY_POINTS_STATS -->
      <h3><font face="cambria">{L_POINTS_STATISTICS}</font></h3>
      <p><font face="cambria">{TOTAL_POINTS_USER} &bull; {TOTAL_BANK_USER} &bull; {TOTAL_BANK_POINTS} <!-- IF S_DISPLAY_LOTTERY--> &bull; {LOTTERY_TIME} </font><!-- ENDIF --></p>

   <!-- IF S_DISPLAY_INDEX -->
      <h3><font face="cambria">{L_POINTS_MOST_RICH_USERS}</font></h3>
      <p><font face="cambria"><!-- BEGIN rich_user --><!-- IF not rich_user.S_FIRST_ROW --> &bull; <!-- ENDIF -->{rich_user.USERNAME} ({rich_user.SUM_POINTS} {rich_user.SUM_POINTS_NAME})<!-- END rich_user --></font></p>
   <!-- ENDIF -->
   <!-- ENDIF -->
<!-- End Ultimate Points -->
   <!-- IF not S_IS_BOT -->
   <h3 id="24hour_stats"><font face="cambria">{L_24HOUR_STATS}</font></h3>
   <p><font face="cambria">{24HOUR_POSTS} &bull; {24HOUR_TOPICS} &bull; {24HOUR_USERS}</font></p>
   <!-- ENDIF -->
   </div>
   <div id="who-was-here-panel" style="display: none;">
   <!-- IF WHO_WAS_HERE_TOTAL -->
      <h3><font face="cambria">{L_WHO_WAS_HERE}</font></h3>
      <p><font face="cambria">{WHO_WAS_HERE_TOTAL} ({WHO_WAS_HERE_EXP})<br />{WHO_WAS_HERE_RECORD}<br />{WHO_WAS_HERE_LIST}</font></p>
   <!-- ELSEIF U_ACP -->
      <h3><font face="cambria">{L_WHO_WAS_HERE}</font></h3>
      <p><font face="cambria">{L_WWH_UPDATE_NEED}</font></p>
   <!-- ENDIF -->
   </div>
   <!-- ENDIF -->

   <span class="corners-bottom"><span></span></span></div>
</div>
<br /><div class="clear"></div>
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica

Re: Content suddenly disappeared

by Jessica » Thu Dec 01, 2011 1:09 pm

whenever the Birthday tab appears the content in those two tabs vanish. I must be missing some code
Pro-choice, Atheist, Pro-LGBT rights
Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein
User avatar
Jessica
Former Team Member
Posts: 4342
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica

Re: Content suddenly disappeared

by Saske1 » Tue Dec 06, 2011 12:55 pm

Jessica wrote:whenever the Birthday tab appears the content in those two tabs vanish. I must be missing some code

You must delete by mistake to close the div ....
Find:

Code: Select all

<!-- IF S_DISPLAY_BIRTHDAY_LIST and BIRTHDAY_LIST or BIRTHDAYS_AHEAD_LIST -->
   <div id="birthday-panel" style="display: none;">
      <h3><font face="cambria">{L_BIRTHDAYS}</font></h3>
   <p><font face="cambria"><!-- IF BIRTHDAY_LIST -->{L_CONGRATULATIONS}: <strong>{BIRTHDAY_LIST}</strong><!-- ELSE -->{L_NO_BIRTHDAYS}<!-- ENDIF -->   <br /><!-- IF BIRTHDAYS_AHEAD_LIST -->{L_BIRTHDAYS_AHEAD}: <strong>{BIRTHDAYS_AHEAD_LIST}</strong></font><!-- ENDIF --></p>
   <!-- ENDIF -->

Replace with

Code: Select all

<!-- IF S_DISPLAY_BIRTHDAY_LIST and BIRTHDAY_LIST or BIRTHDAYS_AHEAD_LIST -->
   <div id="birthday-panel" style="display: none;">
      <h3><font face="cambria">{L_BIRTHDAYS}</font></h3>
   <p><font face="cambria"><!-- IF BIRTHDAY_LIST -->{L_CONGRATULATIONS}: <strong>{BIRTHDAY_LIST}</strong><!-- ELSE -->{L_NO_BIRTHDAYS}<!-- ENDIF -->   <br /><!-- IF BIRTHDAYS_AHEAD_LIST -->{L_BIRTHDAYS_AHEAD}: <strong>{BIRTHDAYS_AHEAD_LIST}</strong></font><!-- ENDIF --></p>
   </div>
   <!-- ENDIF -->
Saske1
Registered User
Posts: 263
Joined: Wed Feb 02, 2011 7:41 pm
Location: Spain/EspaƱa
Name: Salva