WP Manifestindependent plugin directory
manifest / events / event-interaction-rating

Event Interaction Rating

Participation, liking and rating system for WordPress events.

by Mehmet Gökmen · github.com/mgokmen20/event-interaction-rating · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/mgokmen20/event-interaction-rating/archive/refs/heads/main.zip

Event Interaction & Rating Plugin

A WordPress plugin that adds interactive voting, rating, and attendance tracking features to your posts and custom post types.

Features

  • Event Attendance Tracking

    • "Attend" and "Not Attend" buttons with counters
    • Configurable end date for attendance voting
    • Real-time counter updates
  • Like/Dislike System

    • Simple like/dislike buttons with counters
    • Real-time updates
    • One vote per user (based on IP + User Agent)
  • 5-Star Rating System

    • Interactive star rating interface
    • Average rating display
    • Total votes counter
    • Real-time updates
  • Multi-Language Support

    • Built-in support for English, Turkish, German, French, and Spanish
    • Automatic language detection based on WordPress locale
    • Browser language fallback
    • Easy language switching
  • Admin Features

    • Enable/disable features per post type
    • Customize button labels
    • Export voting data
    • View statistics
    • Custom CSS support
  • Security

    • IP + User Agent based vote tracking
    • Nonce verification
    • Rate limiting
    • XSS/CSRF protection

Installation

  1. Upload the event-interaction-rating folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. Go to Settings > Event Interaction to configure the plugin

Usage

For Users

The voting interface will automatically appear on enabled post types. Users can:

  • Click "Attend" or "Not Attend" for events
  • Like or dislike content
  • Rate content using the 5-star system

Language Support

The plugin automatically detects and displays content in the user's preferred language:

  1. WordPress Locale: Primary language detection from WordPress settings
  2. Browser Language: Fallback to user's browser language
  3. Supported Languages: English (en), Turkish (tr), German (de), French (fr), Spanish (es)
  4. Default Language: English if no supported language is detected

Language Files Location: /wp-content/plugins/event-interaction-rating/languages/

Available Language Files:

  • event-interaction-rating-tr_TR.po / .mo - Turkish
  • event-interaction-rating-de_DE.po / .mo - German
  • event-interaction-rating-fr_FR.po / .mo - French
  • event-interaction-rating-es_ES.po / .mo - Spanish

For Administrators

  1. Configure Post Types

    • Go to Settings > Event Interaction
    • Select which post types should show the voting interface
  2. Set Event End Dates

    • When editing a post, find the "Event Settings" meta box
    • Set the end date for attendance voting
  3. Customize Appearance

    • Use the Custom CSS field to style the voting interface
    • Change button labels in the settings
  4. Export Data

    • Export voting data to CSV
    • Choose between all data or specific vote types

Requirements

  • WordPress 5.0 or higher
  • PHP 7.2 or higher
  • MySQL 5.6 or higher

Language Configuration

For Developers

To add new languages or modify existing translations:

  1. Create PO File: Use a tool like Poedit to create/edit .po files
  2. Generate MO File: Convert .po to .mo using msgfmt command
  3. Update JavaScript: Add new language codes to assets/js/public.js
  4. Update CSS: Add new language styles to assets/css/public.css

JavaScript Language Detection:

// Supported languages array
var supportedLanguages = ['en', 'tr', 'de', 'fr', 'es'];

// Language switching function
window.changeEIRLanguage = function(lang) {
    if (supportedLanguages.indexOf(lang) !== -1) {
        $('.eir-voting-container').removeClass('eir-lang-en eir-lang-tr eir-lang-de eir-lang-fr eir-lang-es');
        $('.eir-voting-container').addClass('eir-lang-' + lang);
    }
};

CSS Language Classes:

/* Language-specific visibility */
.eir-lang-tr [lang-text="tr"] { display: inline-block; }
.eir-lang-de [lang-text="de"] { display: inline-block; }
/* Add more languages as needed */

Troubleshooting

Language Not Changing:

  1. Check if .mo files exist in /languages/ directory
  2. Verify WordPress locale settings
  3. Clear browser cache and WordPress cache
  4. Check browser console for JavaScript errors

Multiple Languages Visible:

  1. Ensure CSS properly hides unused language elements
  2. Check for conflicting CSS rules
  3. Verify JavaScript language class assignment

Support

For support, feature requests, or bug reports, please visit our GitHub repository.

License

This plugin is licensed under the GPL v2 or later.

Credits