WordPress membership site integration for H&M

This section is for announcements, information and discussions relating to the help community -- for example news about events and seminars of interest, developments in help technology and so on.

Moderator: Tim Green

Post Reply
Marc Beneteau
Posts: 49
Joined: Fri Oct 28, 2011 12:55 pm

WordPress membership site integration for H&M

Unread post by Marc Beneteau »

I have written integration code that integrates H&M with a WordPress membership site (Wishlist member in this case). It essentially creates a private (or semi-private) membership site out of an H&M project, hiding or revealing content according to user logged-in status. You can get it here:

http://wpencyclopedia.com/how_we_built_ ... opedia.htm

I am copying the README below. Note that this is our second attempt -- first attempt used a custom theme and importing of topics into WordPress and was a pain in the ___. I wish I had thought of this much sooner. Note also that the H&M project must have its own directory (it cannot be part of a WordPress install, although it authenticates users against an existing WordPress database)

I am putting this into the public domain as a small thank you to the authors of this marvelous software and for Tim's "above and beyond" support.
_____

README for WP Academy's WordPress authentication functions for Help & Manual

SUMMARY
These functions will authenticate users against a WordPress database that uses Wishlist Member membership plugin, essentially creating a private membership site out of a Help & Manual documentation project.

In our case, the entire project is public except for the videos. The videos are revealed for authenticated users.
To see how it visit:
http://wpencyclopedia.com/index.htm?010 ... hboard.htm

A more complex implementation would involve some kind of short-code implementation to protect entire blocks of text as in:
[private] (protected content...) [/private],
but we didn't do this as our need is simple. If you are able to make this work, please let us know at marc@wpacademy.com

Be aware that the shortcode implementation (or indeed any membership system implementation on H&M) is not entirely secure as content that is hidden in private tags may still be visible in search. In our case we don't care.

CONFIGURATION AND USAGE
* Edit login.php with the database parameters (at the top) and the allowed membership levels (search for "WPENC2013" in the file)
* Edit wpa_authenticate.php with the failure message (the message to be displayed for non-authenticated user), and the success message (in this case it just displays the video)
* Copy the three distribution files into your H&M web directory. (The .htaccess file instructs the system to process .htm files as php)
* Add the following line to the top of html template in your skin file Configuration > Common Properties > HTML Page Templates > Default:
<?php require("wpa_authenticate.php"); ?>
(right after the first <HTML> works well)
* Insert an HTML code object into your topic for protected content, e.g.
<?php wpa_authenticate("76421586"); ?>
(this shows the failure message for not logged-in user, and the Vimeo iframe otherwise)

LICENSE, DONATIONS AND SUPPORT
This software is licensed under WTFPL license(http://en.wikipedia.org/wiki/WTFPL). However, if you use it on a commercial site we would appreciate a small donation to orders@wpacademy.com as a way of expressing your appreciation.
Marc Beneteau
Posts: 49
Joined: Fri Oct 28, 2011 12:55 pm

Re: WordPress membership site integration for H&M

Unread post by Marc Beneteau »

Update july 9, 2014:
we have abandoned the idea of a wordpress plugin, instead are authenticating h&M files through a <?php .... ?> on the .htm files by direct access to WordPress database. Details and code sample here:
http://helpman.it-authoring.com/viewtop ... gin#p52306
Post Reply