View Single Post
  #382  
Old 08-20-2008, 07:41 AM
Brother Malachi Brother Malachi is offline
 
Join Date: Jun 2008
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bobster65 View Post
Pretty easy actually ..

I am going to assume you already installed this and am only going to give you the changes you need to make for this to work with TFH ..

FIND THIS in (includes/functions_forumlist.php ) File

Code:
if (THIS_SCRIPT == 'index' AND $forum['subforumcolumns'] != 1 AND ($subsonly OR $depth < MAXFORUMDEPTH))
        {
            $childforumbits = construct_forum_columns($forum['forumid'], $forum['subforumcolumns']);
        }
        else if ($subsonly)
        {
            $childforumbits = construct_forum_bit($forum['forumid'], 1, $subsonly);
        }
        else if ($depth < MAXFORUMDEPTH)
        {
            $childforumbits = construct_forum_bit($forum['forumid'], $depth, $subsonly);
        }
        else
        {
            $childforumbits = '';
        }
REPLACE with THIS (NOTE: New Code is highlighted in red ... )

Code:
if (THIS_SCRIPT == 'index' AND $forum['subforumcolumns'] != 1 AND ($subsonly OR $depth < MAXFORUMDEPTH))
        {
            $childforumbits = construct_forum_columns($forum['forumid'], $forum['subforumcolumns']);
        }
        else if (THIS_SCRIPT == 'tabforumhome' or 'index' AND $forum['subforumcolumns'] != 1 AND ($subsonly OR $depth < MAXFORUMDEPTH))
        {
            $childforumbits = construct_forum_columns($forum['forumid'], $forum['subforumcolumns']);
        }
        else if ($subsonly)
        {
            $childforumbits = construct_forum_bit($forum['forumid'], 1, $subsonly);
        }
        else if ($depth < MAXFORUMDEPTH)
        {
            $childforumbits = construct_forum_bit($forum['forumid'], $depth, $subsonly);
        }
        else
        {
            $childforumbits = '';
        }
THEN CHECK/EDIT your forumhome_forumbit_level1_nopost Template

NOTE: You should have this step already done if you installed both properly..

NOTE: Red Highlite = TFH Code Green Highlite= Forums arranged in columns on forumhome Code Black Code = Default vB (yours might be slightly different if you have a custom style, however, the colored stuff HAS to be exact) ..

Code:
<if condition="(THIS_SCRIPT == 'tabforumhome' AND in_array($forum['forumid'], $GLOBALS[tabcats])) OR THIS_SCRIPT == 'forumdisplay'">
<tbody>
    <tr>
        <td class="tcat" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>">
            <if condition="$childforumbits">
            <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumbit_$forumid')"><img id="collapseimg_forumbit_$forumid" src="$stylevar[imgdir_button]/collapse_tcat{$collapseimg_forumid}.gif" alt="" border="0" /></a>
            </if>
            <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>
            <if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
            <if condition="$show['subforums']"><div class="smallfont"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
        </td>
    </tr>
</tbody>

<if condition="$childforumbits">
<tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
<if condition="$forum['subforumcolumns'] > 1">
    <tr>
        <td class="alt1" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>">
<table style="border: none; width: 100%;">
            $childforumbits
</table>
        </td>
    </tr>
<else />
    $childforumbits
</if>
</tbody>
</if>
</if>
This works fine on both default vB and with Custom styles (I tested both this AM)
Wow dude, thank you very much! Much appreciated. I've been messing with that php code for quite some time now and didn't realize I had to add another block of else/if. Instead I was modifying the first if statement.

Anyway, here's a quick question. Currently we have the old version of your tabbed hack and it works just fine. I'm not planning on installing the AJAX one just yet. Anyway, are the template edits you posted above for the AJAX version?
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01205 seconds
  • Memory Usage 1,801KB
  • 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
  • (3)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