• 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
    • Feature
    • Class Proxy System Like XenForo

    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: Class Proxy System Like XenForo

    • Issue Tools
      • View Changes
    1. issueid=3960 August 26, 2014 5:00 PM
      pegasus pegasus is offline
      VaultWiki Team
      Class Proxy System Like XenForo

      As some add-on developers have complained, especially XenForo add-on developers, it is not possible to extend many VaultWiki core classes if needed by the add-on -- at least not without requiring vault/config.php changes, and not without interfering with other similar add-ons.

      In the next release, VaultWiki will feature a class proxying system similar to the system XenForo uses. The system can be accessed using new effect locations vw_load_controller, vw_load_model, and vw_load_view through your forum software's existing plugin system and creating the plugin normally.

      The vw_load_* events work similarly to XenForo's load_class events, but there are some slight differences in the code contents for VaultWiki:
      Code:
      if ($baseClass == 'Path/to/Class') // not including vw, Controller/etc, or dependency
      {
      $extends[] = 'My/Class';
      }
      Your class should be defined as follows (using controller-type as an example), in vault/plugins/controller/my/class/vw.php:
      Code:
      class vw_My_Class_Controller_Plugin extends vw_My_Class_Controller_Proxy
      {
      // extend stuff here
      }
      Say you want to add different versions for vBulletin, XenForo, etc that extend from your existing plugin. Create vault/plugins/controller/my/class/vb3.php:
      Code:
      require_once(vw_Hard_Core::get_dir('plugin') . '/controller/my/class/vw.php');
      
      class vw_My_Class_Controller_Plugin_vB3 extends vw_My_Class_Controller_Plugin
      {
      // extend even more here
      }
      Note that due to limitations in vBulletin 3 and 4, many classes are not available for extension all the time, because they might already loaded before vBulletin boots up. Examples include vw_Route_Controller, vw_User_Model, vw_Settings_Model, vw_Datastore_Model, vw_Start_Model, and more.

      These limitations do not exist in XenForo.

      However, regardless of forum platform, you cannot extend vw_Hard_Core, vw_Dependency_Model, or other classes that are instantiated outside of vw_Hard_Core::fetch_object.
    Issue Details
    Issue Number 3960
    Issue Type Feature
    Project VaultWiki 4.x Series
    Category Plugin System
    Status Implemented
    Priority 7 - Minor Features / Enhancements
    Suggested Version 4.0.0 RC 2
    Implemented Version 4.0.0 RC 3
    Milestone VaultWiki 4.0 Gold
    Software DependencyAny
    License TypePaid
    Votes for this feature 0
    Votes against this feature 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. October 12, 2019 3:53 PM
      fb88betasia fb88betasia is offline
      New Member
      Thank for your sharing! do you have link or video of this plan, i'm looking for this and do some task for my staff
      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:38 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.