Thread: Miscellaneous Hacks - DJ's Dynamic Tab Content for Postbit_Legacy
View Single Post
  #203  
Old 12-02-2008, 08:06 AM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ScienceOfMuscle View Post
Ok that makes sense. It is doing the same thing as before though, when I click one of the tabs it just brings me back to the top of the page instead of just showing that tab. I only modified tab 3 to test this out but here it is:

Code:
 
<!-- BEGIN AJAX CONTENT -->
<div id="postbittabs$post[postid]" class="djdot">
 
<ul>
<li><span title="View Tab 1"><a href="#" rel="tab1$post[postid]" id="selected$post[postid]">&nbsp;</a></span></li>
<li><span title="View Tab 2"><a href="#" rel="tab2$post[postid]">&nbsp;</a></span></li>
<li><span title="View Tab 3"><a href="#" rel="tab3$post[postid]">&nbsp;</a></span></li>
<li><span title="View Tab 4"><a href="#" rel="tab4$post[postid]">&nbsp;</a></span></li>
<li><span title="View Tab 5"><a href="#" rel="tab5$post[postid]">&nbsp;</a></span></li>
</ul>
 
<br style="clear: left" />
 
</div>
 
<div class="smallfont">
 
<!--TAB 1 CONTENT -->
<div id="tab1$post[postid]" class="tabcontent">
 
 
<div class="info">Tab 1 Content:Block B</div>
<div class="info">Tab 1 Content:Block C</div>
 
</div>
 
<!-- TAB 2 CONTENT -->
<div id="tab2$post[postid]" class="tabcontent">
 
<div class="info">Tab 2 Content:Block A</div>
<div class="info">Tab 2 Content:Block B</div>
<div class="info">Tab 2 Content:Block C</div>
<div class="info">Tab 2 Content:Block D</div>
 
</div>
 
<!-- TAB 3 CONTENT -->
<div id="tab3$post[postid]" class="tabcontent">
 
<div class="info">$vbphrase[posts]: $post[posts]</div>
<if condition="$post['joindate']"><div class="info">$vbphrase[join_date]: $post[joindate]</div></if>
<div class="info">Tab 3 Content:Block C</div>
<div class="info">Tab 3 Content:Block D</div>
<div class="info">Tab 3 Content:Block E</div>
<div class="info">Tab 3 Content:Block F</div>
 
</div>
This part seems okay, but it's only a part of it. Do you have the rest of the code in there:

Code:
</div> 
 
 
<script type="text/javascript"> 
var mytabs=new ddtabcontent("postbittabs$post[postid]") 
mytabs.setpersist(false) 
mytabs.setselectedClassTarget("link") 
mytabs.init() 
</script> 
 
<!-- END AJAX CONTENT -->



Quote:
Originally Posted by GlamRockTalk View Post
Strange....I just had a new member make their first post (we're still testing things out at the site, it's not 100% open yet) and it doesn't show anything other than the three tabs. Then, when you click on a tab, it goes up to the top of the page like the others mentioned.

Any thoughts on what I should do?

Here's the example: It's the member named hms1016 and the thread is http://www.glamrocktalk.com/showthre...?p=265#post265

EDITED: I always had the 'persistence' as false. So, that's not a solution for me.
You have a number of problems with the code you've moved into the tabs. For instance, Tab 2 has incomplete and improperly nested DIV and Table elements. I recommend avoiding using any table elements when possible and just stick to putting your raw code into DIV containers. And make sure the DIVs are closed properly.

Also, part of your problem may be where you've commented out Tabs 4 and 5. Make sure you open and close the comment on each line that you want removed. Not at the start of one line and at the end of another.

Not:
Code:
<!--Tab 4 Code
Tab 5 Code -->
But instead:
Code:
<!-- Tab 4 Code -->
<!-- Tab 5 Code -->
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01320 seconds
  • Memory Usage 1,805KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete