Lets say, I want an affiliate plugin that I bought for WP to work on Modx. What are the procedures to follow? Yes, you can assume that all the plugins I bought use php, javascript, and jquery.
问题:
回答1:
You need to refactoring your plugin to modx snippets and chunks - http://www.cmslesstraveled.com/index/tutorials/refactoring-a-simple-php-application-for-modx.html
回答2:
You can use internal Wordpress functions by including this file include_once($_SERVER['DOCUMENT_ROOT'].'/wp-load.php' );
You can try including the file in one of your modx templates and then see if it gives you access to your affiliate plugin functions.
Vice-Versa you could include modx into your wordpress theme files by adding this code.
define('MODX_CORE_PATH', 'full/path/to/your/modx/core/'); define('MODX_CONFIG_KEY', 'config'); require_once MODX_CORE_PATH . 'model/modx/modx.class.php'; $modx= new modX(); $modx->initialize('mgr');
This will give you access to the $modx object and all it's wonders.
Source: http://www.quora.com/MODX-CMS/How-would-WordPress-plugins-need-to-be-recoded-in-order-to-work-in-MODX