How to display youtube videos in e.g. shadowbox

Phoca Gallery - image gallery extension
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: How to display youtube videos in e.g. shadowbox

Post by Jan »

Which version of Phoca Gallery you are using?

Jan
If you find Phoca extensions useful, please support the project
aromaweb
Phoca Member
Phoca Member
Posts: 23
Joined: 04 May 2016, 13:17

Re: How to display youtube videos in e.g. shadowbox

Post by aromaweb »

Phocagallery 4.2.2
Joomla 3.5.1
christine
Phoca Hero
Phoca Hero
Posts: 2938
Joined: 28 Nov 2010, 17:20

Re: How to display youtube videos in e.g. shadowbox

Post by christine »

Hi,
the current version of PG is: 4.3.0 > https://www.phoca.cz/download/category/1 ... -component
Kind regards, Christine
User avatar
headtrick
Phoca Member
Phoca Member
Posts: 23
Joined: 24 Apr 2016, 23:40

Re: How to display youtube videos in e.g. shadowbox

Post by headtrick »

Same Problem with 4.3 :(
aromaweb
Phoca Member
Phoca Member
Posts: 23
Joined: 04 May 2016, 13:17

Re: How to display youtube videos in e.g. shadowbox

Post by aromaweb »

Also for me, same problem!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: How to display youtube videos in e.g. shadowbox

Post by Jan »

Hi, try to set in Options:

It is boxplus (iframe) method
Detail windows: boxplus
YouTube Window: Full video
Pop-up window theme (boxplus): dark square theme
Center on scroll (boxplus): yes
Fit to window (boxplus): yes
Slideshow delay (boxplus): 0
Wrap around at end (boxplus): no
Caption placement (boxplus): below
Navigation bar (boxplus): as overlay
Animation duration (boxplus): 250
Transition effect (boxplus): linear
Context menu (boxplus): display

and then try to edit this file:
components\com_phocagallery\views\detail\tmpl\default_video.php

FROM:

Code: Select all

if ($this->tmpl['ytb_display'] == 1) {
	
	echo '<div style="padding:0;margin:0;" class="pg-ytb-full">'.$this->item->videocode.'</div>';
} else {
TO:

Code: Select all

if ($this->tmpl['ytb_display'] == 1) {
	
	$document	= JFactory::getDocument();
	$document->addCustomTag( "<style type=\"text/css\"> \n" 
			." body {overflow:hidden;} \n"
			." </style> \n");
	
	echo '<div style="padding:0;margin:0;" class="pg-ytb-full">'.$this->item->videocode.'</div>';
} else {
If you find Phoca extensions useful, please support the project
User avatar
headtrick
Phoca Member
Phoca Member
Posts: 23
Joined: 24 Apr 2016, 23:40

Re: How to display youtube videos in e.g. shadowbox

Post by headtrick »

This only prevents scrolbars to appear, but also only with the videos, but they are already fine.
Our problem is a mixed category with videos and pictures. Then the pictures are cut like shown.

Best,
Michael
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: How to display youtube videos in e.g. shadowbox

Post by Jan »

Hi, yes, YouTube video does have other size (other ratio, etc.) so there are possible two ways:
- use videos and images separately - different categories
- or directly hardcode the modifications so every type gets other detail window :idea:

Jan
If you find Phoca extensions useful, please support the project
User avatar
headtrick
Phoca Member
Phoca Member
Posts: 23
Joined: 24 Apr 2016, 23:40

Re: How to display youtube videos in e.g. shadowbox

Post by headtrick »

Hi,

actually I don't find how I can assign different display styles to different categories, only a global option. If this doesn't work I should suggest it as feature request ;)
For hardcoding I don't have enough time :(

Also you should think in making a new modern style that has both advantages of iframe and js method and loads the images on other pages per ajax when needed, maybe I should also make a feature request here:D

Thanks.
Best,
Michael
aromaweb
Phoca Member
Phoca Member
Posts: 23
Joined: 04 May 2016, 13:17

Re: How to display youtube videos in e.g. shadowbox

Post by aromaweb »

Jan wrote: - use videos and images separately - different categories
where can I set this?
Post Reply