Source Code Documentation


s2member\includes\menu-pages\integrations.inc.php


  1. <?php
  2. /**
  3. * Menu page for the s2Member plugin (Integrations page).
  4. *
  5. * Copyright: © 2009-2011
  6. * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
  7. * (coded in the USA)
  8. *
  9. * Released under the terms of the GNU General Public License.
  10. * You should have received a copy of the GNU General Public License,
  11. * along with this software. In the main directory, see: /licensing/
  12. * If not, see: {@link http://www.gnu.org/licenses/}.
  13. *
  14. * @package s2Member\Menu_Pages
  15. * @since 3.0
  16. */
  17. if(realpath(__FILE__) === realpath($_SERVER["SCRIPT_FILENAME"]))
  18. exit("Do not access this file directly.");
  19.  
  20. if(!class_exists("c_ws_plugin__s2member_menu_page_integrations"))
  21. {
  22. /**
  23. * Menu page for the s2Member plugin (Integrations page).
  24. *
  25. * @package s2Member\Menu_Pages
  26. * @since 110531
  27. */
  28. class c_ws_plugin__s2member_menu_page_integrations
  29. {
  30. public function __construct()
  31. {
  32. echo '<div class="wrap ws-menu-page">'."\n";
  33.  
  34. echo '<div id="icon-plugins" class="icon32"><br /></div>'."\n";
  35. echo '<h2>Other s2Member® Integrations</h2>'."\n";
  36.  
  37. echo '<table class="ws-menu-page-table">'."\n";
  38. echo '<tbody class="ws-menu-page-table-tbody">'."\n";
  39. echo '<tr class="ws-menu-page-table-tr">'."\n";
  40. echo '<td class="ws-menu-page-table-l">'."\n";
  41.  
  42. do_action("ws_plugin__s2member_during_integrations_page_before_left_sections", get_defined_vars());
  43.  
  44. if(apply_filters("ws_plugin__s2member_during_integrations_page_during_left_sections_display_bbpress", true, get_defined_vars()))
  45. {
  46. do_action("ws_plugin__s2member_during_integrations_page_during_left_sections_before_bbpress", get_defined_vars());
  47.  
  48. echo '<div class="ws-menu-page-group" title="bbPress® Plugin Integration (2.0+ plugin version)" default-state="open">'."\n";
  49.  
  50. echo '<div class="ws-menu-page-section ws-plugin--s2member-bbpress-section">'."\n";
  51. echo '<h3>bbPress® Plugin Integration (easy peasy)</h3>'."\n";
  52. echo '<input type="button" value="Update Roles/Capabilities" class="ws-menu-page-right ws-plugin--s2member-update-roles-button" style="min-width:175px;" />'."\n";
  53. echo '<p>The plugin version of <a href="http://www.s2member.com/bbpress-plugin" target="_blank" rel="external">bbPress® 2.0+</a> integrates seamlessly with WordPress®. If bbPress® was already installed when you activated s2Member, your s2Member Roles/Capabilities are already configured to work in harmony with bbPress®. If you didn\'t, you can simply click the "Update Roles/Capabilities" button here. That\'s all it takes. Once your Roles/Capbilities are updated, s2Member and bbPress® are fully integrated with each other.</p>'."\n";
  54. echo '<p><strong>See also:</strong> This KB article: <a href="http://www.s2member.com/kb/roles-caps/#s2-roles-caps" target="_blank" rel="external">s2Member® Roles/Capabilities (Including <strong>bbPress®</strong> Support)</a>.</p>'."\n";
  55.  
  56. echo '<div class="ws-menu-page-hr"></div>'."\n";
  57.  
  58. echo '<h3>bbPress® Forums and s2Member Roles/Capabilities</h3>'."\n";
  59. echo '<p>s2Member configures your Membership Roles (by default, these include: <em>s2Member Level 1</em>, <em>s2Member Level 2</em>, <em>s2Member Level 3</em>, <em>s2Member Level 4</em>), with a default set of bbPress® permissions that allow all Members to both spectate and particpate in your forums, just as if they were a WordPress® Subscriber Role (or a bbPress® Participant Role).</p>'."\n";
  60. echo '<p>bbPress® also adds some new Roles (dynamic Roles in bbPress® 2.2+) to your WordPress® installation. These include but are not limited to: <em>Keymaster</em> and <em>Moderator</em>. s2Member allows Forum Keymasters &amp; Moderators full access to the highest Membership Level you offer; just like it does with <em>Administrators</em>, <em>Editors</em>, <em>Authors</em>, and <em>Contributors</em>.</p>'."\n";
  61. echo '<p><strong>Membership Levels provide incremental access:</strong></p>'."\n";
  62. echo '<p>* A Member with Level 4 access, will also be able to access Levels 0, 1, 2 &amp; 3 <em>(plus spectate/participate in bbPress® Forums)</em>.<br />* A Member with Level 3 access, will also be able to access Levels 0, 1 &amp; 2 <em>(plus spectate/participate in bbPress® Forums)</em>.<br />* A Member with Level 2 access, will also be able to access Levels 0 &amp; 1 <em>(plus spectate/participate in bbPress® Forums)</em>.<br />* A Member with Level 1 access, will also be able to access Level 0 <em>(plus spectate/participate in bbPress® Forums)</em>.<br />* A Subscriber with Level 0 access, will ONLY be able to access Level 0 <em>(plus spectate/participate in bbPress® Forums)</em>.<br />* A public Visitor will have NO access to protected content <em>(and no special access to bbPress® Forums)</em>.</p>'."\n";
  63. echo '<p><em>* WordPress® Subscribers <strong class="ws-menu-page-hilite">and bbPress® Spectators/Participants</strong> are at Membership Level 0. If you\'re allowing Open Registration via s2Member, Subscribers will be at Level 0 (a Free Subscriber).</em></p>'."\n";
  64. echo '<p><em>* WordPress® Administrators, Editors, Authors, Contributors, <strong class="ws-menu-page-hilite">and bbPress® Keymasters/Moderators</strong> have Level 4 access, with respect to s2Member. All of their other Roles/Capabilities are left untouched.</em></p>'."\n";
  65.  
  66. echo '<div class="ws-menu-page-hr"></div>'."\n";
  67.  
  68. echo '<h3>Protecting Content Introduced by bbPress®</h3>'."\n";
  69. echo '<p>You can protect individual Forum Topics/Posts/Replies at different Levels with s2Member, or even with Custom Capabilities. Forum Topics/Posts/Replies are integrated by bbPress® internally as "Custom Post Types", which can be protected by s2Member either through Post Level Access Restrictions, or through URI Level Access Restrictions (recommended). If you choose to use Post Level Access Restrictions, please remember that s2Member will provide you with drop-down menus whenever you add or edit Forum Topics/Posts/Replies to make things easier for you.</p>'."\n";
  70. echo '<p>Regarding s2Member\'s Post Level Access Restrictions with bbPress®. Before you decide to use Post Level Access Restrictions, please take a look at: <code>s2Member -› Restriction Options -› URI Access Restrictions</code> and consider the following limitations in the current release of s2Member. It is currently NOT possible to protect a Forum, and have all Topics inside that Forum protected automatically. In order to accomplish that, you\'ll need to use s2Member\'s URI Access Restrictions. Also, s2Member is currently NOT capable of protecting Topic Tags; but you can use URI Restrictions for these also.</p>'."\n";
  71.  
  72. do_action("ws_plugin__s2member_during_integrations_page_during_left_sections_during_bbpress", get_defined_vars());
  73. echo '</div>'."\n";
  74.  
  75. echo '</div>'."\n";
  76.  
  77. do_action("ws_plugin__s2member_during_integrations_page_during_left_sections_after_bbpress", get_defined_vars());
  78. }
  79.  
  80. do_action("ws_plugin__s2member_during_integrations_page_after_left_sections", get_defined_vars());
  81.  
  82. echo '</td>'."\n";
  83.  
  84. echo '<td class="ws-menu-page-table-r">'."\n";
  85. c_ws_plugin__s2member_menu_pages_rs::display();
  86. echo '</td>'."\n";
  87.  
  88. echo '</tr>'."\n";
  89. echo '</tbody>'."\n";
  90. echo '</table>'."\n";
  91.  
  92. echo '</div>'."\n";
  93. }
  94. }
  95. }
  96.  
  97. new c_ws_plugin__s2member_menu_page_integrations();
  98. ?>

s2member\includes\menu-pages\integrations.inc.php

Source Code Documentation