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

For those users who implemented my 1.00 version of this modification, here's what you need to do to upgrade. The upgrade includes changes to address the login issue that some users where experiencing and validates the the code to comply with XHTML standards. (That's geek-speak that means it makes the code compatible across all browser types.)

Upgrade Instructions
Upgrading is not all that hard, you just need to be a little careful. All that needs to be done is move a few of bits of code around, so read closely. Other then that, you shouldn't have too much trouble. Some of you have already taken these steps. Open your postbit_legacy template.

Step 1.
Take the code in red and move it to the bottom of your headinclude template. Delete the opening and closing <head></head> tags.

Code:
<!-- BEGIN AJAX CONTENT -->
<head>
<link rel="stylesheet" type="text/css" href="postbit_tabs/tabcontent.css" />
<script type="text/javascript" src="postbit_tabs/tabcontent.js">
/***********************************************
* Tab Content script v2.2- ? Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>
</head>

Step 2.
Reverse the order of each instance of $post[postid]tab#, so that it reads tab#$post[postid] instead. Also reverse the order of $post[postid]postbittabs so that postbittabs comes first.

TIP: The find feature and CTRL+V (Paste) come in handy when finding and replacing lines of code.

Code:
<div id="$post[postid]postbittabs" class="djdot">
<ul>
<li><span title="View Tab 1"><a href="#" rel="$post[postid]tab1" id="selected">&nbsp;</a></span></li>
<li><span title="View Tab 2"><a href="#" rel="$post[postid]tab2">&nbsp;</a></span></li>
<li><span title="View Tab 3"><a href="#" rel="$post[postid]tab3">&nbsp;</a></span></li>
<li><span title="View Tab 4"><a href="#" rel="$post[postid]tab4">&nbsp;</a></span></li>
<li><span title="View Tab 5"><a href="#" rel="$post[postid]tab5">&nbsp;</a></span></li>
</ul>
<br style="clear: left" />
</div>

Step 3.
Do the same for each TAB CONTENT block. Reverse the order of $post[postid]tab#, so that they read tab#$post[postid] instead.
Code:
<!--TAB 1 CONTENT -->
<div id="$post[postid]tab1" class="tabcontent">
<div class="info">Tab 1 Content:Block A</div>
<div class="info">Tab 1 Content:Block B</div>
<div class="info">Tab 1 Content:Block C</div>
</div>

Step 4.
Reverse the order of $post[postid]postbittabs to postbittabs$post[postid]. Change true to false.
Code:
<script type="text/javascript">
var mytabs=new ddtabcontent("$post[postid]postbittabs")
mytabs.setpersist(true)
mytabs.setselectedClassTarget("link")
mytabs.init()
</script>
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01343 seconds
  • Memory Usage 1,785KB
  • 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
  • (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