EVC Sports & Weather Video Display Plugin Documentation

Overview

EVC Sports & Weather Video Display is a WordPress plugin that allows administrators to upload and display sports and weather video segments via the WordPress dashboard. Users can embed these videos on their site using shortcodes. The plugin also tracks the last updated timestamps for each video.

Features

  • Upload sports and weather video segments from the WordPress dashboard.
  • Display the uploaded videos using shortcodes.
  • Show the last updated timestamp for each video.

Installation

  1. Upload the EVC-WX-SP-Video-Display plugin folder to the /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.

Dashboard Widgets

Upon activation, the plugin adds two widgets to the WordPress dashboard:

  • Upload Sports Segment: Allows administrators to upload sports videos.
  • Upload Weather Segment: Allows administrators to upload weather videos.

Upload Process

  1. Navigate to the WordPress dashboard.
  2. Locate the Upload Sports Segment or Upload Weather Segment widget.
  3. Select a .mp4 file and click Upload.
  4. The file is saved in the WordPress uploads directory as sports.mp4 or weather.mp4.
  5. The last updated timestamp is recorded.

Shortcodes

The plugin provides four shortcodes to display videos and their timestamps:

Displaying Videos

  • Weather Video: [weather_video]
    Displays the latest uploaded weather video.
  • Sports Video: [sports_video]
    Displays the latest uploaded sports video.

Displaying Last Updated Timestamps

  • Weather Last Updated: [weather_last_updated]
    Displays the last updated timestamp for the weather video.
  • Sports Last Updated: [sports_last_updated]
    Displays the last updated timestamp for the sports video.

File Storage

  • Videos are stored in the default WordPress uploads directory: wp-content/uploads/
  • Files are named:
    • sports.mp4
    • weather.mp4

Customization

If you want to modify the styles of the videos, you can add custom CSS:

video {
    max-width: 100%;
    border: 2px solid #000;
    border-radius: 5px;
}

Error Handling

  • If an upload fails, the plugin displays an error message.
  • If a video is missing, the respective shortcode will return a message stating that the video is not available.

Timezone Configuration

  • The timestamps are displayed in Central Time (CT).
  • You can modify the timezone in functions.php:date_default_timezone_set('America/Chicago');

Conclusion

The EVC Sports & Weather Video Display Plugin provides an easy-to-use solution for uploading and displaying sports and weather videos on a WordPress site. By using shortcodes, administrators can seamlessly integrate video content into their pages or posts.