Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons

Reply
 
Thread Tools
[AJAX] Tabbed Forum Home Details »»
[AJAX] Tabbed Forum Home
Version: 1.5.0, by bobster65 bobster65 is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Forum Home Enhancements - Version: 3.8.x Rating:
Released: 04-09-2008 Last Update: 09-02-2008 Installs: 592
Template Edits
Code Changes Additional Files Translations  
No support by the author.

Tabbed Forum Home version 1.01

[AJAX] Tabbed Forum Home version 1.5.0 (BETA)

NOTE: Works with both 3.7x and 3.6x

Description: This MOD is for creating a "Tabbed" Forum Home Page to have Categories displayed within Tab containers (similar to what the new Profile System looks like on vb3.7). Please do not confuse this with the Tab Menu System here at vbulletin.org. They are totally different systems. These Tabs actually switch the content without leaving the main forums page.

I wrote the initial Non AJAX version based on reading many requests from members asking about how namepros created their custom tabbed forum home page. The first implementation I did was a request by bbwforums.net (which you can visit to see a working example). I have shared this version with many members already and decided to release it since it seems to be something that a lot of members are interested in.

UPDATE: I have released a BETA [AJAX] version for those that what something a little more robust and easier to install/configure. This Beta version will never go into production tho as version 2.0 will utilize the YUI AJAX Tabview Toolset. It IS stable tho and is currently running on a few live sites.

NOTE: Keep in mind, I wrote this with the assumption that you are fairly well versed and comfortable with editing files/templates and following the flow of things. If there is something you don't understand, PLEASE let me know so that I can help you understand it. This IS NOT a product that a novice can just plug and play and it takes a little bit of time to setup, but its well worth it in the end (if you want a custom unique look to your forum home page)... the next version (Don't ask when, cause its just on the drawing board) will be a product with ACP controls for easy setup

The attached Zip File(s) contain the Files and Instructions necessary to install each version.

DEMO: www.bbwforums.net or www.namepros.com
[Moderator Edit: The first URL has been un-linked as there has been reported malware on that domain. The mod author may edit this notice once the situation has been cleaned.]

Screen Shots: None, visit one or both of the above links as seeing them in action is better than some static image(s)..

Bobster

Change Log

version 1.01 -
tabcontent.js ver 2.2 to support remote links
updated install instructions (both in txt and rtf format)

version 1.5.0 -
BETA [AJAX] version

July 8, 2008 - Added xml file for WOL
Sep 2, 2008 - Updated xml file for WOL

Download Now

File Type: zip Tab Forum Home 1.01.zip (22.7 KB, 3409 views)
File Type: zip AJAX Tab Forum Home 1.5.zip (13.8 KB, 4632 views)
File Type: xml tfh-wol-plugins.xml (855 Bytes, 1845 views)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #42  
Old 04-11-2008, 07:49 AM
vietfancy's Avatar
vietfancy vietfancy is offline
 
Join Date: Feb 2005
Posts: 278
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanksssss!

exactly what i needed.

I have a little problem here. It seems doesn't work for me.

I edited the index_tab.php

PHP Code:
// define max depth for forums display based on $vbulletin->options[forumhomedepth]
define('MAXFORUMDEPTH'$vbulletin->options['forumhomedepth']);

$forumbits construct_forum_bit($forumid);
    
// Construct Tabbed Forum Home forumbits 
    // Category for Tab 2, pulls forum and sub form data from Category (Forum ID 1)
    // Category 1 for Tab 1
    
$forumbits1a construct_forum_bit(1,1,0); 
    
// Category 2 for Tab 1
    
$forumbits1b construct_forum_bit(42,1,0); 
    
// Category 1 for Tab 2
    
$forumbits2a construct_forum_bit(66,1,0); 
    
// Category 2 for Tab 2
    
$forumbits2b construct_forum_bit(61,1,0); 
    
// Category 3 for Tab 2
    
$forumbits2c construct_forum_bit(26,1,0); 
    
// Category 4 for Tab 2
    
$forumbits2d construct_forum_bit(5,1,0);
    
// Category 1 for Tab 3
    
$forumbits3a construct_forum_bit(9,1,0); 
    
// Category 1 for Tab 4
    
$forumbits4a construct_forum_bit(36,1,0); 
    
// Category 2 for Tab 4
    
$forumbits4b construct_forum_bit(40,1,0); 
eval(
'$forumhome_markread_script = "' fetch_template('forumhome_markread_script') . '";');

// ### BOARD STATISTICS ################################################# 
and here is my <!-- main --> <!-- /main-->

HTML Code:
<!-- main -->


<!-- Tabbed Forum Home Tabs Layout -->
<ul id="forumtabs" class="shadetabs"> 
<li><a href="#" rel="tcontent1" class="selected">Tab 1 Name</a></li> 
<li><a href="#" rel="tcontent2">Tab 2 Name</a></li> 
<li><a href="#" rel="tcontent3">Tab 3 Name</a></li> 
<li><a href="#" rel="tcontent4">Tab 4 Name</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>

</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_1111')"><img id="collapseimg_forumbit_1111" src="images/buttons/collapse_tcat.gif" alt="" border="0" /></a><a href="forumdisplay.php?f=1">CATEGORY NAME</a></td>
    </tr>
</tbody>

<tbody id="collapseobj_forumbit_1111" style="">
$forumbits1a
</tbody>

<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_4242')"><img id="collapseimg_forumbit_4242" src="images/buttons/collapse_tcat.gif" alt="" border="0" /></a><a href="forumdisplay.php?f=42">CATEGORY NAME</a></td>
    </tr>
</tbody>

<tbody id="collapseobj_forumbit_4242" style="">
$forumbits1b
</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 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>

</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_6666')"><img id="collapseimg_forumbit_6666" src="images/buttons/collapse_tcat.gif" alt="" border="0" /></a><a href="forumdisplay.php?f=66">CATEGORY NAME</a></td>
    </tr>
</tbody>

<tbody id="collapseobj_forumbit_6666" style="">
$forumbits2a
</tbody>

<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_6161')"><img id="collapseimg_forumbit_6161" src="images/buttons/collapse_tcat.gif" alt="" border="0" /></a><a href="forumdisplay.php?f=61">CATEGORY NAME</a></td>
    </tr>
</tbody>

<tbody id="collapseobj_forumbit_6161" style="">
$forumbits2b
</tbody>
<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=26">CATEGORY NAME</a></td>
    </tr>
</tbody>

<tbody id="collapseobj_forumbit_2626" style="">
$forumbits2c
</tbody>

<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_555')"><img id="collapseimg_forumbit_555" src="images/buttons/collapse_tcat.gif" alt="" border="0" /></a><a href="forumdisplay.php?f=5">CATEGORY NAME</a></td>
    </tr>
</tbody>

<tbody id="collapseobj_forumbit_555" style="">
$forumbits2d
</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 3 Content Layout -->
<div id="tcontent3" class="tabcontent">

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>

</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_99')"><img id="collapseimg_forumbit_99" src="images/buttons/collapse_tcat.gif" alt="" border="0" /></a><a href="forumdisplay.php?f=6">CATEGORY NAME</a></td>
    </tr>
</tbody>

<tbody id="collapseobj_forumbit_99" style="">
$forumbits3a
</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>

</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_3636')"><img id="collapseimg_forumbit_3636" src="images/buttons/collapse_tcat.gif" alt="" border="0" /></a><a href="forumdisplay.php?f=36">CATEGORY NAME</a></td>
    </tr>
</tbody>

<tbody id="collapseobj_forumbit_3636" style="">
$forumbits4a
</tbody>

<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_4040')"><img id="collapseimg_forumbit_4040" src="images/buttons/collapse_tcat.gif" alt="" border="0" /></a><a href="forumdisplay.php?f=40">CATEGORY NAME</a></td>
    </tr>
</tbody>

<tbody id="collapseobj_forumbit_4040" style="">
$forumbits4b
</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 -->

<!-- /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 -->
What did i do wrong?

Edited: I fixed it. Thanks for a cool hack.
Reply With Quote
  #43  
Old 04-11-2008, 11:46 AM
Hornstar Hornstar is offline
 
Join Date: Jun 2005
Location: Australia
Posts: 2,469
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My tab 1 is working, but tab 2 and tab 3 just display white under neath the tabs, no forums show up at all.

I used your code first, then modified it to my categories and names, but still just white.

Any idea what I may be missing?
Reply With Quote
  #44  
Old 04-11-2008, 11:59 AM
bobster65's Avatar
bobster65 bobster65 is offline
 
Join Date: Mar 2006
Location: Montana
Posts: 1,169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by hornstar1337 View Post
My tab 1 is working, but tab 2 and tab 3 just display white under neath the tabs, no forums show up at all.

I used your code first, then modified it to my categories and names, but still just white.

Any idea what I may be missing?
Hey Matt, can you post your Code so I can take a look at it (You can PM me if you wish)..
Reply With Quote
  #45  
Old 04-11-2008, 12:38 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 CHIPIT View Post
Thanks! Great mod, installed and nominated.
One thing though...

For dynamically selecting a tab we're supposed to use
<a href="javascript:instance.expandit(1)">Select 2nd Tab</a>

What is exactly is the instance? How is it defined? and when you say tab# starting with 0, would the first one (0) be the one with the first tabbed link, the first one in the code itself, or tcontent1??
Thank you

To answer your first question, the instance is the var name in this chunk of script that you added in Step 16: (Bold Red)

Code:
<!-- 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 -->

So to further expand on this function: instance.expandit(tabid_or_position)

This method lets you dynamically select any tab based on either its ID attribute (you need to first assign one to that tab), or position relative to its peer tab links. The method can be called anywhere on the page, such as inside a link on the page.

Parameter:

tabid or position: Either a string representing the tab link's ID, or an integer corresponding to that tab's position relative to its peers, to select. For the later, the counting starts at 0 (ie: 0=Tab 1, 1=Tab 2, 2=Tab 3 and so on).

So to answer your question, 0=the first tab. tcontent1=the content of the tab itself, not the ID of the tab.

Example:

Based on the following sample tabs layout, I added a tab ID to Tab 2. You don't need to do this as you can also just call the position as well.

Code:
<ul id="forumtabs" class="shadetabs">
<li><a href="#" rel="tcontent1" class="selected">Tab 1</a></li>
<li><a href="#" rel="tcontent2" id="roses">Tab 2</a></li>
<li><a href="#" rel="tcontent3">Tab 3</a></li>
<li><a href="#" rel="tcontent4">Tab 4</a></li>
</ul>

Here are some examples of how the links can be used:

This one uses the position parameter:
Code:
<!--Selects 4TH tab within instance "myforumtabs" -->
<a href="javascript:myforumtabs.expandit(3)">Tab 4</a>

this one uses the tabid parameter
:
Code:
<!--Selects tab with ID="roses" within instance "myforumtabs" -->
<a href="javascript:myforumtabs.expandit('roses')">Select "Roses" tab</a>

Hope that helped out and answered your questions..

Bobster
Reply With Quote
  #46  
Old 04-11-2008, 02:09 PM
Big Boss's Avatar
Big Boss Big Boss is offline
 
Join Date: Jan 2008
Location: Cleveland, OH
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh my God! I was looking for this mod as I've seen it on vBSEO and it's finally here. Thanks a lot for the release!

Any plans on porting this over to 3.7.x as well?
Reply With Quote
  #47  
Old 04-11-2008, 02:10 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 Big Boss View Post
Oh my God! I was looking for this mod as I've seen it on vBSEO and it's finally here. Thanks a lot for the release!

Any plans on porting this over to 3.7.x as well?
Works fine with 3.7.x just not going to create a thread in the 3.7 forum until it goes gold
Reply With Quote
  #48  
Old 04-11-2008, 04:44 PM
kollam003 kollam003 is offline
 
Join Date: May 2007
Posts: 154
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i'm fixed i'm not much into editing could you have a look and help me : www.indianprofits.com
Reply With Quote
  #49  
Old 04-11-2008, 04:45 PM
tmiland tmiland is offline
 
Join Date: Mar 2008
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yo!
Is there any way to make the forum remember the collapse position?
Doesnt work now...
Reply With Quote
  #50  
Old 04-11-2008, 04:57 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 tmiland View Post
Yo!
Is there any way to make the forum remember the collapse position?
Doesnt work now...
you are correct.. I didn't even notice that (don't use the collapse feature much).. I'll have to look into it when I get time. Should be an easy fix tho. Thank you for pointing it out and its added to the list of "needs"
Reply With Quote
  #51  
Old 04-11-2008, 04:58 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
i'm fixed i'm not much into editing could you have a look and help me : www.indianprofits.com
What do you need help with?
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:32 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.19628 seconds
  • Memory Usage 2,418KB
  • Queries Executed 27 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (1)bbcode_html
  • (1)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (3)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • 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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete