RDP inGroups+

RDP inGroups+ Install Statistics

0
100%
Today: 0 Yesterday: 0 All-time: 1,908 downloads
RDP inGroups+ Icon

Try plugin: RDP inGroups+

We'll create fresh WordPress site with RDP inGroups+ installed. You have 20 minutes to test the plugin after that site we'll be deleted.

Takes ~10 seconds to install.

About RDP inGroups+

Integrate LinkedIn groups into WordPress

2


0


0


0


0

updated: 8 years ago
since: 9 years ago
author: Robert D Payne

Description

On October 14, 2015, LinkedIn converted all groups to private,
which has made the groups display functionality of this plug-in
impossible. However, the Sign in with Linked functionality still
works perfectly fine. The associated sign-in and registration hooks
offer great flexibility for utilizing user data in custom coding.

This plugin is deprecated. Please use RDP Linkedin Login.

RDP inGroups+ provides:

  • Login button shortcode – shows a Sign in with LinkedIn button when logged out
  • Member Count shortcode, with the ability to designate a link URL
  • Ability to register a visitor with the WordPress installaton
  • Logged-in session security using nonces and client IP address
  • OOP with hooks and filters for easy integration and customization
  • Ability to add a list of company IDs that a registered user will automatically follow

Warning About Caching

This plug-in will not work if caching is enabled on a web site.

Sponsor

This plug-in brought to you through the generous funding of Laboratory Informatics Institute, Inc.

Usage

LinkedIn Group Discussions

RDP inGroups+ is implemented using the shortcode [rdp-ingroups-group]. It accepts the following arguments:

  • id: (required) a group ID

Examples:

[rdp-ingroups-group id=2069898]

This will display discussions of the designated group to site visitors. The shortcode will display a Sign in with LinkedIn button if the user is not logged in.

LinkedIn Group Member Count

For a display of a group’s member count, use the [rdp-ingroups-member-count] shortcode. It accepts the following arguments:

  • id: (required) a group ID
  • link: a url to make the member count a hyperlink
  • new: make the link open in a new tab
  • prepend: text to add to the front of the member count
  • append: text to add to the end of the member count

Examples:

[rdp-ingroups-member-count id=209217]

[rdp-ingroups-member-count id=209217 link=http://example.com]

[rdp-ingroups-member-count id=209217 link=http://example.com new]

[rdp-ingroups-member-count id=209217 link=http://example.com new prepend=’Join our’ append=’TODAY!’]

LinkedIn Sign In Button

To display a Sign in with LinkedIn button, use the [rdp-ingroups-login] shortcode.

External Scripts Included

  • jQuery Cookie Plugin v1.4.1 under MIT License
  • jQuery.PositionCalculator v1.1.2 under MIT License
  • Query Object v2.1.8 under WTFPL License
  • URL v1.8.6 under MIT License

Hook Reference:

rdp_lig_before_user_login

  • Param: JSON object representing a LinkedIn Person containing firstName, lastName, emailAddress, pictureUrl, publicProfileUrl, and id
  • Fires before any user is logged into the site via LinkedIn.

rdp_lig_after_insert_user

  • Param: WP User Object
  • Fires after a new user is registered with the site. (Register New Users? must be enabled)

rdp_lig_after_registered_user_login

  • Param: WP User Object
  • Fires after a registered user is logged into the site. (Register New Users? must be enabled)

rdp_lig_registered_user_login_fail

  • Param: JSON object representing a LinkedIn Person containing firstName, lastName, emailAddress, pictureUrl, publicProfileUrl, and id
  • Fires after a failed attempt to log registered user into the site. (Register New Users? must be enabled)

rdp_lig_after_user_login

  • Param: RDP_LIG_DATAPASS object
  • Fires after any user is logged into the site via LinkedIn.

rdp_lig_after_scripts_styles

  • Param: none
  • Fires after enqueuing plug-in-specific scripts and styles

Filter Reference:

rdp_lig_render_header_top

  • Param 1: String containing opening div and wrapper HTML for header section
  • Param 2: String containing status – ‘true’ if user is logged in, ‘false’ otherwise
  • Return: opening HTML for header section

rdp_lig_render_header

  • Param 1: String containing the body HTML for header section
  • Param 2: String containing status – ‘true’ if user is logged in, ‘false’ otherwise
  • Return: body HTML for header section

rdp_lig_render_header_bottom

  • Param 1: String containing closing wrapper and div HTML for header section
  • Param 2: String containing status – ‘true’ if user is logged in, ‘false’ otherwise
  • Return: closing HTML for header section

rdp_lig_render_main_container_header

  • Param 1: String containing HTML for main container header section
  • Param 2: String containing status – ‘true’ if user is logged in, ‘false’ otherwise
  • Return: HTML for main container header section
  • Default behavior is to render the group profile logo and name

rdp_lig_render_member_count

  • Param 1: String containing HTML for member count
  • Param 2: Array containing shortcode attributes
  • Return: HTML for member count.

rdp_lig_render_paging

  • Param 1: String containing HTML for paging section
  • Param 2: String containing status – ‘true’ if user is logged in, ‘false’ otherwise
  • Param 3: String containing the location – ‘top’ of main container section, ‘bottom’ of main container section
  • Return: HTML for paging section. For infinity paging, location ‘top’ is not rendered.

rdp_lig_render_login

  • Param 1: String containing log-in HTML for the [rdp-ingroups-login] shortcode
  • Param 2: String containing status – ‘true’ if user is logged in, ‘false’ otherwise
  • Return: log-in HTML for the [rdp-ingroups-login] shortcode

rdp_lig_before_insert_user

  • Param 1: Boolean indicating if user exists based on result of WordPress username_exists() function, using supplied email address
  • Param 2: JSON object representing a LinkedIn Person containing firstName, lastName, emailAddress, pictureUrl, publicProfileUrl, and id
  • Return: Boolean indicating if user exists

rdp_lig_before_registered_user_login

  • Param 1: Boolean indicating if user is logged in based on result of WordPress is_user_logged_in() function
  • Param 2: String containing email address of user
  • Return: Boolean indicating if user is logged in

rdp_lig_custom_menu_items

  • Param 1: Array to hold custom link data
  • Param 2: String containing status – ‘true’ if user is logged in, ‘false’ otherwise
  • Return: Array of links, where the link text is the key and the link URL is the value

Javascript Function Reference:

rdp_lig_login_onClose

  • Param: redirect URL
  • Fires upon successful login, just before the login popup window closes.

Redirect Code Example

In this example, all links with class rdp_jb_must_sign_in are assigned an event listener that sets a cookie, with the cookie value derived from the link’s href attribute.

When the popup login window executes its close script, the cookie is read, and the parent window is redirected to the appropriate URL.

Code in custom sign-in JavaScript file

var $j=jQuery.noConflict();
// Use jQuery via $j(...)

$j(document).ready(rdp_sign_in_onLoad);

function rdp_sign_in_onLoad(){
    $j('#rdp-jb-main').on( "click", '.title.rdp_jb_must_sign_in' , function(event){
        event.preventDefault();  
        var redirectURL = $j(this).attr('href');
        jQuery.cookie('rdp_lig_login_redirect', redirectURL, { path: '/' })
    });
}//rdp_sign_in_onLoad