straightvisions

Admin
  • Content Count

    1,044
  • Joined

  • Last visited

  • Days Won

    23

Everything posted by straightvisions

  1. straightvisions

    Performance Issues / Big Logging Data Storage

    If you run a community with many members, you want to reduce SSO logging to increase performance. Just reduce time for clearing logs in IPB > System > REST API > API Logs.
  2. straightvisions

    Hooks (Actions, Filters)

    To allow you further, update-save customization of plugin behavior or even extending functionality by your own, we provide several actions and filters. Actions You can run your own code on these triggers following WordPress' do_action functionality. ipbwi_sso_loaded Arguments: none ipbwi_sso_hooks_loaded Arguments: none ipbwi_sso_ipb_login Arguments: $status $request ipbwi_sso_ipb_logout Arguments: $status $request ipbwi_sso_ipb_register Arguments: $status $request ipbwi_sso_ipb_delete Arguments: $status $request ipbwi_sso_ipb_change_email Arguments: $status $request ipbwi_sso_ipb_change_name Arguments: $status $request ipbwi_sso_ipb_change_password Arguments: $status $request ipbwi_sso_ipb_validate Arguments: $status $request Filters You can change variables on runtime following WordPress' add_filter functionality. ipbwi_sso_ipb_request Arguments: $request ipbwi_sso_wp_login_destination_url Arguments: $destination_url ipbwi_sso_wp_logout_destination_url Arguments: $destination_url
  3. straightvisions

    Special Chars in Usernames

    Per default, both WordPress and IPS have no issues with special chars in usernames. Some WordPress installs may have strict mode enabled (e.g. through WordPress Network or WPMU Feature) which results in ASCII based names only. Some users may find this free WordPress plugin useful: WordPress Special Characters in Usernames Nevertheless, if this plugin doesn't fix your issue, it has a very lean codebase, so you may just copy, adjust and past it into your theme's functions.php or a custom plugin to get it solved in your scenario. Please note that this inconsistent use of strict mode in WordPress has a bugtracker discussion since 2011, so that's nothing we can hurry up here.
  4. straightvisions

    SSO seems to work - sometimes

    Please try to disable caching the public output for guest. This could occur with cloud caching like cloudfront or with IPS guest cache feature.
  5. The API works per default with a forum setup enabled with search engine friendly URLs. If you have this feature disabled, you'll either need to enable search engine friendly URLs or set the following trigger before first API request: $ipbwi->core->url_rewrite = false; Example: require_once('../ipbwi.php'); $ipbwi->core->url_rewrite = false; // basic board information try{var_dump($ipbwi->core->hello());}catch(Throwable $t){ echo 'Type Error, line '.$t->getLine().': ' .$t->getMessage(); }
  6. Install IPBWI for WordPress SSO plugin, as this is required for this addon Install the IPBWI for WordPress - Sync Groups plugin in WordPress Go to WP Admin -> IPBWI4WP -> Sync Groups Map WP roles with IPS usergroups here Go to IPS Admin -> IPBWI -> Hooks and check Activate Default Hooks Slave notification
  7. Once discussion has started, the discussion topic id is saved as post meta. get topic id meta field: $tid = get_post_meta($post_id, 'ipbwi_cc_topic_id', true); You may want to change that value. This can be done programmatically, too: add_post_meta($post_id, 'ipbwi_cc_topic_id', $topic_id, true);
  8. straightvisions

    Filters

    The following WordPress filters are available through IPBWI for WordPress - Community Comments: ipbwi4wp_community_comments_create_topic array $parameters: forum, author, title, post ipbwi4wp_community_comments_create_post array $parameters: topic, author, post
  9. Due to the fact that there is no common standard for html structure of comment template files in WordPress, each theme on this world has it's own structure there, so the CSS code from one theme will not map to the other. That means it's just impossible to serve a comment template through a plugin which fits all themes on the world, so you either need to style them by your own via CSS or edit the template file to better suit to your theme To edit the comments theme file provided through IPBWI for WordPress - Community Comments: Just copy file /wordpress/wp-content/plugins/ipbwi4wp_community_comments/lib/assets/tpl/community_comments.php to /wordpress/wp-content/themes/YOUR_THEME/ipbwi/community_comments.php and start editing.
  10. Following these steps will clean your IPS installation from IPS connect entries left by IPBWI: update the IPS base URL in IPBWI's SSO Settings in WordPress remove the outdated IPS connect Slave URL in PHPmyAdmin -> IP.board Database -> Table ibf_core_ipsconnect_slaves -> Field slave_url set value of field connect_slaves in table ibf_core_sys_conf_settings to amount of entries in table ibf_core_ipsconnect_slaves Go to IPS ACP -> System -> Support -> Something isn't working correctly -> continue Flush any Browser- and Servercaches, as well as CDNs like Cloudflare. Unfortunately, we will not offer a more convenient way for these steps, as IPS has already mentioned in a support ticket that such a feature is on their todo list
  11. straightvisions

    Hooks

    With IPBWI 4, you are able to handle hooks triggered by IPS 4. Configuration IPBWI PHP Wrapper set ipbwi_ACTIVATE_HOOKS in /ipbwi-api/config.inc.php to true rename file /ipbwi-api/lib/hooks.php.dist to hooks.php edit file hooks.php and fill methods with your custom code SSO Hooks SSO Hooks are based on IPS.connect and automatically fire to all slaves regardless of the settings below. IPBWI IPS App After you've installed the App Go to IPS ACP -> IPBWI -> Advanced -> Hooks Activate Default Hooks. We will describe how to add custom hooks later You may want to activate hooks going to be sent to all IPS connect slaves, a custom URL and/or via email. In all cases, data is sent as json-string. Default Hooks The following Hooks are triggered for Topics and Posts when Default Hooks has been activated. set_pp_main_photo IPS\\ipbwi_hook_ipbwi_member::set_pp_main_photo Whenever a profile photo of a member has been changed. The delivered data object contains the photopath and the updated member object save IPS\\forums\\ipbwi_hook_ipbwi_forums_topic::save IPS\\forums\\Topic\\ipbwi_hook_ipbwi_forums_topic_post::save Whenever Topic Data has been created or changed - great if you are caching topic information on your site and want to get a refresh trigger. The delivered data object contains the field item with detailed informations about the item. modAction IPS\\forums\\ipbwi_hook_ipbwi_forums_topic::modAction IPS\\forums\\Topic\\ipbwi_hook_ipbwi_forums_topic_post::modAction Whenever a mod action has been performed, the data object contains a field action which informs about the type of action performed: feature unfeature pin unpin hide unhide lock unlock move merge delete approve Additionally, information about the member who has performed the action as well as a reason and item information are delivered in data object. Custom Hooks You can create your own, custom hooks utilizing the Code Hooks feature of IPS. Snippet: if(isset(\IPS\Settings::i()->ipbwi_hooks_activate_default) && \IPS\Settings::i()->ipbwi_hooks_activate_default == 1 && isset($this) && is_object($this) && method_exists($this, 'apiOutput')){ $hooks = new \IPS\ipbwi\modules\admin\advanced\hooks; $hooks->send(__METHOD__,array('item' => $this->apiOutput())); }
  12. straightvisions

    Known issues with third party extension

    In most cases, IPBWI for WordPress v4 works without any issues. Some third party extensions are known to generate issues in connection with IPBWI for WordPress v4. Coming Soon Page & Maintenance Mode by SeedProd This plugin deactivates the WordPress' REST API, so you'll receive the following error code during login/logout: {"code":"rest_cannot_access","message":"Only authenticated users can access the REST API.","data":{"status":401}} You may deactivate this plugin and try another one or edit file /wp-content/plugins/coming-soon/inc/class-seed-csp4.php and remove or outcomment the following line: return new WP_Error( 'rest_cannot_access', __( 'Only authenticated users can access the REST API.', 'coming-soon' ), array( 'status' => rest_authorization_required_code() ) );
  13. straightvisions

    Avatars

    Default Avatars in WordPress are replaced with IPS Avatars. IPBWI for WordPress v4 uses the following hooks: add_filter('pre_get_avatar', array($this->avatars,'ipb_get_avatar'), 99 , 5); add_filter('get_avatar', array($this->avatars,'ipb_get_avatar'), 99 , 5); If you want to add new hooks for compatibility to third party plugins, like buddypress, you may add them like this: add_filter('JUST_ANOTHER_AVATAR_HOOK', array($GLOBALS['ipbwi4wp']->avatars,'ipb_get_avatar'), 99 , 5); The example above is just for orentiation, please note that no free support can be provided for hooking into other third party plugins.
  14. straightvisions

    Get online Status

    Since IPS v4 and IPBWI API v4, online status isn't shared anymore. The reason is how SSO since v4 has changed: v3 required cookie sharing for working SSO, while v4 has implemented a redirect method to allow SSO without domain or hosting limitations. If you are using the same domains for your site and forum and have both installed on the same host, you can get the online status of a member with the following code snippet: require_once(dirname(__FILE__).'/forum/init.php'); \IPS\Session\Front::i(); if(\IPS\Member::loggedIn()->member_id) { } Please note that our standard support does not include help with code snippets like this, as these are not part of the standard IPBWI functionality. This snippet is intended as quick start for your own research.
  15. straightvisions

    Force HTTPS

    If a WordPress site has IPBWI for WordPress v4 plugin activated and an IPS connect Key saved in settings, it will be added as slave to IP.board. If the same WordPress site is available on both, http://domain.example and https://domain.example, there will be a security mismatch key error. Please decide whether your domain is available on HTTP oder HTTPS completely and force a redirect. You may use the following htaccess code to force a 301 redirect to HTTPS. Finally, please clean your IPS table "core_ipsconnect_slaves" e.g. via PHPmyAdmin, from the false entries. # Force HTTPS RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
  16. straightvisions

    Getting Started

    IPBWI for WordPress tries to assist you as best as possible to avoid extra documentation, but some feature are by nature more hidden than others. A complete list and explanation of all features is available on https://ipbwi.com/ipbwi-for-wordpress/ Installation unzip download package on your local harddrive copy folder ipbwi4wp to /wp-content/plugins/ activate plugin in WordPress go to IPBWI4WP settings menu page and follow the instructions there.
  17. straightvisions

    Single Sign On - How does it work?

    With IPBWI for WordPress v4, you will get flawless Single Sign On. This is our current major release, available on straightvisions.com store and IPS marketplace. How does SSO work? IP.board brings a SSO API which allows to add several "slaves" as satellites to a "master" IP.board installation. This results in a robust single sign on solution allowing unlimited slaves even on completely different domains - same origin policy which normally breaks setting cookies for different domains has been bypassed here successfully. Requirements WordPress 4.5 or higher IPcore/IP.board 4.1 or higher PHP 7 How does IPBWI for WordPress exactly work? Here's a complete list of supported SSO cases and how IPBWI for WordPress will handle them: IP.board This is how SSO is fulfilled, when a SSO related action is triggered by IP.board: Login IP.board sends user to all slaves, e.g. via IPBWI for WordPress connected sites and will perform a login. If there is no user account yet in WordPress, it will be created automaticly upon login. If there is no IP.board account yet, login will fail, even if a corresponding WordPress account exists. IP.board account will be created upon next login through WordPress and will allow login via IP.board since then. User is sent back to IP.board after all slaves have performed login action. WordPress action triggered: ipbwi_sso_ipb_login Logout IP.board sends user to all slaves, e.g. via IPBWI for WordPress connected sites and will perform a logout. If there is no user account yet in WordPress, it will be created automaticly upon logout. User is sent back to IP.board after all slaves have performed logout action. WordPress action triggered: ipbwi_sso_ipb_logout Register IP.board sends user to all slaves, e.g. via IPBWI for WordPress connected sites and will perform user account registration. User is sent back to IP.board after all slaves have performed user account creation. WordPress action triggered: ipbwi_sso_ipb_register Delete IP.board sends user to all slaves, e.g. via IPBWI for WordPress connected sites and will perform user account deletion. For security purposes, you have to activate this feature in IPBWI for WordPress' SSO settings explicitely. You are able to globally set a target user for reassigning WordPress posts when a user is deleted via IP.board. You can find this option in IPBWI for WordPress' SSO settings. User is sent back to IP.board after all slaves have performed user account deletion. WPMU: User is deleted from current blog, but not from whole network. WordPress action triggered: ipbwi_sso_ipb_delete Change Email IP.board sends user to all slaves, e.g. via IPBWI for WordPress connected sites and will perform user email address change. If there is no user account yet in WordPress, it will be created automaticly upon email address change attempt. User is sent back to IP.board after all slaves have performed email address change action. WordPress action triggered: ipbwi_sso_ipb_change_email Change Password IP.board sends user to all slaves, e.g. via IPBWI for WordPress connected sites and will perform user password change. As we override WordPress' password validation process, no password will be set in WordPress for the giving user account. If there is no user account yet in WordPress, it will be created automaticly upon email address change attempt. User is sent back to IP.board after all slaves have performed password change action. WordPress action triggered: ipbwi_sso_ipb_change_password Validate IP.board sends user to all slaves, e.g. via IPBWI for WordPress connected sites and will perform user validation. As vanilla WordPress does not have a built in validation system, like a validation group or something similar, we currently not support this feature right now. If there is no user account yet in WordPress, it will be created automaticly upon validation attempt. User is sent back to IP.board after all slaves have performed validation action. WordPress action triggered: ipbwi_sso_ipb_validate WordPress This is how SSO is fulfilled, when a SSO related action is triggered by WordPress: Login WordPress performs the login If there is no user account yet in WordPress, it will be created automaticly upon login. Vice Versa: If there is no IP.board account yet, it will be created. This requires an existing WordPress account. Redirect to master to perform login attempt on master and all slaves User is sent back to WordPress after all slaves have performed login action. WordPress filter available: ipbwi_sso_wp_login_destination_url Logout WordPress performs the logout Redirect to master to perform logout attempt on master and all slaves User is sent back to WordPress after all slaves have performed logout action. WordPress filter available: ipbwi_sso_wp_logout_destination_url Register WordPress performs the registration. If no corresponding IP.board account exists, it will be created. Delete WordPress performs deletion For security purposes, we ban members in IP.board per default rather than delete - as this can be undone. You can enable deletion in IPBWI for WordPress' SSO settings. Change Email WordPress changes email address of the user. If corresponding IP.board account exists, e-mail address will be changed their, too. Email won't be changed if another user in WordPress or IP.board already has this address registered. Change Password WordPress changes password of the user If corresponding IP.board account exists, password will be changed their, too. Validate As vanilla WordPress does not have a built in validation system, like a validation group or something similar, we currently not support this feature right now. Customizing We provide several action and filter hooks to allow you update-save customizing. Additionally, the powerful IPBWI-API, which is included, allows you to develop powerful extensions by your own. Translation We deliver IPBWI for WordPress v4 in English and German, following the WordPress standard. You can easily copy files from /wp-content/ipbwi4wp/lib/assets/lang/ and create your own language file e.g. via PoEdit. Copy the translated files into directory /wp-content/languages/ to be update save. More Features Member Avatars Shows IPS Avatars in WordPress. WordPress Network (Multi Site) Full support for WPMU (WordPress Multi Site or WP Network)! You can decide to add new users to current blog only or to all blogs of your network. Known Issues IP.board This is more an IP.board issue than an IPBWI for WordPress one: While IN_DEV mode is activated in IP.board, some mechanics won't work as expected. For example, user account deletion won't work on IP.board site. Please deactivate DEV with removing or renaming constants.php in IP.board's root folder for flawless SSO. While successful account validation confirmation process in IP.board for new user accounts, user is not redirected to perform SSO - that's a conceptional bug in IPS connect. That prohibits us to synchronize loginstatus on validation process. User will be logged in within IP.board, but not in WordPress. Next time user logs into IP.board or WordPress, login status will be synced for future. Sometimes, outdated cache will result in unexpected behavior. Please empty the cache in IPS Admin CP -> System -> Support -> Something isn't working correctly. -> Continue WordPress AJAX driven logins via WordPress are not supported. As IPS.connect and therefor IPBWI for WordPress v4 require a redirect to perform login on all connected sites, this cannot be fulfilled by logins using ajax.
  18. straightvisions

    Single Sign On - How does it work?

    A brief explanation is available on https://ipbwi.com/about-ipbwi/ While all IPS connect features are supported, you'll find an explanation for each SSO feature here.
  19. straightvisions

    Advanced Settings

    Some settings are not defined by constants in config.php but are able to be set and changed everytime on runtime. url_rewrite default: true Change to false if you are running IPS without .htaccess based search engine friendly URLs. Examples: $ipbwi->core->url_rewrite = false; $ipbwi->extended->url_rewrite = false; key_in_url default: false Change to true if your server does not support auth headers. IPS will inform you about that in the REST API settings. Examples: $ipbwi->core->key_in_url = false; $ipbwi->extended->key_in_url = false; /lib/curl_custom.php.dist Rename to curl_custom.php to insert your own curl commands.
  20. straightvisions

    Getting Started

    Setup of IPBWI v4 API is quite easy. Just follow the steps described below to start coding your own apps powered by IPBWI v4 API. Choose a version IPBWI v4 API is provided in two versions: PHP 5 and PHP 7. While PHP 5 version runs on PHP 7, too, the PHP 7 version brings additional improvements for safety. Please note, that PHP 5 support for IPBWI v4 API has been dropped since 2017, so newest features will be available for PHP 7 version only. To make it clear: using the PHP 5 version is not recommended nor supported anymore - please switch to PHP 7. All documentations are based on PHP 7 version. Installation download the IPBWI v4 API ZIP archive unzip ZIP package into any local folder. You'll see three folders: ipbwi-api-previews contains screenshots of REST API documentation ipbwi-api-application contains the IPS application to enhance the IPS REST API Go to IPS ACP -> System -> Site Features -> Applications -> Install and upload file /ipbwi-api-application/ipbwi.tar Go To IPS ACP -> System -> Site Features -> REST API -> Create New Give it a Reference Name and enable all endpoints you'll plan to use. You will need the API Key generated here later for IPBWI's config settings. Full API reference is available as tab on the REST API site. ipbwi-api contains the PHP wrapper for REST API calls plus testing code snippets upload the ipbwi-api folder via ftp to your webhost rename config.php.dist to config.php Fill the settings for config.php: ipbwi_IPS_CONNECT_BASE_URL This is the base URL of your forum. ipbwi_IPS_CONNECT_MASTER_KEY Master KEY as shown in IPS ACP -> System -> Settings -> Login Handlers ipbwi_IPS_CONNECT_SLAVE_URL Define a slave URL. This URL will be used to propagate SSO changes from IPS master to your slave. ipbwi_IPS_CONNECT_SLAVE_KEY That should be a unique key. md5 string of your slave URL would suit in most scenarios. REST API KEY Insert the API Keys created with installing the ipbwi-api-application. The /testing/ folder contains some example requests. Start coding You are prepared now for developing your own PHP apps powered by IPBWI API. Just include the ipbwi.php into your project and start coding.
  21. straightvisions

    IPBWI for IPB4

    thank you, this will be part of the next IPBWI release (v4.1.2)
  22. straightvisions

    IPBWI 3 functions in IPBWI 4 ?

    Hey Sunnmagic, sorry for the delay in response, but here's the answer: $ipbwi->member->info() included $ipbwi->member->isLoggedIn() there is no cookie sharing with IPS anymore, means no reason for a isLoggedIn function. Utilizing IPS connect, whole SSO process works on a better, but completely different way than before $ipbwi->group->info() included $ipbwi->group->isInGroup() included in member info $ipbwi->bbcode->bbcode2html not included $ipbwi->member->login included $ipbwi->pm->send not included
  23. straightvisions

    IPBWI for IPB4

    IPBWI 4 API and IPBWI for WordPress 4 are released now: https://invisionpower.com/files/file/8061-ipbwi-api-v4-extended-edition/ https://invisionpower.com/files/file/8202-ipbwi-for-wordpress-v4-ipbwp-single-sign-on-bridge/