Changeset 230896
- Timestamp:
- 04/20/2010 07:03:35 AM (16 years ago)
- Location:
- private-network/trunk
- Files:
-
- 2 edited
-
private-network.php (modified) (3 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
private-network/trunk/private-network.php
r85109 r230896 1 1 <?php 2 2 /* 3 Plugin Name: Private Network4 Plugin URI: http://www.andreabelvedere.com/private-network5 Description: Allows Administrators at different WordPress installations, for example www.alice.com and www.bob.com, to share their posts within categories, posts with selected tags or single posts and pages. Within categories and tags is possible to share only private or include public posts.6 Author: Andrea Belvedere7 Version: 1.1 8 Author URI: http://www.andreabelvedere.com/3 Plugin Name: Private Network 4 Plugin URI: http://www.andreabelvedere.com/private-network 5 Description: Allows Administrators at different WordPress installations, for example www.alice.com and www.bob.com, to share their posts within categories, posts with selected tags or single posts and pages. Within categories and tags is possible to share only private or include public posts. 6 Author: Andrea Belvedere 7 Version: 1.2 8 Author URI: http://www.andreabelvedere.com/ 9 9 */ 10 10 /* Copyright 2008 Andrea Belvedere (email : scieck at gmail dot com) … … 24 24 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 25 25 */ 26 define('PN_VERSION', '1. 1');26 define('PN_VERSION', '1.2'); 27 27 define('PN_DB_VERSION', '1.1'); 28 28 define('PN_PROTOCOL', '1.0'); … … 43 43 44 44 45 function __autoload($class)45 function pn_autoload($class) 46 46 { 47 if (class_exists($class, false) || interface_exists($class, false)) {48 return;49 }50 $classfile = str_replace("_", "/", $class) . ".php";47 if (class_exists($class, false) || interface_exists($class, false)) { 48 return; 49 } 50 $classfile = str_replace("_", "/", $class) . ".php"; 51 51 52 $include_path = array(PN_DIR.'/controller',53 PN_DIR.'/lib',54 PN_DIR.'/include',55 PN_DIR.'/model');52 $include_path = array(PN_DIR.'/controller', 53 PN_DIR.'/lib', 54 PN_DIR.'/include', 55 PN_DIR.'/model'); 56 56 57 foreach ($include_path as $path) {58 $classpath = $path.'/'.$classfile;59 if(file_exists($classpath)) {60 include_once $classpath;61 return;62 }63 }57 foreach ($include_path as $path) { 58 $classpath = $path.'/'.$classfile; 59 if(file_exists($classpath)) { 60 include_once $classpath; 61 return; 62 } 63 } 64 64 } 65 65 66 66 class PrivateNetwork 67 67 { 68 protected $_pnSession;68 protected $_pnSession; 69 69 70 public function __construct()71 {72 $this->_pnSession = new pnSession();73 register_activation_hook( __FILE__, array(&$this, 'activate_pn'));74 register_deactivation_hook( __FILE__, array(&$this, 'deactivate_pn'));75 add_action('shutdown', array(&$this->_pnSession, 'cleanSession'));76 if (is_admin()) {77 new pnAdminController();78 }79 else {80 new pnPrivateNetworkController();81 }82 }70 public function __construct() 71 { 72 $this->_pnSession = new pnSession(); 73 register_activation_hook( __FILE__, array(&$this, 'activate_pn')); 74 register_deactivation_hook( __FILE__, array(&$this, 'deactivate_pn')); 75 add_action('shutdown', array(&$this->_pnSession, 'cleanSession')); 76 if (is_admin()) { 77 new pnAdminController(); 78 } 79 else { 80 new pnPrivateNetworkController(); 81 } 82 } 83 83 84 public function activate_pn()85 {86 $contact = new pnContact();87 $contact->create();88 $admin = new pnAdmin();89 $admin->create();90 $this->_pnSession->create();91 $acl = new pnACL();92 $acl->create();93 }84 public function activate_pn() 85 { 86 $contact = new pnContact(); 87 $contact->create(); 88 $admin = new pnAdmin(); 89 $admin->create(); 90 $this->_pnSession->create(); 91 $acl = new pnACL(); 92 $acl->create(); 93 } 94 94 95 public function deactivate_pn()96 {97 98 }95 public function deactivate_pn() 96 { 97 98 } 99 99 } 100 if (false === spl_autoload_functions()) 101 { 102 if (function_exists('__autoload')) { 103 spl_autoload_register('__autoload'); 104 } 105 } 106 spl_autoload_register('pn_autoload'); 100 107 101 108 new PrivateNetwork(); -
private-network/trunk/readme.txt
r85938 r230896 4 4 Tags: post, page, private, network, private network 5 5 Requires at least: 2.5.0 6 Tested up to: 2. 77 Stable tag: 1. 16 Tested up to: 2.9.2 7 Stable tag: 1.2 8 8 9 9 Allows Administrators at different WP installations, for example alice.com and bob.com, to share remotely their private and public posts and pages. … … 14 14 15 15 = How does it work: = 16 Lets say that Alice, the Administrator of www.alice.com wants to share her private posts with her best friend Bob, the Administrator of www.bob.com; 16 Lets say that Alice, the Administrator of www.alice.com wants to share her private posts with her best friend Bob, the Administrator of www.bob.com; 17 17 this are the steps that both Alice and Bob would have to follow: 18 18 … … 31 31 = Features = 32 32 33 * Version 1.2 - No features enhancement in this release, bug fixes only (i.e. better class autoloading) 33 34 * Version 1.1 - Share entire categories, posts with specific tags, single posts or pages. 34 35 * Version 1.1 - Possible to share both private and public items
Note: See TracChangeset
for help on using the changeset viewer.