Welcome to our communityFeel free to join and make use of the shoutbox and forums

YouTube Responsive video for phpBB

Forum used for listing all members lounge discussions.

Moderator: Super Moderators

User avatar
Forum Administrator
Forum Administrator
Posts: 50
Joined: Tue Jun 28, 2016 12:12 pm

YouTube Responsive video for phpBB

Unread postby GTB » Tue Dec 06, 2016 5:51 pm

How to add YouTube Responsive video for phpBB 3.1 and 3.2, this also passes W3C validation.

Open File: styles/prosilver/theme/common.css

Add this CSS code at very bottom. Don't forget, you need clear all CACHE afterwards via Admin CP after uploading the CSS file with these extra changes included.

Code: Select all

/* Custom youtube bbcode
---------------------------------------- */

.video-wrapper {
   width: 640px;
   max-width: 100%;
   margin-top: 5px;
   margin-bottom: 5px;

.video-container {
   position: relative;
   padding-bottom: 56.25%;
   padding-top: 30px;
   height: 0;
   overflow: hidden;

.video-container iframe, .video-container object, .video-container embed {
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;

Now you can add a new BBCODE to phpBB using this below for the YouTube Video player.

BBCode usage:

Code: Select all


HTML replacement:

Code: Select all

<div class="video-wrapper"><div class="video-container"><iframe width="640" height="360" src="https://www.youtube.com/embed/{SIMPLETEXT}" style="border: none;" allowfullscreen></iframe></div></div>

Help line:

Code: Select all

Youtube video: [youtube]yxx1LJLl0Kw[/youtube]

This topic has [ 1 ] reply posted

You must be a registered member and logged in to view any replies made in this topic



Who is online

Users browsing this forum: No registered users and 0 guests