YouTube-Videos in shadowbox etc.?

Phoca Gallery - image gallery extension
simondevries
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 06 Nov 2008, 16:27

YouTube-Videos in shadowbox etc.?

Post by simondevries »

Am I right, that You-Tube-Videos can only be played in "Modal Popup Boxes" and none of the other detail windows like "shadowbox" or "highslide"? I only get my selected image for the thumbnail in full size when I try this.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49150
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: YouTube-Videos in shadowbox etc.?

Post by Jan »

Hi, in

Modal Box
Standard Popup
Highslide JS

not in windows intended only for pure images (shadowbox, HighslideJS(image only), Modal Box(image only)

Jan
If you find Phoca extensions useful, please support the project
MrMediartJr
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 16 Feb 2009, 02:50
Location: Shepparton, Vic, Australia
Contact:

Re: YouTube-Videos in shadowbox etc.?

Post by MrMediartJr »

Hi Jan

I was wondering if it is possible at all to run youtube videos inside shadowbox, you see i know shadowbox is cappable of it because i actually run my own shadowbox on the same site that i phoca gallery installed on and it would be real great if i could run shadowbox rather than the other pop up. if you tell me what to do i am very capable to do it myself please...
James Ashworth
Website Development Manager
Mediart Solutions
www.mediart.com.au
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49150
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: YouTube-Videos in shadowbox etc.?

Post by Jan »

Hi, you display youtube only in methods which support iframe displaying (standard popup, modal box (iframe), highslide js (iframe) )

in shadowbox, highslide(image), modalbox(image) direct link to image thumbnails are created so no youtube code can be displayed here.


Jan
If you find Phoca extensions useful, please support the project
MrMediartJr
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 16 Feb 2009, 02:50
Location: Shepparton, Vic, Australia
Contact:

Re: YouTube-Videos in shadowbox etc.?

Post by MrMediartJr »

so even though shadow box (the stand alone original version) can display youtube, the shadowbox in phoca gallery cant?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49150
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: YouTube-Videos in shadowbox etc.?

Post by Jan »

Hi, this is the question of image x iframe..

e.g. modal box can display only images (image) and images + slideshow button, youtube videos (iframe) ... but I have no implement the iframe for shadowbox because I got conflicts with shadowbox + iframe + joomla! + phoca gallery...

the iframe is implemented for modal and highslide without any problems :-(
If you find Phoca extensions useful, please support the project
mirtillotta
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 30 Aug 2010, 09:48
Location: Italy

Re: YouTube-Videos in shadowbox etc.?

Post by mirtillotta »

Good morning, I'll resume this topic :|

Shadowbox is, in my opinion the best looking among the zoom solutions offered by Phoca Gallery by default, don't you agree?
So I wanted it to display YouTube videos, too: Shadowbox can do it just by linking the video URL.

This is what I accomplished by modifying the file component/com_phocagallery/views/category/tmpl/default.php (Phoca Gallery 2.7.4):

[line 126]
from

Code: Select all

echo ' href="'. $value->link.'"';
to

Code: Select all

echo ' href="'. (($this->tmpl['detailwindow'] != 3) ? $value->link : (($value->videocode != '') ? $value->videocode : $value->link)) . '"'; // if it's a Shadowbox and a video code was provided, then put the video code (it must be just the URL, not the entire <object> code) in the href attribute of the image link
[line 152]
form

Code: Select all

echo ' rel="'.$value->button->options.'"';
to

Code: Select all

echo ' rel="'.$value->button->options . (($this->tmpl['detailwindow'] == 3 && $value->videocode != '') ? ';width=480;height=385' : '') . '"'; // if it's a Shadowbox and a video code was provided, the add width and height of the video to the rel attribute of the image link
As you can see, it was way simple. I hardcode the size attributes (that's the YouTube default, by the way), but of course it could be done by user input. Without size information, the popup will display fullscreen.

Is there any chance that something like this will be included in the next possible Phoca Gallery release? I think it could be appreciated by many users (and I wouldn't have to remember and rewrite my little piece of code :wink: ) :twisted:

Best wishes,
Francesca
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49150
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: YouTube-Videos in shadowbox etc.?

Post by Jan »

Hi, thank you for this info.

I have added this improvement to the feature request list (because of overwriting components to 1.6 I really cannot say when I will test it for adding it to the component :( ).

Thank you, Jan
If you find Phoca extensions useful, please support the project
mirtillotta
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 30 Aug 2010, 09:48
Location: Italy

Re: YouTube-Videos in shadowbox etc.?

Post by mirtillotta »

Jan wrote:Hi, thank you for this info.

I have added this improvement to the feature request list (because of overwriting components to 1.6 I really cannot say when I will test it for adding it to the component :( ).

Thank you, Jan
You are very welcome. Actulally I thank you for considering :wink:

Good luck for the migration to 1.6,
Francesca
TaC
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 12 Jun 2012, 19:34

Re: YouTube-Videos in shadowbox etc.?

Post by TaC »

¿Anyone know the code modifications to make in the last version of Phoca Gallery for this to work? I see the code changes must be done in "default_images.php" this time, but my attempts didn't work.
Post Reply