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.
You are not logged in.
Pages: 1
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
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.
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
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
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
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
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
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
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
thanks, I will give it a try tomorrow
Offline
Hi Rod, I do need your expertise
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
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
thanks for response, perhaps Ben or Matt do have a good Idea
Offline
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
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
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
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.
Offline
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
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
would the situation be different in case of not using the publisher and exporting the gallery manually?
Offline
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
Yeah, I was about to recommend putting your videos onto WordPress pages as well. So I'll just second Rod's suggestion.
Offline
Pages: 1