• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
    • Wiki
    • Support
      • Manage Subscriptions
      • FAQ
      • Support For
        • VaultWiki 4.x Series
        • VaultWiki.org Site
    • What's New?
    • Buy Now
    • Manual
    • 
    • Support
    • VaultWiki 3.x Series
    • Bug
    • TOC Nesting Issue

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    Issue: TOC Nesting Issue

    • Issue Tools
      • View Changes
    1. issueid=793 August 21, 2009 9:58 PM
      pegasus pegasus is offline
      VaultWiki Team
      TOC Nesting Issue

      When decreasing the H level by more than 1, the TOC nesting doesn't decrease by the appropriate amount.

      Fixed for the next build by removing standard deviation and just tracking the open level numbers.
    Issue Details
    Issue Number 793
    Issue Type Bug
    Project VaultWiki 3.x Series
    Category Headlines / Sections
    Status Fixed
    Priority 4 - Warnings / Script Errors
    Affected Version 2.5.1
    Fixed Version 2.5.2
    Milestone (none)
    Software DependencyAny
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. August 22, 2009 4:52 AM
      pegasus pegasus is offline
      VaultWiki Team
      After some users' requests, you can fix this yourself by making the following changes to vault/special_functions_postbit.php. Find:
      Code:
      		$done = array();
      Add after:
      Code:
      		$zero = array();
      Find and delete:
      Code:
      	if ($depth > 7)
      	{
      		$depth = 7;
      	}
      Find and delete:
      Code:
      	$zero["$depth"] = $depth;
      Find:
      Code:
      		if ($list["$hix"]['level'] > $zero["$depth"])
      		{
      			if ($list["$hix"]['level'] < $depth2)
      			{
      				$depth2 = $depth;
      			}
      			else if ($hix == $offset)
      			{
      				$zero["$depth"] = $list["$hix"]['level'];
      				$depth2 = $depth;
      			}
      			else if ($list["$hix"]['level'] == $zero["$depth"])
      			{
      				$depth2 = $depth;
      			}
      			else
      			{
      				$depth2 = $depth + 1;
      			}
      		}
      		else if ($list["$hix"]['level'] < $zero["$depth"])
      		{
      			$depth2 = $depth - 1;
      
      			if ($depth2 < $zero[1])
      			{
      				$depth2 = $zero[1];
      			}
      		}
      Replace with:
      Code:
      		if ($list["$hix"]['level'] > $last)
      		{
      			if ($hix == $offset)
      			{
      				$zero[] = $list["$hix"]['level'];
      				$last = $list["$hix"]['level'];
      				$depth2 = $depth;
      			}
      			else
      			{
      				$depth2 = $depth + 1;
      			}
      		}
      		else if ($list["$hix"]['level'] < $last)
      		{
      			$depth2 = $depth - 1;
      		}
      Find and delete:
      Code:
      		if ($depth2 > 7)
      		{
      			$depth2 = 7;
      		}
      Find:
      Code:
      			$tocbits .= construct_tocbits($list, $hix, $depth2, $depthmark . intval($number - 1) . '.');
      Add after:
      Code:
      			array_pop($zero);
      Reply Reply  
    2. August 22, 2009 5:35 AM
      Storyteller Storyteller is offline
      Junior Member
      Thanks a lot works fine now!
      Reply Reply  
    + Reply

    Assigned Users
    Loading Please Wait
    Tags
    Loading Please Wait
    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 4:07 AM.
    This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2023 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2023 DragonByte Technologies Ltd.
    Copyright © 2008 - 2013 VaultWiki Team, Cracked Egg Studios, LLC.