-
1. Re: MPG movies & background
Marian Driscoll Oct 4, 2011 11:54 AM (in response to jgcalifornia)Background is defined in the HTML. That means you would need a separate HTML page for each video.
Or, much more easily, you could use a single scripted page (such as PHP) that displays a distinct video file based on a variable that you feed it.
-
2. Re: MPG movies & background
jgcalifornia Oct 4, 2011 12:22 PM (in response to Marian Driscoll)I was afraid of something like that, as far as having to make a page for each movie file? It would take me a year. The single script file you mention, can you be a bit more specific as far as how to direct that to each individula movie file?
thanks for the help!
-
3. Re: MPG movies & background
Marian Driscoll Oct 4, 2011 3:03 PM (in response to jgcalifornia)Does your web server support PHP?
-
4. Re: MPG movies & background
jgcalifornia Oct 4, 2011 3:37 PM (in response to Marian Driscoll)it does, unfortunately, PHP doesnt support me..;) I dont have much experience with it.
-
5. Re: MPG movies & background
Marian Driscoll Oct 4, 2011 5:29 PM (in response to jgcalifornia)okay. Here's some experience in 3 easy steps...
- Create a new PHP file for your site. Save it as "play.php". Design it any way you want. Make a background, add menus, graphics, whatever. Drag the QuickTime element into the page and link the video file it should play as "mymovie.mpg".
- Now go into source view and change any instance (at least two places) of <strong>"mymovie.mpg"</strong> to <strong>"<?php echo $_GET[movie]; ?>"</strong>
- Now go to every video link you have in your site and change the link from something like <strong>http://www.mysite.com/video1.mpg</strong> to <strong>http://www.mysite.com/play.php?movie=video1.mpg</strong> This could be done on thousands of files with a global find/change from <strong>http://www.mysite.com/</strong> to <strong>http://www.mysite.com/play.php?movie=</strong>
- Create a new PHP file for your site. Save it as "play.php". Design it any way you want. Make a background, add menus, graphics, whatever. Drag the QuickTime element into the page and link the video file it should play as "mymovie.mpg".
-
6. Re: MPG movies & background
jgcalifornia Oct 4, 2011 6:07 PM (in response to Marian Driscoll)Marian, thanks for this.
When you say "Design it any way you want. Make a background, add menus, graphics, whatever" in a PHP file, to design and customize backgrounds, etc.., do i use just regular tags? PHP has a different language for customizing, or does it not?
thanks again.
-
7. Re: MPG movies & background
Marian Driscoll Oct 4, 2011 7:04 PM (in response to jgcalifornia)Ignore post #5. I tried to fix it but the forums went down and now I cannot edit it...
okay. Here's some experience in 3 easy steps...
- Create a new PHP file for your site. Save it as "play.php". Design it any way you want. Make a background, add menus, graphics, whatever. Drag the QuickTime element into the page and link the video file it should play as "mymovie.mpg".
- Now go into source view and change any instance (at least two places) of "mymovie.mpg" to "<?php echo $_GET[movie]; ?>"
- Now go to every video link you have in your site and change the link from something like http://www.mysite.com/video1.mpg to http://www.mysite.com/play.php?movie=video1.mpg This could be done on thousands of files with a global find/change from http://www.mysite.com/ to http://www.mysite.com/play.php?movie=
(be careful that you are only changing the URL for video links; a general find/change of http://www.mysite.com/ on all links to something else will blow up your site)
A PHP file is no different than a regular web page... except that you can add PHP tags. The only PHP tag that you are adding is <?php echo $_GET[movie]; ?>
This PHP takes the movie variable passed in the URL /play.php?movie=video1.mpg and inserts it into your HTML.
- Create a new PHP file for your site. Save it as "play.php". Design it any way you want. Make a background, add menus, graphics, whatever. Drag the QuickTime element into the page and link the video file it should play as "mymovie.mpg".
-
8. Re: MPG movies & background
jgcalifornia Oct 4, 2011 7:54 PM (in response to Marian Driscoll)ok, so far the PHP file is created. However, if every single movie we have, has a different title, "dogmovie.mpg" "catmovie.mpg" "October.mpg" etc.., would i not have to do this for every single one?
also, does this mean every movie has to be the same size?
-
9. Re: MPG movies & background
Marian Driscoll Oct 5, 2011 2:22 PM (in response to jgcalifornia)If you want to create one template PHP file then it will display all videos as one size.
Links to:
http://www.yoursite.com/dogmovie.mpg would become http://www.yoursite.com/play.php?movie=dogmovie.mpg
http://www.yoursite.com/catmovie.mpg would become http://www.yoursite.com/play.php?movie=catmovie.mpg
http://www.yoursite.com/October.mpg would become http://www.yoursite.com/play.php?movie=October.mpg
We've simply inserted play.php?movie= before the MPG filename so that the movie file is loaded in your PHP file instead of being called directly in the browser.
This is where you can get creative with whatever find/change operation you want to do.
(This naming scheme assumes that your video files are all in the root directory. Adjustments will be required if these videos are organized in subfolders.)
-
10. Re: MPG movies & background
jgcalifornia Oct 5, 2011 5:43 PM (in response to Marian Driscoll)Got it. So I can do a Find Text and just add the play.php?movie=
Marian thank you so much for explaining , but mostly for explaining clearly. The background color changed and the movie played, i think I just need to change the widthnand height of the movie size, maybe to 100%? Right now its just a small box, but i believe everything else worked. Thank you so much!!
-
11. Re: MPG movies & background
jgcalifornia Oct 6, 2011 9:26 AM (in response to Marian Driscoll)Marian, does this code look right to you? this is my php file.
I was wondering about the "embed height'
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<?php
?>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>Test Page</title>
<style type="text/css">
html, body { height: 100%; margin: 0; padding: 0; background-image: url(../navigation/bodybk.jpg); background-repeat: repeat; }
p.c3 { text-align: center; margin-top: 100px; padding-top: 50px; }
.outer1 { background:url(../navigation/lefty.png) no-repeat 0 0; min-height: 500px; }
.outer2 { background:url(../navigation/righty.png) no-repeat 100% 0; min-height: 500px; }
#header { text-align: center; width: 100%; height: 20px; padding-right: 0; padding-bottom: 10px; }
</style>
</head>
<body>
<div class="outer1">
<div class="outer2">
<div id="header"><img src="../navigation/VT-logo-1.png" width="283" height="97" alt="Logo"></div>
<p class="c3"><embed height="287" src="<?php echo $_GET[movie]; ?>" type="audio/mpeg" width="480" autostart="true" controls="console"></p>
</body>
</html>
-
12. Re: MPG movies & background
Marian Driscoll Oct 6, 2011 12:08 PM (in response to jgcalifornia)That seems about right but you have some extra DIVs there that need closure.
<div class="outer1">
<div class="outer2">
-
13. Re: MPG movies & background
jgcalifornia Oct 28, 2011 8:22 AM (in response to Marian Driscoll)Marian, why would the movies not paly in Safari? FF is fine, but Safari just displays the quicktme logo, no controls, no options and never plays the movie.
Any thoughts?
thank you!!
-
14. Re: MPG movies & background
Marian Driscoll Nov 7, 2011 7:01 AM (in response to jgcalifornia)Does the file play in Internet Explorer and Google Chrome?
-
15. Re: MPG movies & background
jgcalifornia Nov 17, 2011 8:33 AM (in response to Marian Driscoll)IE-dont know
Google Chrome-aks me for a plugin, whe i say yes, it just shows a black quicktime box, never plays movie.

