VideoGallery: Difference between revisions
From Dune Awakening DB
mNo edit summary |
mNo edit summary |
||
| Line 59: | Line 59: | ||
|where=purpose='Essential Guides' AND visibility='public' | |where=purpose='Essential Guides' AND visibility='public' | ||
|order by=published_at DESC | |order by=published_at DESC | ||
|table=vg_essential_guides | |||
}} | }} | ||
{{#for_external_table:|<div class="video-card" data-video-id="{{{video_id}}}" data-youtube-id="{{{youtube_id}}}" data-title="{{{title}}}" data-channel="{{{channel_title}}}" data-channel-id="{{{channel_id}}}" data-author="{{{author|}}}" data-published="{{{published_at}}}" data-duration="{{{duration_sec}}}" data-purpose="{{{purpose|}}}" data-primary-tag="{{{primary_tag}}}" data-secondary-tag="{{{secondary_tag|}}}" data-description="{{{description|}}}" data-notes="{{{video_notes|}}}" data-internal-link="{{{video_internal_link|}}}"> | {{#for_external_table: vg_essential_guides|<div class="video-card" data-video-id="{{{video_id}}}" data-youtube-id="{{{youtube_id}}}" data-title="{{{title}}}" data-channel="{{{channel_title}}}" data-channel-id="{{{channel_id}}}" data-author="{{{author|}}}" data-published="{{{published_at}}}" data-duration="{{{duration_sec}}}" data-purpose="{{{purpose|}}}" data-primary-tag="{{{primary_tag}}}" data-secondary-tag="{{{secondary_tag|}}}" data-description="{{{description|}}}" data-notes="{{{video_notes|}}}" data-internal-link="{{{video_internal_link|}}}"> | ||
<div class="video-thumbnail" style="background-image: url('https://img.youtube.com/vi/{{{youtube_id}}}/mqdefault.jpg');"> | <div class="video-thumbnail" style="background-image: url('https://img.youtube.com/vi/{{{youtube_id}}}/mqdefault.jpg');"> | ||
{{#if:{{{duration_sec|}}}|<span class="video-duration">{{#expr: floor({{{duration_sec}}} / 60)}}:{{#ifexpr: ({{{duration_sec}}} mod 60) < 10|0}}{{#expr: {{{duration_sec}}} mod 60}}</span>|}} | {{#if:{{{duration_sec|}}}|<span class="video-duration">{{#expr: floor({{{duration_sec}}} / 60)}}:{{#ifexpr: ({{{duration_sec}}} mod 60) < 10|0}}{{#expr: {{{duration_sec}}} mod 60}}</span>|}} | ||
Latest revision as of 11:53, 3 June 2025
Video Gallery Template
This template displays the video gallery system for Dune Awakening using external data.
IMPORTANT: This template has NO INDENTATION to prevent MediaWiki from wrapping content in pre tags.
Changes in this version
- Removed search functionality
- Added scrollable content wrapper
- Reduced header size by 30%
- Reduced container height by 200px
- Fixed horizontal tab layout
Usage
Simply add {{VideoGallery}} to any page where you want the video gallery to appear.
Features
- Smaller header section
- Six tabs: Featured, Leveling, Crafting, Building, PvE, PvP
- Scrollable content area for video sections
- Videos grouped by purpose within each category
- Embedded YouTube player with video notes
- Responsive design
Dependencies
- Template:VideoGallery/styles.css - Styling
- Gadget-VideoGallerySystem.js - JavaScript functionality
- External Data extension - For database queries
Database
This template pulls data from the data_videos table using the external data extension.
Purpose Categories
Videos are grouped by the "purpose" field:
- Featured: New Player Guide, Essential Guides
- Leveling: Leveling 1-20, Leveling 21-40, Leveling 41-60
- Crafting: Basic Crafting, Advanced Crafting
- Building: Base Building
- PvE: Boss Guides
- PvP: PVP Strategy
