• 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 4.x Series
    • Bug
    • Content Integration "Manage" where it should not be?

    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: Content Integration "Manage" where it should not be?

    • Issue Tools
      • View Changes
    1. issueid=4097 December 9, 2014 10:47 AM
      Ptah Ptah is offline
      Junior Member
      Content Integration "Manage" where it should not be?
      "Manage" button for wiki content integration appears where it should not

      Situation:

      For a particular forum, I have "Allow Content Integration" set to "No". I am still seeing the "Manage" bar/button over threads in it, even for users/groups that themselves ought not have any such power per their settings.
    Issue Details
    Issue Number 4097
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Headers / Wiki Blocks
    Status Fixed
    Priority 5 - Minor Bugs / Small Tweaks
    Affected Version 4.0.0 RC 5
    Fixed Version (none)
    Milestone (none)
    Software DependencyvBulletin 4.x w/ ckEditor
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. December 9, 2014 11:24 AM
      pegasus pegasus is offline
      VaultWiki Team
      In vault/core/model/ui/tab/forum/vb3.php, find:
      Code:
      		if (
      			$item['active'] AND
      			$item['allowposting'] AND
      			$item['cancontainthreads'] AND
      			$item['vw_options'] AND
      			($item['vw_options'] & vw_Hard_Core::model('Bitfield')->get_bit('misc', 'vw_container_options', 'header2'))
      		)
      		{
      			global $vbulletin;
      
      			$forumperms = fetch_permissions($item['forumid'], $user['userid'], $user);
      
      			if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canpostnew']))
      			{
      				return false;
      			}
      
      			return true;
      		}
      
      		return can_moderate($item['forumid'], '', $user['userid']);
      Replace with:
      Code:
      		if (
      			$item['active'] AND
      			$item['allowposting'] AND
      			$item['cancontainthreads'] AND
      			$item['vw_options']
      		)
      		{
      			if ($item['vw_options'] & vw_Hard_Core::model('Bitfield')->get_bit('misc', 'vw_container_options', 'header2'))
      			{
      				global $vbulletin;
      
      				$forumperms = fetch_permissions($item['forumid'], $user['userid'], $user);
      
      				if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canpostnew']))
      				{
      					return false;
      				}
      
      				return true;
      			}
      			else if ($item['vw_options'] & vw_Hard_Core::model('Bitfield')->get_bit('misc', 'vw_container_options', 'header'))
      			{
      				return can_moderate($item['forumid'], '', $user['userid']);
      			}
      		}
      
      		return false;
      In vault/core/model/ui/tab/thread/vb3.php, find:
      Code:
      		if (
      			!$item['open'] OR
      			!$userid OR
      			$userid != $item['postuserid']
      		)
      		{
      			$forum = vw_Hard_Core::controller('Fetch')->get('Forum', $item['forumid']);
      
      			if (empty($forum))
      			{
      				// this thread is orphaned...
      				return false;
      			}
      
      			$forumperms = fetch_permissions($item['forumid'], $userid, $user);
      
      			if (!empty($forum['vw_options']) AND ($forum['vw_options'] & vw_Hard_Core::model('Bitfield')->get_bit('misc', 'vw_container_options', 'header2')))
      			{
      				if (!$forumperms & vw_Hard_Core::model('Bitfield')->get_bit('ugp', 'forumpermissions', 'canreplyothers'))
      				{
      					return false;
      				}
      			}
      			else if (
      				!($forumperms & vw_Hard_Core::model('Bitfield')->get_bit('ugp', 'forumpermissions', 'caneditpost')) AND
      				!can_moderate($item['forumid'], 'caneditposts', $user['userid'])
      			)
      			{
      				return false;
      			}
      		}
      
      		return true;
      Replace with:
      Code:
      		$forum = vw_Hard_Core::controller('Fetch')->get('Forum', $item['forumid']);
      
      		if (empty($forum))
      		{
      			// this thread is orphaned...
      			return false;
      		}
      
      		if (!empty($forum['vw_options']))
      		{
      			$forumperms = fetch_permissions($item['forumid'], $userid, $user);
      
      			if ($forum['vw_options'] & vw_Hard_Core::model('Bitfield')->get_bit('misc', 'vw_container_options', 'header2'))
      			{
      				if (!$userid OR $userid != $item['postuserid'])
      				{
      					if (!$forumperms & vw_Hard_Core::model('Bitfield')->get_bit('ugp', 'forumpermissions', 'canreplyothers'))
      					{
      						return false;
      					}
      				}
      
      				if (!$item['open'] AND !can_moderate($item['forumid'], 'caneditposts', $user['userid']))
      				{
      					return false;
      				}
      
      				return true;
      			}
      			else if ($forum['vw_options'] & vw_Hard_Core::model('Bitfield')->get_bit('misc', 'vw_container_options', 'header'))
      			{
      				if (
      					!($forumperms & vw_Hard_Core::model('Bitfield')->get_bit('ugp', 'forumpermissions', 'caneditpost')) AND
      					!can_moderate($item['forumid'], 'caneditposts', $user['userid'])
      				)
      				{
      					return false;
      				}
      
      				return true;
      			}
      		}
      
      		return false;
      Reply Reply  
    2. December 9, 2014 1:11 PM
      Ptah Ptah is offline
      Junior Member
      Thanks! That gets the "Manage" bar/button working as expected per settings and permissions set.
      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 5:26 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.