WP Manifestindependent plugin directory
manifest / users / buddy-chat-main

AvatarBuddy Redirect

Plugin for connecting with Buddy chat.

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/madebygarzon/buddy-chat-main/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

AvatarBuddy Redirect Plugin


1. Introduction

The AvatarBuddy Redirect plugin is designed to facilitate a secure Single Sign-On (SSO) flow for Buddy Chat (or similar services). By integrating this plugin into your WordPress website, you can provide a custom button that, when clicked, automatically generates a secure SSO URL and redirects your users to the external chat or application.

In addition, the plugin allows administrators to customize the look and feel of the redirect button directly from the WordPress Admin Dashboard. This includes options for border style, background color, font size, and padding.


2. Key Features

  • Secure SSO Generation
    Generates an SHA-256 signature with a timestamp and a secret key for a time-bound, secure login link.

  • Customizable Redirect Button
    Administrators can configure:

    • Border (width, color, radius)
    • Background color
    • Font size and text color
    • Padding (top, right, bottom, left)
  • Simple Shortcode
    Use [avatarbuddy_form] to display the SSO button anywhere on your site.

  • Admin Settings Page
    Provides a dedicated settings page to manage:

    • Secret Key (for hashing the signature)
    • SSO URL (endpoint for the secure hash token)
    • Button text and button styling
  • Plugin Action Link
    A “setthings” link in the WordPress Plugins list takes you directly to the plugin’s settings page.


3. How It Works

  1. Configuration

    • Go to Settings → AvatarBuddy in your WordPress Admin.
    • Enter your Secret Key, SSO URL, and adjust the Button Text.
  2. Shortcode Usage

    • Insert the shortcode [avatarbuddy_form] in any WordPress post, page, or widget.
    • This shortcode outputs an <a> element with the class form_buddy_button.
  3. Button Action

    • On click, JavaScript fetches a dynamically generated secure SSO URL from the WordPress back end.
    • A hash signature is calculated using the Secret Key and a timestamp.
    • The user is then redirected or a new tab is opened to the specified SSO URL.
  4. Styling

    • Style options (border, color, size, etc.) are set via the admin settings.
    • The plugin prints inline CSS (via wp_head) to apply these styles to .form_buddy_button.

4. Installation & Setup

4.1 Installation Steps

  1. Download or Upload the Plugin

    • Option A: Download the .zip file. In your WordPress Admin, go to Plugins → Add New, then click Upload Plugin, and select the .zip file.
    • Option B: Manually upload the plugin folder to your /wp-content/plugins/ directory via FTP.
  2. Activate the Plugin

    • In your WordPress Admin, go to Plugins.
    • Locate AvatarBuddy Redirect and click Activate.
  3. Configure Settings

    • In the Plugins list, under AvatarBuddy Redirect, click on setthings.
      (Alternatively, go to Settings → AvatarBuddy.)
  4. Enter Plugin Details

    • Secret Key: The secret string for generating your secure hash.
    • SSO URL: The endpoint to which users are redirected for sign-on.
    • Button Text: The label shown on the redirect button.
  5. Style Configuration (Optional)

    • Customize the border width, color, radius, background color, font size, text color, and padding as desired.
    • Click Save.

4.2 Using the Shortcode

  • Shortcode: [avatarbuddy_form]
  • Place it on any page, post, or text widget where you want to display the redirect button.

5. Troubleshooting & Tips

  • No SSO Redirection?

    • Confirm the Secret Key and SSO URL in the settings are correct.
    • Ensure your server time is accurate.
  • Button Not Showing Styles?

    • Check for conflicting CSS in your theme or other plugins.
    • Verify your custom styles are saved properly in the plugin settings.
  • JavaScript Errors or Conflicts

    • Open your browser console to look for errors.
    • Temporarily deactivate other plugins to see if a conflict exists.
  • Mobile vs. Desktop

    • Mobile devices open the link in the same window. On desktop, it opens in a new tab.

6. Frequently Asked Questions

  1. Will the new button style affect other buttons on my site?

    • No, only elements with the class .form_buddy_button are targeted.
  2. Can I place multiple buttons on the same page?

    • Yes, each [avatarbuddy_form] instance will function independently.
  3. Is HTTPS required?

    • Though not strictly required, using HTTPS is highly recommended for security.
  4. What if the Secret Key is incorrect or empty?

    • The plugin defaults to # as a link, and users see an error on click.

7. Changelog

  • 7.3

    • Added “setthings” link under the plugin in the WordPress Plugins list.
    • Added a plugin row meta to display the [avatarbuddy_form] shortcode.
    • Code refinements for inline styling.
  • 7.2

    • Introduced top, right, bottom, and left padding options.
  • 7.1

    • Added style customization for border width, color, radius, background color, text color, and font size.
  • 7.0

    • Initial release with basic SSO generation and button shortcode.

8. License & Credits