Thread: Forum Home Enhancements - [AJAX] Tabbed Forum Home
View Single Post
  #65  
Old 04-12-2008, 12:24 PM
bobster65's Avatar
bobster65 bobster65 is offline
 
Join Date: Mar 2006
Location: Montana
Posts: 1,169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kollam003 View Post
friend

i need seven tabs the forum category are Tab . 1 . home, tab 2 : cat 25, tab3 : cat 30 , tab4 : 28 , tab 5 : 27, tab 6 : 29 , tab7 :26 , i need the tabs to look like as the first one in your demo forums ,

Please correct it accordingly as it would be of great help since i'm too bad in coding these .....
I had a few minutes this am to help you out... Here ya go.

Code:
// Construct Tabbed Forum Home forumbits (pulls forum and sub form data from Category)

$forumbits2 = construct_forum_bit(25,1,0); // Category 25 for Tab 2
$forumbits3 = construct_forum_bit(30,1,0); // Category 30 for Tab 3
$forumbits4 = construct_forum_bit(28,1,0); // Category 28 for Tab 4
$forumbits5 = construct_forum_bit(27,1,0); // Category 27 for Tab 5
$forumbits6 = construct_forum_bit(29,1,0); // Category 29 for Tab 6
$forumbits7 = construct_forum_bit(26,1,0); // Category 26 for Tab 7

eval('$forumhome_markread_script = "' . fetch_template('forumhome_markread_script')

Code:
<!-- main -->

<!-- Tabbed Forum Home Tabs Layout -->
<ul id="forumtabs" class="shadetabs"> 
<li><a href="#" rel="tcontent1" class="selected">Home</a></li> 
<li><a href="#" rel="tcontent2">Free Calls</a></li> 
<li><a href="#" rel="tcontent3">Premium Section</a></li>
<li><a href="#" rel="tcontent4">IPO</a></li>
<li><a href="#" rel="tcontent5">General</a></li> 
<li><a href="#" rel="tcontent6">Markets</a></li>
<li><a href="#" rel="tcontent7">Ask Us</a></li>
</ul> 
<!-- /Tabbed Forum Home Tabs Layout -->


<!-- Tabbed Forum Home ? START Tab 1 Content Layout -->
<div id="tcontent1" class="tabcontent">

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
    <tr align="center">
      <td class="thead">&nbsp;</td>
      <td class="thead" width="100%" align="$stylevar[left]">$vbphrase[forum]</td>
      <td class="thead" width="175">$vbphrase[last_post]</td>
      <td class="thead">$vbphrase[threads]</td>
      <td class="thead">$vbphrase[posts]</td>
      <if condition="$vboptions['showmoderatorcolumn']">
      <td class="thead">$vbphrase[moderator]</td>
      </if>
    </tr>
</thead>

$forumbits

<tbody>
    <tr>
        <td class="tfoot" align="center" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>"><div class="smallfont"><strong><a href="forumdisplay.php?$session[sessionurl]do=markread" rel="nofollow">$vbphrase[mark_forums_read]</a><if condition="$vboptions['forumleaders']">&nbsp; &nbsp;
            <a href="showgroups.php$session[sessionurl_q]" rel="nofollow">$vbphrase[view_forum_leaders]</a></if></strong></div></td>
    </tr>
</tbody>
</table>

$forumhome_markread_script

</div>
<!-- /Tabbed Forum Home ? END Tab 1 Content Layout -->

<!-- Tabbed Forum Home ? START Tab 2 Content Layout -->
<div id="tcontent2" class="tabcontent">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
    <tr align="center">
      <td class="thead">&nbsp;</td>
      <td class="thead" width="100%" align="$stylevar[left]">$vbphrase[forum]</td>
      <td class="thead" width="175">$vbphrase[last_post]</td>
      <td class="thead">$vbphrase[threads]</td>
      <td class="thead">$vbphrase[posts]</td>
      <if condition="$vboptions['showmoderatorcolumn']">
      <td class="thead">$vbphrase[moderator]</td>
      </if>
    </tr>
</thead>
<tbody>
    <tr>
        <td class="tcat" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>"><a style="float:right" href="#top" onclick="return toggle_collapse('forumbit_2525')"><img id="collapseimg_forumbit_2525" src="images/buttons/collapse_tcat.gif" alt="" border="0" /></a><a href="forumdisplay.php?f=25">Free Calls</a></td>
    </tr>
</tbody>
<tbody id="collapseobj_forumbit_2525" style="">
$forumbits2
</tbody>
<tbody>
    <tr>
        <td class="tfoot" align="center" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>"><div class="smallfont"><strong><a href="forumdisplay.php?$session[sessionurl]do=markread" rel="nofollow">$vbphrase[mark_forums_read]</a><if condition="$vboptions['forumleaders']">&nbsp; &nbsp;<a href="showgroups.php$session[sessionurl_q]" rel="nofollow">$vbphrase[view_forum_leaders]</a></if></strong></div></td>
    </tr>
</tbody>
</table>
$forumhome_markread_script
</div>
<!-- /Tabbed Forum Home ? END Tab 2 Content Layout -->



<!-- Tabbed Forum Home ? START Tab 3 Content Layout -->
<div id="tcontent3" class="tabcontent">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
    <tr align="center">
      <td class="thead">&nbsp;</td>
      <td class="thead" width="100%" align="$stylevar[left]">$vbphrase[forum]</td>
      <td class="thead" width="175">$vbphrase[last_post]</td>
      <td class="thead">$vbphrase[threads]</td>
      <td class="thead">$vbphrase[posts]</td>
      <if condition="$vboptions['showmoderatorcolumn']">
      <td class="thead">$vbphrase[moderator]</td>
      </if>
    </tr>
</thead>
<tbody>
    <tr>
        <td class="tcat" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>"><a style="float:right" href="#top" onclick="return toggle_collapse('forumbit_3030')"><img id="collapseimg_forumbit_3030" src="images/buttons/collapse_tcat.gif" alt="" border="0" /></a><a href="forumdisplay.php?f=30">Premium Section</a></td>
    </tr>
</tbody>
<tbody id="collapseobj_forumbit_3030" style="">
$forumbits3
</tbody>
<tbody>
    <tr>
        <td class="tfoot" align="center" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>"><div class="smallfont"><strong><a href="forumdisplay.php?$session[sessionurl]do=markread" rel="nofollow">$vbphrase[mark_forums_read]</a><if condition="$vboptions['forumleaders']">&nbsp; &nbsp;<a href="showgroups.php$session[sessionurl_q]" rel="nofollow">$vbphrase[view_forum_leaders]</a></if></strong></div></td>
    </tr>
</tbody>
</table>
$forumhome_markread_script
</div>
<!-- /Tabbed Forum Home ? END Tab 3 Content Layout -->




<!-- Tabbed Forum Home ? START Tab 4 Content Layout -->
<div id="tcontent4" class="tabcontent">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
    <tr align="center">
      <td class="thead">&nbsp;</td>
      <td class="thead" width="100%" align="$stylevar[left]">$vbphrase[forum]</td>
      <td class="thead" width="175">$vbphrase[last_post]</td>
      <td class="thead">$vbphrase[threads]</td>
      <td class="thead">$vbphrase[posts]</td>
      <if condition="$vboptions['showmoderatorcolumn']">
      <td class="thead">$vbphrase[moderator]</td>
      </if>
    </tr>
</thead>
<tbody>
    <tr>
        <td class="tcat" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>"><a style="float:right" href="#top" onclick="return toggle_collapse('forumbit_2828')"><img id="collapseimg_forumbit_2828" src="images/buttons/collapse_tcat.gif" alt="" border="0" /></a><a href="forumdisplay.php?f=28">IPO</a></td>
    </tr>
</tbody>
<tbody id="collapseobj_forumbit_2828" style="">
$forumbits4
</tbody>
<tbody>
    <tr>
        <td class="tfoot" align="center" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>"><div class="smallfont"><strong><a href="forumdisplay.php?$session[sessionurl]do=markread" rel="nofollow">$vbphrase[mark_forums_read]</a><if condition="$vboptions['forumleaders']">&nbsp; &nbsp;<a href="showgroups.php$session[sessionurl_q]" rel="nofollow">$vbphrase[view_forum_leaders]</a></if></strong></div></td>
    </tr>
</tbody>
</table>
$forumhome_markread_script
</div>
<!-- /Tabbed Forum Home ? END Tab 4 Content Layout -->



<!-- Tabbed Forum Home ? START Tab 5 Content Layout -->
<div id="tcontent5" class="tabcontent">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
    <tr align="center">
      <td class="thead">&nbsp;</td>
      <td class="thead" width="100%" align="$stylevar[left]">$vbphrase[forum]</td>
      <td class="thead" width="175">$vbphrase[last_post]</td>
      <td class="thead">$vbphrase[threads]</td>
      <td class="thead">$vbphrase[posts]</td>
      <if condition="$vboptions['showmoderatorcolumn']">
      <td class="thead">$vbphrase[moderator]</td>
      </if>
    </tr>
</thead>
<tbody>
    <tr>
        <td class="tcat" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>"><a style="float:right" href="#top" onclick="return toggle_collapse('forumbit_2727')"><img id="collapseimg_forumbit_2727" src="images/buttons/collapse_tcat.gif" alt="" border="0" /></a><a href="forumdisplay.php?f=25">General</a></td>
    </tr>
</tbody>
<tbody id="collapseobj_forumbit_2727" style="">
$forumbits5
</tbody>
<tbody>
    <tr>
        <td class="tfoot" align="center" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>"><div class="smallfont"><strong><a href="forumdisplay.php?$session[sessionurl]do=markread" rel="nofollow">$vbphrase[mark_forums_read]</a><if condition="$vboptions['forumleaders']">&nbsp; &nbsp;<a href="showgroups.php$session[sessionurl_q]" rel="nofollow">$vbphrase[view_forum_leaders]</a></if></strong></div></td>
    </tr>
</tbody>
</table>
$forumhome_markread_script
</div>
<!-- /Tabbed Forum Home ? END Tab 5 Content Layout -->




<!-- Tabbed Forum Home ? START Tab 6 Content Layout -->
<div id="tcontent6" class="tabcontent">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
    <tr align="center">
      <td class="thead">&nbsp;</td>
      <td class="thead" width="100%" align="$stylevar[left]">$vbphrase[forum]</td>
      <td class="thead" width="175">$vbphrase[last_post]</td>
      <td class="thead">$vbphrase[threads]</td>
      <td class="thead">$vbphrase[posts]</td>
      <if condition="$vboptions['showmoderatorcolumn']">
      <td class="thead">$vbphrase[moderator]</td>
      </if>
    </tr>
</thead>
<tbody>
    <tr>
        <td class="tcat" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>"><a style="float:right" href="#top" onclick="return toggle_collapse('forumbit_2929')"><img id="collapseimg_forumbit_2929" src="images/buttons/collapse_tcat.gif" alt="" border="0" /></a><a href="forumdisplay.php?f=25">Markets</a></td>
    </tr>
</tbody>
<tbody id="collapseobj_forumbit_2929" style="">
$forumbits6
</tbody>
<tbody>
    <tr>
        <td class="tfoot" align="center" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>"><div class="smallfont"><strong><a href="forumdisplay.php?$session[sessionurl]do=markread" rel="nofollow">$vbphrase[mark_forums_read]</a><if condition="$vboptions['forumleaders']">&nbsp; &nbsp;<a href="showgroups.php$session[sessionurl_q]" rel="nofollow">$vbphrase[view_forum_leaders]</a></if></strong></div></td>
    </tr>
</tbody>
</table>
$forumhome_markread_script
</div>
<!-- /Tabbed Forum Home ? END Tab 6 Content Layout -->



<!-- Tabbed Forum Home ? START Tab 7 Content Layout -->
<div id="tcontent7" class="tabcontent">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
    <tr align="center">
      <td class="thead">&nbsp;</td>
      <td class="thead" width="100%" align="$stylevar[left]">$vbphrase[forum]</td>
      <td class="thead" width="175">$vbphrase[last_post]</td>
      <td class="thead">$vbphrase[threads]</td>
      <td class="thead">$vbphrase[posts]</td>
      <if condition="$vboptions['showmoderatorcolumn']">
      <td class="thead">$vbphrase[moderator]</td>
      </if>
    </tr>
</thead>
<tbody>
    <tr>
        <td class="tcat" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>"><a style="float:right" href="#top" onclick="return toggle_collapse('forumbit_2626')"><img id="collapseimg_forumbit_2626" src="images/buttons/collapse_tcat.gif" alt="" border="0" /></a><a href="forumdisplay.php?f=25">Ask Us</a></td>
    </tr>
</tbody>
<tbody id="collapseobj_forumbit_2626" style="">
$forumbits7
</tbody>
<tbody>
    <tr>
        <td class="tfoot" align="center" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>"><div class="smallfont"><strong><a href="forumdisplay.php?$session[sessionurl]do=markread" rel="nofollow">$vbphrase[mark_forums_read]</a><if condition="$vboptions['forumleaders']">&nbsp; &nbsp;<a href="showgroups.php$session[sessionurl_q]" rel="nofollow">$vbphrase[view_forum_leaders]</a></if></strong></div></td>
    </tr>
</tbody>
</table>
$forumhome_markread_script
</div>
<!-- /Tabbed Forum Home ? END Tab 7 Content Layout -->





<!-- /main -->


<!-- Tabbed Forums switch tab script -->
<script type="text/javascript">
var myforumtabs=new ddtabcontent("forumtabs") 
myforumtabs.setpersist(true) 
myforumtabs.setselectedClassTarget("link") 
myforumtabs.init()
</script>
<!-- /end Tabbed Forums switch tab script -->
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01183 seconds
  • Memory Usage 1,864KB
  • 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
  • (2)bbcode_code
  • (1)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