• 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
    • Island articles as chapters in Books

    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: Island articles as chapters in Books

    • Issue Tools
      • View Changes
    1. issueid=2614 March 14, 2012 11:31 PM
      nasko nasko is offline
      New Member
      Island articles as chapters in Books

      So I created some Island articles and added them as chapters in a Book, but when I'm browsing the Book the navigation links list ← Previous: Island:55191 instead of ← Previous: Article Name.

      Can this be fixed?
    Issue Details
    Issue Number 2614
    Issue Type Bug
    Project VaultWiki 3.x Series
    Category Books / Chapters
    Status Fixed
    Priority 8 - Major Features / Enhancements
    Affected Version 3.0.16
    Fixed Version 3.0.17
    Milestone (none)
    Software DependencyAny
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. March 15, 2012 8:34 AM
      pegasus pegasus is offline
      VaultWiki Team
      Fixing this will require an extra query to the database to get the real name of the Island page. It can be optimized to only do this if the very prev/next chapters are an Island. In vault/factory/postbit.php, find:
      Code:
      					if ($this->book['nextid'] !== null)
      					{
      						$vault->fetch_instance('article');
      						$nextchapter = $vault->article->fetch($this->book['nextid'], $vault->field->fetch_namespaceid($this->book['nextparent']), VAULT_LANGUAGEID, '*', 'id');
      						$vault->url->generate($nextchapter);
      
      						if ($vault->field->get('options', $nextchapter['namespaceid']) & $vault->misc['namespaceoptions']['constant'])
      						{
      							$nextchapter['displaytitle'] = $nextchapter['title'];
      						}
      						else
      						{
      							$nextchapter['displaytitle'] = $nextchapter['fulltitle'];
      						}
      					}
      
      					if ($this->book['previd'] !== null)
      					{
      						$vault->fetch_instance('article');
      						$prevchapter = $vault->article->fetch($this->book['previd'], $vault->field->fetch_namespaceid($this->book['prevparent']), VAULT_LANGUAGEID, '*', 'id');
      						$vault->url->generate($prevchapter);
      
      						if ($vault->field->get('options', $prevchapter['namespaceid']) & $vault->misc['namespaceoptions']['constant'])
      						{
      							$prevchapter['displaytitle'] = $prevchapter['title'];
      						}
      						else
      						{
      							$prevchapter['displaytitle'] = $prevchapter['fulltitle'];
      						}
      					}
      Replace with:
      Code:
      					if ($this->book['nextid'] !== null)
      					{
      						$vault->fetch_instance('article');
      						$nextchapter = $vault->article->fetch($this->book['nextid'], $vault->field->fetch_namespaceid($this->book['nextparent']), VAULT_LANGUAGEID, '*', 'id');
      						$vault->url->generate($nextchapter);
      
      						if ($nextchapter['namespaceid'] == ISLAND_SPACE)
      						{
      							$fetchids[] = $this->book['nextid'];
      						}
      					}
      
      					if ($this->book['previd'] !== null)
      					{
      						$vault->fetch_instance('article');
      						$prevchapter = $vault->article->fetch($this->book['previd'], $vault->field->fetch_namespaceid($this->book['prevparent']), VAULT_LANGUAGEID, '*', 'id');
      						$vault->url->generate($prevchapter);
      
      						if ($nextchapter['namespaceid'] == ISLAND_SPACE)
      						{
      							$fetchids[] = $this->book['previd'];
      						}
      					}
      
      					if ($fetchids)
      					{
      						$islands = $this->registry->db->query_read("
      							SELECT title, threadid
      							FROM " . TABLE_PREFIX . "thread
      							WHERE threadid IN (" . implode(',', $fetchids) . ")
      						");
      
      						while ($island = $this->registry->db->fetch_array($islands))
      						{
      							if ($island['threadid'] == $this->book['nextid'])
      							{
      								$nextchapter['title'] = $island['title'];
      							}
      							else
      							{
      								$prevchapter['title'] = $island['title'];
      							}
      						}
      						$this->registry->db->free_result($islands);
      						unset($island);
      					}
      
      					if ($nextchapter)
      					{
      						if ($nextchapter['namespaceid'] == ISLAND_SPACE OR $vault->field->get('options', $nextchapter['namespaceid']) & $vault->misc['namespaceoptions']['constant'])
      						{
      							$nextchapter['displaytitle'] = $nextchapter['title'];
      						}
      						else
      						{
      							$nextchapter['displaytitle'] = $nextchapter['fulltitle'];
      						}
      					}
      
      					if ($prevchapter)
      					{
      						if ($prevchapter['namespaceid'] == ISLAND_SPACE OR $vault->field->get('options', $prevchapter['namespaceid']) & $vault->misc['namespaceoptions']['constant'])
      						{
      							$prevchapter['displaytitle'] = $prevchapter['title'];
      						}
      						else
      						{
      							$prevchapter['displaytitle'] = $prevchapter['fulltitle'];
      						}
      					}
      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 8:13 PM.
    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.