Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2016-03-21 02:53:29

dvdfan001
Member
Registered: 2014-04-27
Posts: 158

link to video in auto index

I have created an auto index template, working fine.
color palette | content description | page copy (md):
I can specify an image  (<img src="http://www. ..........">
Is it also possible to add a video to be presented in the BLOCK?

For video presentation in the grid I know the process how to achieve this ...

Last edited by dvdfan001 (2016-03-21 02:55:23)

Offline

#2 2016-03-21 04:07:34

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: link to video in auto index

I suppose it depends on the kind of video.  If YouTube, have you tried simply adding YouTube embed code in the block?

Otherwise, you can use phplugins to add whatever code you like using ttg_block_top for a video before the text and ttg_block_bottom for a video following the text.

http://ce4.theturninggate.net/docs/doku … _block_top


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#3 2016-03-21 04:39:21

dvdfan001
Member
Registered: 2014-04-27
Posts: 158

Re: link to video in auto index

you tube is no option for me. I want to use video content on the server.

using this function:

function ttg_block_bottom( $style, $path ) {
echo '

<video src="http://www.link to videofile on the server">

';
return false;        // Replaces normal menu
} // END


I get a big black placeholder located where expected, but the placeholder exceeds the block width and no playback button occurs.

Offline

#4 2016-03-21 04:43:19

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: link to video in auto index

what kind of video file is it?

If it's HTML5 Video, see if the Stage documentation offers any help as far as making sure you've got the MIME types set up in your .htaccess file.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#5 2016-03-21 07:14:25

dvdfan001
Member
Registered: 2014-04-27
Posts: 158

Re: link to video in auto index

yes, HTML 5, using it with stage makes no problems

Nows it works using the statement:

function ttg_block_bottom( $style, $path ) {
if (G_PATH == 'FOLDER-NAME') {
echo '
<iframe width="1092" height="614" src="link to video on server" frameborder="0" allowfullscreen></iframe>
';
return false;        // Replaces normal menu
    }
} // END

Offline

#6 2016-03-21 07:39:13

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: link to video in auto index

GREAT!


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#7 2016-03-27 07:39:58

dvdfan001
Member
Registered: 2014-04-27
Posts: 158

Re: link to video in auto index

my "solution" has one downside - only working fine on desktop computer respectively if the screen is at minimum the size specified (in my case 1092 px).

Is there any chance to specify a second size (width and height) to be used on mobile devices.
Or any way to disable the video on mobile devices (only to be played in case the minimum size is reached)?

Happe Easter!

Offline

#8 2016-03-27 08:07:53

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: link to video in auto index

there is a G_STYLE identifier for mobile. You can use php conditionals to send something different to mobile devices
http://ce4.theturninggate.net/docs/doku … e4_engines


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#9 2016-03-27 08:09:15

dvdfan001
Member
Registered: 2014-04-27
Posts: 158

Re: link to video in auto index

thanks, I will give it a try tomorrow

Offline

#10 2016-03-29 01:34:03

dvdfan001
Member
Registered: 2014-04-27
Posts: 158

Re: link to video in auto index

Hi Rod, I do need your expertise hmm
Would be great if you can help me.

my findings / questions

  • G_STYLE identifiers are used to target specific gallery types when authoring PHPlugins

  • mobil settings could be used for some but not all STYLES (e.g not for autoindex and stage)

  • CE4-MOBILE targets CRG respectively ALL galleries; CE4-PAGES-MOBILE impacts only the page where the pages gallery is going to

  • no further concretion is possible (e.g which special gallery should be addressed)

Could I also use the "mobile settings"with G_PATH?

in my example:
function ttg_block_bottom( $style, $path ) {
if (G_PATH == 'FOLDER-NAME') {
echo '
<iframe width="1092" height="614" src="link to video on server" frameborder="0" allowfullscreen></iframe>
';
return false;        // Replaces normal menu
    }
} // END

I want to achieve that this will only be relevant for non mobile devices. How to specify a second size (width and height) to be used on mobile devices? How would that conditional expression look like?

Offline

#11 2016-03-29 01:40:33

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: link to video in auto index

sorry, I'm not really sure.

perhaps using media queries in custom css where the video container is given a custom class and is not displayed below certain page widths?


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#12 2016-03-29 01:48:29

dvdfan001
Member
Registered: 2014-04-27
Posts: 158

Re: link to video in auto index

thanks for response, perhaps Ben or Matt do have a good Idea smile

Offline

#13 2016-03-29 02:30:51

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: link to video in auto index

Could I also use the "mobile settings"with G_PATH?

Have you tried?

if (G_PATH == 'FOLDER-NAME') && (G_STYLE != 'CE4-MOBILE') {

I don't know if that will work with an Autoindex page or not

I think there's other php code that can check for mobile devices, but I don't know what it is off the top of my head and don't have the time today to research it.

or you can just try the media query idea and hide use display: none; on the video container div.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#14 2016-03-29 04:57:52

dvdfan001
Member
Registered: 2014-04-27
Posts: 158

Re: link to video in auto index

if (G_PATH == 'FOLDER-NAME') && (G_STYLE != 'CE4-MOBILE') {
results in
Parse error: syntax error, unexpected '&&' (T_BOOLEAN_AND)

What do you mean with <or you can just try the media query idea and hide use display: none; on the video container div.>?

Offline

#15 2016-03-29 05:14:37

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: link to video in auto index

My response above (number 11)

Use custom css to not display the video on screen widths below a certain width. You would use a media query to set this up.
First you'd probably want to assign a class to the video container div.

the css would look something like this:

@media only screen and (max-width: 476px) {
       .my-video-class {
                display: none;
      }
}

set max-width as needed to prevent video showing on smaller devices


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#16 2016-03-29 09:07:54

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: link to video in auto index

Something like this might work for you:
http://mobiledetect.net/

Honestly, it would be easier if you'd just put the video on YouTube of (preferably) Vimeo. They would handle serving the correct size video to devices.


Matt

The Turning Gate, http://theturninggate.net

Offline

#17 2016-03-30 04:04:06

dvdfan001
Member
Registered: 2014-04-27
Posts: 158

Re: link to video in auto index

Thanks to all. I decided to choose another option. Making use of several albums sets and stage template.
One question as far as stage is concerned (using html video and publisher)
Clicking on the thumbnail that opens the page with the stage video I only have the option to view one video. The one I specified in the publisher.
Is there any chance to play more than one?

I do not mean the function (like on youtube) to play a video list.
I'm interest in getting more than one Video to be opened separately on that stage page. Possible?

Offline

#18 2016-03-30 04:11:33

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: link to video in auto index

Is there any chance to play more than one?

No. Only one video per Stage page via Publisher


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#19 2016-03-30 06:36:36

dvdfan001
Member
Registered: 2014-04-27
Posts: 158

Re: link to video in auto index

would the situation be different in case of not using the publisher and exporting the gallery manually?

Offline

#20 2016-03-30 09:08:51

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: link to video in auto index

no, not unless you're also using phplugins to add another video on the page.

Probably the easiest thing to do if you want more than one video on a TTG "page" is to use autoindex or an album set with a couple of Stage albums/pages in it. Granted, the videos themselves wouldn't be on the same page, but the links to them would be.

another option might be WordPress pages.
There are plug-ins for that as well as using a built-in short code
https://codex.wordpress.org/Video_Shortcode


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#21 2016-03-30 16:06:42

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: link to video in auto index

Yeah, I was about to recommend putting your videos onto WordPress pages as well. So I'll just second Rod's suggestion.


Matt

The Turning Gate, http://theturninggate.net

Offline

Board footer

Powered by FluxBB